public override int GetHashCode()
        {
            int hashcode = 157;

            unchecked {
                if (isset.is_agg)
                {
                    hashcode = (hashcode * 397) + Is_agg.GetHashCode();
                }
                if (isset.kind)
                {
                    hashcode = (hashcode * 397) + Kind.GetHashCode();
                }
                if (isset.type)
                {
                    hashcode = (hashcode * 397) + Type.GetHashCode();
                }
                if (isset.arg_type)
                {
                    hashcode = (hashcode * 397) + Arg_type.GetHashCode();
                }
                if (isset.skip_nulls)
                {
                    hashcode = (hashcode * 397) + Skip_nulls.GetHashCode();
                }
                if (isset.is_distinct)
                {
                    hashcode = (hashcode * 397) + Is_distinct.GetHashCode();
                }
            }
            return(hashcode);
        }
        public override string ToString()
        {
            var  sb      = new StringBuilder("TTargetInfo(");
            bool __first = true;

            if (isset.is_agg)
            {
                if (!__first)
                {
                    sb.Append(", ");
                }
                __first = false;
                sb.Append("Is_agg: ");
                sb.Append(Is_agg);
            }
            if (isset.kind)
            {
                if (!__first)
                {
                    sb.Append(", ");
                }
                __first = false;
                sb.Append("Kind: ");
                sb.Append(Kind);
            }
            if (Type != null && isset.type)
            {
                if (!__first)
                {
                    sb.Append(", ");
                }
                __first = false;
                sb.Append("Type: ");
                sb.Append(Type == null ? "<null>" : Type.ToString());
            }
            if (Arg_type != null && isset.arg_type)
            {
                if (!__first)
                {
                    sb.Append(", ");
                }
                __first = false;
                sb.Append("Arg_type: ");
                sb.Append(Arg_type == null ? "<null>" : Arg_type.ToString());
            }
            if (isset.skip_nulls)
            {
                if (!__first)
                {
                    sb.Append(", ");
                }
                __first = false;
                sb.Append("Skip_nulls: ");
                sb.Append(Skip_nulls);
            }
            if (isset.is_distinct)
            {
                if (!__first)
                {
                    sb.Append(", ");
                }
                __first = false;
                sb.Append("Is_distinct: ");
                sb.Append(Is_distinct);
            }
            sb.Append(")");
            return(sb.ToString());
        }
        public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
            oprot.IncrementRecursionDepth();
            try
            {
                var struc = new TStruct("TTargetInfo");
                await oprot.WriteStructBeginAsync(struc, cancellationToken);

                var field = new TField();
                if (isset.is_agg)
                {
                    field.Name = "is_agg";
                    field.Type = TType.Bool;
                    field.ID   = 1;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteBoolAsync(Is_agg, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (isset.kind)
                {
                    field.Name = "kind";
                    field.Type = TType.I32;
                    field.ID   = 2;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteI32Async((int)Kind, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (Type != null && isset.type)
                {
                    field.Name = "type";
                    field.Type = TType.Struct;
                    field.ID   = 3;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await Type.WriteAsync(oprot, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (Arg_type != null && isset.arg_type)
                {
                    field.Name = "arg_type";
                    field.Type = TType.Struct;
                    field.ID   = 4;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await Arg_type.WriteAsync(oprot, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (isset.skip_nulls)
                {
                    field.Name = "skip_nulls";
                    field.Type = TType.Bool;
                    field.ID   = 5;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteBoolAsync(Skip_nulls, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (isset.is_distinct)
                {
                    field.Name = "is_distinct";
                    field.Type = TType.Bool;
                    field.ID   = 6;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteBoolAsync(Is_distinct, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                await oprot.WriteFieldStopAsync(cancellationToken);

                await oprot.WriteStructEndAsync(cancellationToken);
            }
            finally
            {
                oprot.DecrementRecursionDepth();
            }
        }