Example #1
0
        public void Read(TProtocol iprot)
        {
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.String)
                    {
                        this.key         = iprot.ReadString();
                        this.__isset.key = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.List)
                    {
                        {
                            this.columns = new List <ColumnOrSuperColumn>();
                            TList _list8 = iprot.ReadListBegin();
                            for (int _i9 = 0; _i9 < _list8.Count; ++_i9)
                            {
                                ColumnOrSuperColumn _elem10 = new ColumnOrSuperColumn();
                                _elem10 = new ColumnOrSuperColumn();
                                _elem10.Read(iprot);
                                this.columns.Add(_elem10);
                            }
                            iprot.ReadListEnd();
                        }
                        this.__isset.columns = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
Example #2
0
        public void Read(TProtocol iprot)
        {
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.String)
                    {
                        Key = iprot.ReadBinary();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.List)
                    {
                        {
                            Columns = new List <ColumnOrSuperColumn>();
                            TList _list20 = iprot.ReadListBegin();
                            for (int _i21 = 0; _i21 < _list20.Count; ++_i21)
                            {
                                ColumnOrSuperColumn _elem22 = new ColumnOrSuperColumn();
                                _elem22 = new ColumnOrSuperColumn();
                                _elem22.Read(iprot);
                                Columns.Add(_elem22);
                            }
                            iprot.ReadListEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                TField field;
                iprot.ReadStructBegin();
                while (true)
                {
                    field = iprot.ReadFieldBegin();
                    if (field.Type == TType.Stop)
                    {
                        break;
                    }
                    switch (field.ID)
                    {
                    case 1:
                        if (field.Type == TType.Struct)
                        {
                            Column_or_supercolumn = new ColumnOrSuperColumn();
                            Column_or_supercolumn.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.Struct)
                        {
                            Deletion = new Deletion();
                            Deletion.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
Example #4
0
        public void Read(TProtocol iprot)
        {
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.Struct)
                    {
                        this.column_or_supercolumn = new ColumnOrSuperColumn();
                        this.column_or_supercolumn.Read(iprot);
                        this.__isset.column_or_supercolumn = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.Struct)
                    {
                        this.deletion = new Deletion();
                        this.deletion.Read(iprot);
                        this.__isset.deletion = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
        /// <summary>
        /// Convert this object to its equivalent Thrift object
        /// </summary>
        /// <returns>a Thrift Object</returns>
        public Mutation ToThrift()
        {
            ColumnOrSuperColumn columnOrSuperColumn = new ColumnOrSuperColumn();
            if (this.Column != null)
            {
                columnOrSuperColumn.Column = this.Column.ToThrift();
            }

            if (this.SuperColumn != null)
            {
                columnOrSuperColumn.Super_column = this.SuperColumn.ToThrift();
            }

            return new Mutation()
                {
                    Column_or_supercolumn = columnOrSuperColumn
                };
        }
Example #6
0
 public static IFluentBaseColumn ConvertToFluentBaseColumn(ColumnOrSuperColumn col, CassandraColumnFamilySchema schema)
 {
     if (col.Super_column != null)
         return ConvertSuperColumnToFluentSuperColumn(col.Super_column, schema);
     else if (col.Column != null)
         return ConvertColumnToFluentColumn(col.Column, schema);
     else if (col.Counter_super_column != null)
         return ConvertColumnToFluentCounterColumn(col.Counter_column, schema);
     else if (col.Counter_column != null)
         return ConvertSuperColumnToFluentCounterSuperColumn(col.Counter_super_column, schema);
     else
         return null;
 }
Example #7
0
 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.Struct) {
           Column_or_supercolumn = new ColumnOrSuperColumn();
           Column_or_supercolumn.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           Deletion = new Deletion();
           Deletion.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
 protected void CreateMutation(List<Mutation> mutList, String column, Byte[] value, Int64 timestamp)
 {
     Mutation mutation = new Mutation();
     Column col = new Column();
     col.Name = column.ToCassandraByte();
     col.Value = value;
     col.Timestamp = timestamp;
     Int32 ttl = LevelMapping.GetTtl();
     if (ttl > 0)
         col.Ttl = 0;
     ColumnOrSuperColumn cosc = new ColumnOrSuperColumn();
     cosc.Column = col;
     mutation.Column_or_supercolumn = cosc;
     mutList.Add(mutation);
 }
Example #9
0
 public void Read(TProtocol iprot)
 {
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
       field = iprot.ReadFieldBegin();
       if (field.Type == TType.Stop) {
     break;
       }
       switch (field.ID)
       {
     case 0:
       if (field.Type == TType.Map) {
     {
       Success = new Dictionary<byte[], List<ColumnOrSuperColumn>>();
       TMap _map46 = iprot.ReadMapBegin();
       for( int _i47 = 0; _i47 < _map46.Count; ++_i47)
       {
         byte[] _key48;
         List<ColumnOrSuperColumn> _val49;
         _key48 = iprot.ReadBinary();
         {
           _val49 = new List<ColumnOrSuperColumn>();
           TList _list50 = iprot.ReadListBegin();
           for( int _i51 = 0; _i51 < _list50.Count; ++_i51)
           {
             ColumnOrSuperColumn _elem52 = new ColumnOrSuperColumn();
             _elem52 = new ColumnOrSuperColumn();
             _elem52.Read(iprot);
             _val49.Add(_elem52);
           }
           iprot.ReadListEnd();
         }
         Success[_key48] = _val49;
       }
       iprot.ReadMapEnd();
     }
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 1:
       if (field.Type == TType.Struct) {
     Ire = new InvalidRequestException();
     Ire.Read(iprot);
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 2:
       if (field.Type == TType.Struct) {
     Ue = new UnavailableException();
     Ue.Read(iprot);
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 3:
       if (field.Type == TType.Struct) {
     Te = new TimedOutException();
     Te.Read(iprot);
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     default:
       TProtocolUtil.Skip(iprot, field.Type);
       break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }
Example #10
0
        public ParsedFolderData(List<ColumnOrSuperColumn> allColumns)
        {
            byte[] propertiesKey = ByteEncoderHelper.UTF8Encoder.ToByteArray("properties");
            byte[] subFoldersKey = ByteEncoderHelper.UTF8Encoder.ToByteArray("sub_folders");

            bool propsFound = false;
            bool subFoldersFound = false;

            _items = new List<ColumnOrSuperColumn>();
            foreach (ColumnOrSuperColumn col in allColumns)
            {
                if (!propsFound && col.Super_column.Name.SequenceEqual(propertiesKey))
                {
                    //properties
                    propsFound = true;
                    _propertiesSc = col;
                }
                else if (!subFoldersFound && col.Super_column.Name.SequenceEqual(subFoldersKey))
                {
                    subFoldersFound = true;
                    _subfoldersSc = col;
                }
                else
                {
                    _items.Add(col);
                }
            }
        }
Example #11
0
 public void Read(TProtocol iprot)
 {
     TField field;
       iprot.ReadStructBegin();
       while (true)
       {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) {
       break;
     }
     switch (field.ID)
     {
       case 1:
     if (field.Type == TType.String) {
       this.key = iprot.ReadBinary();
       this.__isset.key = true;
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 2:
     if (field.Type == TType.List) {
       {
         this.columns = new List<ColumnOrSuperColumn>();
         TList _list12 = iprot.ReadListBegin();
         for( int _i13 = 0; _i13 < _list12.Count; ++_i13)
         {
           ColumnOrSuperColumn _elem14 = new ColumnOrSuperColumn();
           _elem14 = new ColumnOrSuperColumn();
           _elem14.Read(iprot);
           this.columns.Add(_elem14);
         }
         iprot.ReadListEnd();
       }
       this.__isset.columns = true;
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       default:
     TProtocolUtil.Skip(iprot, field.Type);
     break;
     }
     iprot.ReadFieldEnd();
       }
       iprot.ReadStructEnd();
 }
 public void Read(TProtocol iprot)
 {
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
       field = iprot.ReadFieldBegin();
       if (field.Type == TType.Stop) {
     break;
       }
       switch (field.ID)
       {
     case 0:
       if (field.Type == TType.List) {
     {
       Success = new List<ColumnOrSuperColumn>();
       TList _list83 = iprot.ReadListBegin();
       for( int _i84 = 0; _i84 < _list83.Count; ++_i84)
       {
         ColumnOrSuperColumn _elem85 = new ColumnOrSuperColumn();
         _elem85 = new ColumnOrSuperColumn();
         _elem85.Read(iprot);
         Success.Add(_elem85);
       }
       iprot.ReadListEnd();
     }
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 1:
       if (field.Type == TType.Struct) {
     Ire = new InvalidRequestException();
     Ire.Read(iprot);
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 2:
       if (field.Type == TType.Struct) {
     Ue = new UnavailableException();
     Ue.Read(iprot);
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 3:
       if (field.Type == TType.Struct) {
     Te = new TimedOutException();
     Te.Read(iprot);
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     default:
       TProtocolUtil.Skip(iprot, field.Type);
       break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }
Example #13
0
 public void Read(TProtocol iprot)
 {
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
       field = iprot.ReadFieldBegin();
       if (field.Type == TType.Stop) {
     break;
       }
       switch (field.ID)
       {
     case 1:
       if (field.Type == TType.String) {
     this.keyspace = iprot.ReadString();
     this.__isset.keyspace = true;
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 2:
       if (field.Type == TType.String) {
     this.key = iprot.ReadString();
     this.__isset.key = true;
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 3:
       if (field.Type == TType.Map) {
     {
       this.cfmap = new Dictionary<string, List<ColumnOrSuperColumn>>();
       TMap _map55 = iprot.ReadMapBegin();
       for( int _i56 = 0; _i56 < _map55.Count; ++_i56)
       {
         string _key57;
         List<ColumnOrSuperColumn> _val58;
         _key57 = iprot.ReadString();
         {
           _val58 = new List<ColumnOrSuperColumn>();
           TList _list59 = iprot.ReadListBegin();
           for( int _i60 = 0; _i60 < _list59.Count; ++_i60)
           {
             ColumnOrSuperColumn _elem61 = new ColumnOrSuperColumn();
             _elem61 = new ColumnOrSuperColumn();
             _elem61.Read(iprot);
             _val58.Add(_elem61);
           }
           iprot.ReadListEnd();
         }
         this.cfmap[_key57] = _val58;
       }
       iprot.ReadMapEnd();
     }
     this.__isset.cfmap = true;
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 4:
       if (field.Type == TType.I32) {
     this.consistency_level = (ConsistencyLevel)iprot.ReadI32();
     this.__isset.consistency_level = true;
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     default:
       TProtocolUtil.Skip(iprot, field.Type);
       break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }
Example #14
0
 public void Read(TProtocol iprot)
 {
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
       field = iprot.ReadFieldBegin();
       if (field.Type == TType.Stop) {
     break;
       }
       switch (field.ID)
       {
     case 0:
       if (field.Type == TType.List) {
     {
       this.success = new List<ColumnOrSuperColumn>();
       TList _list21 = iprot.ReadListBegin();
       for( int _i22 = 0; _i22 < _list21.Count; ++_i22)
       {
         ColumnOrSuperColumn _elem23 = new ColumnOrSuperColumn();
         _elem23 = new ColumnOrSuperColumn();
         _elem23.Read(iprot);
         this.success.Add(_elem23);
       }
       iprot.ReadListEnd();
     }
     this.__isset.success = true;
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 1:
       if (field.Type == TType.Struct) {
     this.ire = new InvalidRequestException();
     this.ire.Read(iprot);
     this.__isset.ire = true;
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 2:
       if (field.Type == TType.Struct) {
     this.ue = new UnavailableException();
     this.ue.Read(iprot);
     this.__isset.ue = true;
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 3:
       if (field.Type == TType.Struct) {
     this.te = new TimedOutException();
     this.te.Read(iprot);
     this.__isset.te = true;
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     default:
       TProtocolUtil.Skip(iprot, field.Type);
       break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }
Example #15
0
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                bool   isset_key     = false;
                bool   isset_columns = false;
                TField field;
                iprot.ReadStructBegin();
                while (true)
                {
                    field = iprot.ReadFieldBegin();
                    if (field.Type == TType.Stop)
                    {
                        break;
                    }
                    switch (field.ID)
                    {
                    case 1:
                        if (field.Type == TType.String)
                        {
                            Key       = iprot.ReadBinary();
                            isset_key = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.List)
                        {
                            {
                                Columns = new List <ColumnOrSuperColumn>();
                                TList _list20 = iprot.ReadListBegin();
                                for (int _i21 = 0; _i21 < _list20.Count; ++_i21)
                                {
                                    ColumnOrSuperColumn _elem22;
                                    _elem22 = new ColumnOrSuperColumn();
                                    _elem22.Read(iprot);
                                    Columns.Add(_elem22);
                                }
                                iprot.ReadListEnd();
                            }
                            isset_columns = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
                if (!isset_key)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Key not set");
                }
                if (!isset_columns)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Columns not set");
                }
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
Example #16
0
 private void buildOut(ColumnOrSuperColumn columnOrSupercolumn)
 {
     Out outResponse = new Out();
     if (columnOrSupercolumn.Column != null)
     {
         outResponse.Column = this.buildAquilesColumn(columnOrSupercolumn.Column);
     }
     if (columnOrSupercolumn.Super_column != null)
     {
         outResponse.SuperColumn = this.buildAquilesSuperColumn(columnOrSupercolumn.Super_column);
     }
     this.Output = outResponse;
 }
Example #17
0
 public void Read(TProtocol iprot)
 {
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
       field = iprot.ReadFieldBegin();
       if (field.Type == TType.Stop) {
     break;
       }
       switch (field.ID)
       {
     case 0:
       if (field.Type == TType.Map) {
     {
       this.success = new Dictionary<string, List<ColumnOrSuperColumn>>();
       TMap _map38 = iprot.ReadMapBegin();
       for( int _i39 = 0; _i39 < _map38.Count; ++_i39)
       {
         string _key40;
         List<ColumnOrSuperColumn> _val41;
         _key40 = iprot.ReadString();
         {
           _val41 = new List<ColumnOrSuperColumn>();
           TList _list42 = iprot.ReadListBegin();
           for( int _i43 = 0; _i43 < _list42.Count; ++_i43)
           {
             ColumnOrSuperColumn _elem44 = new ColumnOrSuperColumn();
             _elem44 = new ColumnOrSuperColumn();
             _elem44.Read(iprot);
             _val41.Add(_elem44);
           }
           iprot.ReadListEnd();
         }
         this.success[_key40] = _val41;
       }
       iprot.ReadMapEnd();
     }
     this.__isset.success = true;
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 1:
       if (field.Type == TType.Struct) {
     this.ire = new InvalidRequestException();
     this.ire.Read(iprot);
     this.__isset.ire = true;
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 2:
       if (field.Type == TType.Struct) {
     this.ue = new UnavailableException();
     this.ue.Read(iprot);
     this.__isset.ue = true;
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 3:
       if (field.Type == TType.Struct) {
     this.te = new TimedOutException();
     this.te.Read(iprot);
     this.__isset.te = true;
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     default:
       TProtocolUtil.Skip(iprot, field.Type);
       break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }
Example #18
0
 public void Read(TProtocol iprot)
 {
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
       field = iprot.ReadFieldBegin();
       if (field.Type == TType.Stop) {
     break;
       }
       switch (field.ID)
       {
     case 0:
       if (field.Type == TType.Map) {
     {
       this.success = new Dictionary<string, ColumnOrSuperColumn>();
       TMap _map29 = iprot.ReadMapBegin();
       for( int _i30 = 0; _i30 < _map29.Count; ++_i30)
       {
         string _key31;
         ColumnOrSuperColumn _val32;
         _key31 = iprot.ReadString();
         _val32 = new ColumnOrSuperColumn();
         _val32.Read(iprot);
         this.success[_key31] = _val32;
       }
       iprot.ReadMapEnd();
     }
     this.__isset.success = true;
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 1:
       if (field.Type == TType.Struct) {
     this.ire = new InvalidRequestException();
     this.ire.Read(iprot);
     this.__isset.ire = true;
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 2:
       if (field.Type == TType.Struct) {
     this.ue = new UnavailableException();
     this.ue.Read(iprot);
     this.__isset.ue = true;
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 3:
       if (field.Type == TType.Struct) {
     this.te = new TimedOutException();
     this.te.Read(iprot);
     this.__isset.te = true;
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     default:
       TProtocolUtil.Skip(iprot, field.Type);
       break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }
 public void Read(TProtocol iprot)
 {
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
       field = iprot.ReadFieldBegin();
       if (field.Type == TType.Stop) {
     break;
       }
       switch (field.ID)
       {
     case 0:
       if (field.Type == TType.Struct) {
     Success = new ColumnOrSuperColumn();
     Success.Read(iprot);
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 1:
       if (field.Type == TType.Struct) {
     Ire = new InvalidRequestException();
     Ire.Read(iprot);
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 2:
       if (field.Type == TType.Struct) {
     Nfe = new NotFoundException();
     Nfe.Read(iprot);
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 3:
       if (field.Type == TType.Struct) {
     Ue = new UnavailableException();
     Ue.Read(iprot);
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 4:
       if (field.Type == TType.Struct) {
     Te = new TimedOutException();
     Te.Read(iprot);
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     default:
       TProtocolUtil.Skip(iprot, field.Type);
       break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }
Example #20
0
 public void Read(TProtocol iprot)
 {
     TField field;
       iprot.ReadStructBegin();
       while (true)
       {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) {
       break;
     }
     switch (field.ID)
     {
       case 1:
     if (field.Type == TType.String) {
       Key = iprot.ReadBinary();
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       case 2:
     if (field.Type == TType.List) {
       {
         Columns = new List<ColumnOrSuperColumn>();
         TList _list16 = iprot.ReadListBegin();
         for( int _i17 = 0; _i17 < _list16.Count; ++_i17)
         {
           ColumnOrSuperColumn _elem18 = new ColumnOrSuperColumn();
           _elem18 = new ColumnOrSuperColumn();
           _elem18.Read(iprot);
           Columns.Add(_elem18);
         }
         iprot.ReadListEnd();
       }
     } else {
       TProtocolUtil.Skip(iprot, field.Type);
     }
     break;
       default:
     TProtocolUtil.Skip(iprot, field.Type);
     break;
     }
     iprot.ReadFieldEnd();
       }
       iprot.ReadStructEnd();
 }
 public void Read(TProtocol iprot)
 {
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
       field = iprot.ReadFieldBegin();
       if (field.Type == TType.Stop) {
     break;
       }
       switch (field.ID)
       {
     case 0:
       if (field.Type == TType.Map) {
     {
       Success = new Dictionary<byte[], List<ColumnOrSuperColumn>>();
       TMap _map91 = iprot.ReadMapBegin();
       for( int _i92 = 0; _i92 < _map91.Count; ++_i92)
       {
         byte[] _key93;
         List<ColumnOrSuperColumn> _val94;
         _key93 = iprot.ReadBinary();
         {
           _val94 = new List<ColumnOrSuperColumn>();
           TList _list95 = iprot.ReadListBegin();
           for( int _i96 = 0; _i96 < _list95.Count; ++_i96)
           {
             ColumnOrSuperColumn _elem97 = new ColumnOrSuperColumn();
             _elem97 = new ColumnOrSuperColumn();
             _elem97.Read(iprot);
             _val94.Add(_elem97);
           }
           iprot.ReadListEnd();
         }
         Success[_key93] = _val94;
       }
       iprot.ReadMapEnd();
     }
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 1:
       if (field.Type == TType.Struct) {
     Ire = new InvalidRequestException();
     Ire.Read(iprot);
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 2:
       if (field.Type == TType.Struct) {
     Ue = new UnavailableException();
     Ue.Read(iprot);
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 3:
       if (field.Type == TType.Struct) {
     Te = new TimedOutException();
     Te.Read(iprot);
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     default:
       TProtocolUtil.Skip(iprot, field.Type);
       break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }
Example #22
0
 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 0:
         if (field.Type == TType.Map) {
           {
             Success = new Dictionary<byte[], List<ColumnOrSuperColumn>>();
             TMap _map103 = iprot.ReadMapBegin();
             for( int _i104 = 0; _i104 < _map103.Count; ++_i104)
             {
               byte[] _key105;
               List<ColumnOrSuperColumn> _val106;
               _key105 = iprot.ReadBinary();
               {
                 _val106 = new List<ColumnOrSuperColumn>();
                 TList _list107 = iprot.ReadListBegin();
                 for( int _i108 = 0; _i108 < _list107.Count; ++_i108)
                 {
                   ColumnOrSuperColumn _elem109 = new ColumnOrSuperColumn();
                   _elem109 = new ColumnOrSuperColumn();
                   _elem109.Read(iprot);
                   _val106.Add(_elem109);
                 }
                 iprot.ReadListEnd();
               }
               Success[_key105] = _val106;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 1:
         if (field.Type == TType.Struct) {
           Ire = new InvalidRequestException();
           Ire.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           Ue = new UnavailableException();
           Ue.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.Struct) {
           Te = new TimedOutException();
           Te.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }