public void Read (TProtocol iprot)
 {
   bool isset_why = 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) {
           Why = iprot.ReadString();
           isset_why = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_why)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
 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.I32) {
           Acknowledged_by = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Bool) {
           Acknowledged_by_batchlog = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
示例#3
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 3:
         if (field.Type == TType.String) {
           Column_family = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.String) {
           Super_column = iprot.ReadBinary();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
示例#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.String) {
           Key = iprot.ReadBinary();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.I32) {
           Count = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
        private void Fail( TProtocol oprot, TMessage message, TApplicationException.ExceptionType extype, string etxt)
        {
            TApplicationException appex = new TApplicationException( extype, etxt);

            TMessage newMessage = new TMessage(message.Name, TMessageType.Exception, message.SeqID);

            oprot.WriteMessageBegin(newMessage);
            appex.Write( oprot);
            oprot.WriteMessageEnd();
            oprot.Transport.Flush();
        }
示例#6
0
 public void Read (TProtocol iprot)
 {
   bool isset_name = false;
   bool isset_options = 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) {
           Name = iprot.ReadString();
           isset_name = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Map) {
           {
             Options = new Dictionary<string, string>();
             TMap _map50 = iprot.ReadMapBegin();
             for( int _i51 = 0; _i51 < _map50.Count; ++_i51)
             {
               string _key52;
               string _val53;
               _key52 = iprot.ReadString();
               _val53 = iprot.ReadString();
               Options[_key52] = _val53;
             }
             iprot.ReadMapEnd();
           }
           isset_options = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_name)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_options)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
 public void Read (TProtocol iprot)
 {
   bool isset_name = 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) {
           Name = iprot.ReadBinary();
           isset_name = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.List) {
           {
             Columns = new List<CounterColumn>();
             TList _list4 = iprot.ReadListBegin();
             for( int _i5 = 0; _i5 < _list4.Count; ++_i5)
             {
               CounterColumn _elem6 = new CounterColumn();
               _elem6 = new CounterColumn();
               _elem6.Read(iprot);
               Columns.Add(_elem6);
             }
             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_name)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_columns)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
示例#8
0
 public void Read (TProtocol iprot)
 {
   bool isset_start_token = false;
   bool isset_end_token = false;
   bool isset_row_count = 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) {
           Start_token = iprot.ReadString();
           isset_start_token = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           End_token = iprot.ReadString();
           isset_end_token = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.I64) {
           Row_count = iprot.ReadI64();
           isset_row_count = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_start_token)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_end_token)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_row_count)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
示例#9
0
 public void Read (TProtocol iprot)
 {
   bool isset_column_name = false;
   bool isset_op = false;
   bool isset_value = 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) {
           Column_name = iprot.ReadBinary();
           isset_column_name = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.I32) {
           Op = (IndexOperator)iprot.ReadI32();
           isset_op = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.String) {
           Value = iprot.ReadBinary();
           isset_value = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_column_name)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_op)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
   if (!isset_value)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
示例#10
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.List) {
           {
             Expressions = new List<IndexExpression>();
             TList _list12 = iprot.ReadListBegin();
             for( int _i13 = 0; _i13 < _list12.Count; ++_i13)
             {
               IndexExpression _elem14 = new IndexExpression();
               _elem14 = new IndexExpression();
               _elem14.Read(iprot);
               Expressions.Add(_elem14);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           Start_key = iprot.ReadBinary();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.I32) {
           Count = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("AuthenticationException");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   field.Name = "why";
   field.Type = TType.String;
   field.ID = 1;
   oprot.WriteFieldBegin(field);
   oprot.WriteString(Why);
   oprot.WriteFieldEnd();
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
		public static TApplicationException Read(TProtocol iprot)
		{
			TField field;

			string message = null;
			ExceptionType type = ExceptionType.Unknown;

			iprot.ReadStructBegin();
			while (true)
			{
				field = iprot.ReadFieldBegin();
				if (field.Type == TType.Stop)
				{
					break;
				}

				switch (field.ID)
				{
					case 1:
						if (field.Type == TType.String)
						{
							message = iprot.ReadString();
						}
						else
						{
							TProtocolUtil.Skip(iprot, field.Type);
						}
						break;
					case 2:
						if (field.Type == TType.I32)
						{
							type = (ExceptionType)iprot.ReadI32();
						}
						else
						{
							TProtocolUtil.Skip(iprot, field.Type);
						}
						break;
					default:
						TProtocolUtil.Skip(iprot, field.Type);
						break;
				}

				iprot.ReadFieldEnd();
			}

			iprot.ReadStructEnd();

			return new TApplicationException(type, message);
		}
示例#13
0
 public void Read (TProtocol iprot)
 {
   bool isset_success = 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.Bool) {
           Success = iprot.ReadBool();
           isset_success = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.List) {
           {
             Current_values = new List<Column>();
             TList _list24 = iprot.ReadListBegin();
             for( int _i25 = 0; _i25 < _list24.Count; ++_i25)
             {
               Column _elem26 = new Column();
               _elem26 = new Column();
               _elem26.Read(iprot);
               Current_values.Add(_elem26);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_success)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("InvalidRequestException");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (Why != null && __isset.why) {
     field.Name = "why";
     field.Type = TType.String;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Why);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
示例#15
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.List) {
           {
             Column_names = new List<byte[]>();
             TList _list8 = iprot.ReadListBegin();
             for( int _i9 = 0; _i9 < _list8.Count; ++_i9)
             {
               byte[] _elem10 = null;
               _elem10 = iprot.ReadBinary();
               Column_names.Add(_elem10);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           Slice_range = new SliceRange();
           Slice_range.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
示例#16
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();
 }
示例#17
0
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("KeyCount");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   field.Name = "key";
   field.Type = TType.String;
   field.ID = 1;
   oprot.WriteFieldBegin(field);
   oprot.WriteBinary(Key);
   oprot.WriteFieldEnd();
   field.Name = "count";
   field.Type = TType.I32;
   field.ID = 2;
   oprot.WriteFieldBegin(field);
   oprot.WriteI32(Count);
   oprot.WriteFieldEnd();
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
 public void Read (TProtocol iprot)
 {
   bool isset_credentials = 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.Map) {
           {
             Credentials = new Dictionary<string, string>();
             TMap _map40 = iprot.ReadMapBegin();
             for( int _i41 = 0; _i41 < _map40.Count; ++_i41)
             {
               string _key42;
               string _val43;
               _key42 = iprot.ReadString();
               _val43 = iprot.ReadString();
               Credentials[_key42] = _val43;
             }
             iprot.ReadMapEnd();
           }
           isset_credentials = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_credentials)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
示例#19
0
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("CounterColumn");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   field.Name = "name";
   field.Type = TType.String;
   field.ID = 1;
   oprot.WriteFieldBegin(field);
   oprot.WriteBinary(Name);
   oprot.WriteFieldEnd();
   field.Name = "value";
   field.Type = TType.I64;
   field.ID = 2;
   oprot.WriteFieldBegin(field);
   oprot.WriteI64(Value);
   oprot.WriteFieldEnd();
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
示例#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.I64) {
           Timestamp = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           Super_column = iprot.ReadBinary();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.Struct) {
           Predicate = new SlicePredicate();
           Predicate.Read(iprot);
         } 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)
     {
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
示例#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 1:
         if (field.Type == TType.String) {
           Start_token = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           End_token = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.I64) {
           Row_count = iprot.ReadI64();
         } 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 1:
         if (field.Type == TType.String) {
           Host = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           Datacenter = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.String) {
           Rack = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("AuthenticationRequest");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   field.Name = "credentials";
   field.Type = TType.Map;
   field.ID = 1;
   oprot.WriteFieldBegin(field);
   {
     oprot.WriteMapBegin(new TMap(TType.String, TType.String, Credentials.Count));
     foreach (string _iter44 in Credentials.Keys)
     {
       oprot.WriteString(_iter44);
       oprot.WriteString(Credentials[_iter44]);
     }
     oprot.WriteMapEnd();
   }
   oprot.WriteFieldEnd();
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
 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.Map) {
           {
             Credentials = new Dictionary<string, string>();
             TMap _map36 = iprot.ReadMapBegin();
             for( int _i37 = 0; _i37 < _map36.Count; ++_i37)
             {
               string _key38;
               string _val39;
               _key38 = iprot.ReadString();
               _val39 = iprot.ReadString();
               Credentials[_key38] = _val39;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
示例#26
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();
 }
 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.I32) {
           ItemId = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.I32) {
           Count = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.List) {
           {
             Variable_types = new List<string>();
             TList _list87 = iprot.ReadListBegin();
             for( int _i88 = 0; _i88 < _list87.Count; ++_i88)
             {
               string _elem89 = null;
               _elem89 = iprot.ReadString();
               Variable_types.Add(_elem89);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.List) {
           {
             Variable_names = new List<string>();
             TList _list90 = iprot.ReadListBegin();
             for( int _i91 = 0; _i91 < _list90.Count; ++_i91)
             {
               string _elem92 = null;
               _elem92 = iprot.ReadString();
               Variable_names.Add(_elem92);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("CqlPreparedResult");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (__isset.itemId) {
     field.Name = "itemId";
     field.Type = TType.I32;
     field.ID = 1;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(ItemId);
     oprot.WriteFieldEnd();
   }
   if (__isset.count) {
     field.Name = "count";
     field.Type = TType.I32;
     field.ID = 2;
     oprot.WriteFieldBegin(field);
     oprot.WriteI32(Count);
     oprot.WriteFieldEnd();
   }
   if (Variable_types != null && __isset.variable_types) {
     field.Name = "variable_types";
     field.Type = TType.List;
     field.ID = 3;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteListBegin(new TList(TType.String, Variable_types.Count));
       foreach (string _iter93 in Variable_types)
       {
         oprot.WriteString(_iter93);
       }
       oprot.WriteListEnd();
     }
     oprot.WriteFieldEnd();
   }
   if (Variable_names != null && __isset.variable_names) {
     field.Name = "variable_names";
     field.Type = TType.List;
     field.ID = 4;
     oprot.WriteFieldBegin(field);
     {
       oprot.WriteListBegin(new TList(TType.String, Variable_names.Count));
       foreach (string _iter94 in Variable_names)
       {
         oprot.WriteString(_iter94);
       }
       oprot.WriteListEnd();
     }
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
示例#29
0
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("ColumnPath");
   oprot.WriteStructBegin(struc);
   TField field = new TField();
   if (Column_family != null && __isset.column_family) {
     field.Name = "column_family";
     field.Type = TType.String;
     field.ID = 3;
     oprot.WriteFieldBegin(field);
     oprot.WriteString(Column_family);
     oprot.WriteFieldEnd();
   }
   if (Super_column != null && __isset.super_column) {
     field.Name = "super_column";
     field.Type = TType.String;
     field.ID = 4;
     oprot.WriteFieldBegin(field);
     oprot.WriteBinary(Super_column);
     oprot.WriteFieldEnd();
   }
   if (Column != null && __isset.column) {
     field.Name = "column";
     field.Type = TType.String;
     field.ID = 5;
     oprot.WriteFieldBegin(field);
     oprot.WriteBinary(Column);
     oprot.WriteFieldEnd();
   }
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }
 public void Write(TProtocol oprot) {
   TStruct struc = new TStruct("UnavailableException");
   oprot.WriteStructBegin(struc);
   oprot.WriteFieldStop();
   oprot.WriteStructEnd();
 }