public void Read (TProtocol iprot) { bool isset_column_parent = false; bool isset_index_clause = false; bool isset_column_predicate = false; bool isset_consistency_level = 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.Struct) { Column_parent = new ColumnParent(); Column_parent.Read(iprot); isset_column_parent = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Struct) { Index_clause = new IndexClause(); Index_clause.Read(iprot); isset_index_clause = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Struct) { Column_predicate = new SlicePredicate(); Column_predicate.Read(iprot); isset_column_predicate = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.I32) { Consistency_level = (ConsistencyLevel)iprot.ReadI32(); isset_consistency_level = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); if (!isset_column_parent) throw new TProtocolException(TProtocolException.INVALID_DATA); if (!isset_index_clause) throw new TProtocolException(TProtocolException.INVALID_DATA); if (!isset_column_predicate) throw new TProtocolException(TProtocolException.INVALID_DATA); if (!isset_consistency_level) 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.Struct) { Column_parent = new ColumnParent(); Column_parent.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Struct) { Index_clause = new IndexClause(); Index_clause.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Struct) { Column_predicate = new SlicePredicate(); Column_predicate.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.I32) { Consistency_level = (ConsistencyLevel)iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }