Beispiel #1
0
        public override string ToString()
        {
            StringBuilder __sb    = new StringBuilder("ColumnChunk(");
            bool          __first = true;

            if (File_path != null && __isset.file_path)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("File_path: ");
                __sb.Append(File_path);
            }
            if (!__first)
            {
                __sb.Append(", ");
            }
            __sb.Append("File_offset: ");
            __sb.Append(File_offset);
            if (Meta_data != null && __isset.meta_data)
            {
                __sb.Append(", Meta_data: ");
                __sb.Append(Meta_data == null ? "<null>" : Meta_data.ToString());
            }
            if (__isset.offset_index_offset)
            {
                __sb.Append(", Offset_index_offset: ");
                __sb.Append(Offset_index_offset);
            }
            if (__isset.offset_index_length)
            {
                __sb.Append(", Offset_index_length: ");
                __sb.Append(Offset_index_length);
            }
            if (__isset.column_index_offset)
            {
                __sb.Append(", Column_index_offset: ");
                __sb.Append(Column_index_offset);
            }
            if (__isset.column_index_length)
            {
                __sb.Append(", Column_index_length: ");
                __sb.Append(Column_index_length);
            }
            if (Crypto_metadata != null && __isset.crypto_metadata)
            {
                __sb.Append(", Crypto_metadata: ");
                __sb.Append(Crypto_metadata == null ? "<null>" : Crypto_metadata.ToString());
            }
            if (Encrypted_column_metadata != null && __isset.encrypted_column_metadata)
            {
                __sb.Append(", Encrypted_column_metadata: ");
                __sb.Append(Encrypted_column_metadata);
            }
            __sb.Append(")");
            return(__sb.ToString());
        }
Beispiel #2
0
        public override string ToString()
        {
            var  sb      = new StringBuilder("ColumnChunk(");
            bool __first = true;

            if (File_path != null && __isset.file_path)
            {
                if (!__first)
                {
                    sb.Append(", ");
                }
                __first = false;
                sb.Append("File_path: ");
                sb.Append(File_path);
            }
            if (!__first)
            {
                sb.Append(", ");
            }
            sb.Append("File_offset: ");
            sb.Append(File_offset);
            if (Meta_data != null && __isset.meta_data)
            {
                sb.Append(", Meta_data: ");
                sb.Append(Meta_data == null ? "<null>" : Meta_data.ToString());
            }
            if (__isset.offset_index_offset)
            {
                sb.Append(", Offset_index_offset: ");
                sb.Append(Offset_index_offset);
            }
            if (__isset.offset_index_length)
            {
                sb.Append(", Offset_index_length: ");
                sb.Append(Offset_index_length);
            }
            if (__isset.column_index_offset)
            {
                sb.Append(", Column_index_offset: ");
                sb.Append(Column_index_offset);
            }
            if (__isset.column_index_length)
            {
                sb.Append(", Column_index_length: ");
                sb.Append(Column_index_length);
            }
            sb.Append(")");
            return(sb.ToString());
        }
Beispiel #3
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("ColumnChunk");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (File_path != null && __isset.file_path)
         {
             field.Name = "file_path";
             field.Type = TType.String;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(File_path);
             oprot.WriteFieldEnd();
         }
         field.Name = "file_offset";
         field.Type = TType.I64;
         field.ID   = 2;
         oprot.WriteFieldBegin(field);
         oprot.WriteI64(File_offset);
         oprot.WriteFieldEnd();
         if (Meta_data != null && __isset.meta_data)
         {
             field.Name = "meta_data";
             field.Type = TType.Struct;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             Meta_data.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (__isset.offset_index_offset)
         {
             field.Name = "offset_index_offset";
             field.Type = TType.I64;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             oprot.WriteI64(Offset_index_offset);
             oprot.WriteFieldEnd();
         }
         if (__isset.offset_index_length)
         {
             field.Name = "offset_index_length";
             field.Type = TType.I32;
             field.ID   = 5;
             oprot.WriteFieldBegin(field);
             oprot.WriteI32(Offset_index_length);
             oprot.WriteFieldEnd();
         }
         if (__isset.column_index_offset)
         {
             field.Name = "column_index_offset";
             field.Type = TType.I64;
             field.ID   = 6;
             oprot.WriteFieldBegin(field);
             oprot.WriteI64(Column_index_offset);
             oprot.WriteFieldEnd();
         }
         if (__isset.column_index_length)
         {
             field.Name = "column_index_length";
             field.Type = TType.I32;
             field.ID   = 7;
             oprot.WriteFieldBegin(field);
             oprot.WriteI32(Column_index_length);
             oprot.WriteFieldEnd();
         }
         if (Crypto_metadata != null && __isset.crypto_metadata)
         {
             field.Name = "crypto_metadata";
             field.Type = TType.Struct;
             field.ID   = 8;
             oprot.WriteFieldBegin(field);
             Crypto_metadata.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (Encrypted_column_metadata != null && __isset.encrypted_column_metadata)
         {
             field.Name = "encrypted_column_metadata";
             field.Type = TType.String;
             field.ID   = 9;
             oprot.WriteFieldBegin(field);
             oprot.WriteBinary(Encrypted_column_metadata);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
Beispiel #4
0
        public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
            oprot.IncrementRecursionDepth();
            try
            {
                var struc = new TStruct("ColumnChunk");
                await oprot.WriteStructBeginAsync(struc, cancellationToken);

                var field = new TField();
                if (File_path != null && __isset.file_path)
                {
                    field.Name = "file_path";
                    field.Type = TType.String;
                    field.ID   = 1;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteStringAsync(File_path, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                field.Name = "file_offset";
                field.Type = TType.I64;
                field.ID   = 2;
                await oprot.WriteFieldBeginAsync(field, cancellationToken);

                await oprot.WriteI64Async(File_offset, cancellationToken);

                await oprot.WriteFieldEndAsync(cancellationToken);

                if (Meta_data != null && __isset.meta_data)
                {
                    field.Name = "meta_data";
                    field.Type = TType.Struct;
                    field.ID   = 3;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await Meta_data.WriteAsync(oprot, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (__isset.offset_index_offset)
                {
                    field.Name = "offset_index_offset";
                    field.Type = TType.I64;
                    field.ID   = 4;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteI64Async(Offset_index_offset, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (__isset.offset_index_length)
                {
                    field.Name = "offset_index_length";
                    field.Type = TType.I32;
                    field.ID   = 5;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteI32Async(Offset_index_length, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (__isset.column_index_offset)
                {
                    field.Name = "column_index_offset";
                    field.Type = TType.I64;
                    field.ID   = 6;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteI64Async(Column_index_offset, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (__isset.column_index_length)
                {
                    field.Name = "column_index_length";
                    field.Type = TType.I32;
                    field.ID   = 7;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteI32Async(Column_index_length, cancellationToken);

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

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