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 Read (TProtocol iprot) { bool isset_start = false; bool isset_finish = false; bool isset_reversed = false; bool isset_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 = iprot.ReadBinary(); isset_start = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.String) { Finish = iprot.ReadBinary(); isset_finish = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Bool) { Reversed = iprot.ReadBool(); isset_reversed = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.I32) { Count = iprot.ReadI32(); isset_count = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); if (!isset_start) throw new TProtocolException(TProtocolException.INVALID_DATA); if (!isset_finish) throw new TProtocolException(TProtocolException.INVALID_DATA); if (!isset_reversed) throw new TProtocolException(TProtocolException.INVALID_DATA); if (!isset_count) throw new TProtocolException(TProtocolException.INVALID_DATA); }
public static void Skip(TProtocol prot, TType type) { switch (type) { case TType.Bool: prot.ReadBool(); break; case TType.Byte: prot.ReadByte(); break; case TType.I16: prot.ReadI16(); break; case TType.I32: prot.ReadI32(); break; case TType.I64: prot.ReadI64(); break; case TType.Double: prot.ReadDouble(); break; case TType.String: // Don't try to decode the string, just skip it. prot.ReadBinary(); break; case TType.Struct: prot.ReadStructBegin(); while (true) { TField field = prot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } Skip(prot, field.Type); prot.ReadFieldEnd(); } prot.ReadStructEnd(); break; case TType.Map: TMap map = prot.ReadMapBegin(); for (int i = 0; i < map.Count; i++) { Skip(prot, map.KeyType); Skip(prot, map.ValueType); } prot.ReadMapEnd(); break; case TType.Set: TSet set = prot.ReadSetBegin(); for (int i = 0; i < set.Count; i++) { Skip(prot, set.ElementType); } prot.ReadSetEnd(); break; case TType.List: TList list = prot.ReadListBegin(); for (int i = 0; i < list.Count; i++) { Skip(prot, list.ElementType); } prot.ReadListEnd(); break; } }
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) { Keyspace = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.String) { Name = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.String) { Column_type = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.String) { Comparator_type = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.String) { Subcomparator_type = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.String) { Comment = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 12: if (field.Type == TType.Double) { Read_repair_chance = iprot.ReadDouble(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 13: if (field.Type == TType.List) { { Column_metadata = new List<ColumnDef>(); TList _list46 = iprot.ReadListBegin(); for( int _i47 = 0; _i47 < _list46.Count; ++_i47) { ColumnDef _elem48 = new ColumnDef(); _elem48 = new ColumnDef(); _elem48.Read(iprot); Column_metadata.Add(_elem48); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 14: if (field.Type == TType.I32) { Gc_grace_seconds = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 15: if (field.Type == TType.String) { Default_validation_class = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 16: if (field.Type == TType.I32) { Id = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 17: if (field.Type == TType.I32) { Min_compaction_threshold = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 18: if (field.Type == TType.I32) { Max_compaction_threshold = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 24: if (field.Type == TType.Bool) { Replicate_on_write = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 26: if (field.Type == TType.String) { Key_validation_class = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 28: if (field.Type == TType.String) { Key_alias = iprot.ReadBinary(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 29: if (field.Type == TType.String) { Compaction_strategy = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 30: if (field.Type == TType.Map) { { Compaction_strategy_options = new Dictionary<string, string>(); TMap _map49 = iprot.ReadMapBegin(); for( int _i50 = 0; _i50 < _map49.Count; ++_i50) { string _key51; string _val52; _key51 = iprot.ReadString(); _val52 = iprot.ReadString(); Compaction_strategy_options[_key51] = _val52; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 32: if (field.Type == TType.Map) { { Compression_options = new Dictionary<string, string>(); TMap _map53 = iprot.ReadMapBegin(); for( int _i54 = 0; _i54 < _map53.Count; ++_i54) { string _key55; string _val56; _key55 = iprot.ReadString(); _val56 = iprot.ReadString(); Compression_options[_key55] = _val56; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 33: if (field.Type == TType.Double) { Bloom_filter_fp_chance = iprot.ReadDouble(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 34: if (field.Type == TType.String) { Caching = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 37: if (field.Type == TType.Double) { Dclocal_read_repair_chance = iprot.ReadDouble(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.Double) { Row_cache_size = iprot.ReadDouble(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 11: if (field.Type == TType.Double) { Key_cache_size = iprot.ReadDouble(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 19: if (field.Type == TType.I32) { Row_cache_save_period_in_seconds = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 20: if (field.Type == TType.I32) { Key_cache_save_period_in_seconds = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 21: if (field.Type == TType.I32) { Memtable_flush_after_mins = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 22: if (field.Type == TType.I32) { Memtable_throughput_in_mb = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 23: if (field.Type == TType.Double) { Memtable_operations_in_millions = iprot.ReadDouble(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 25: if (field.Type == TType.Double) { Merge_shards_chance = iprot.ReadDouble(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 27: if (field.Type == TType.String) { Row_cache_provider = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 31: if (field.Type == TType.I32) { Row_cache_keys_to_save = iprot.ReadI32(); } 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) { Start = iprot.ReadBinary(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.String) { Finish = iprot.ReadBinary(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Bool) { Reversed = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: 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 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) { Name = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.String) { Strategy_class = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Map) { { Strategy_options = new Dictionary<string, string>(); TMap _map60 = iprot.ReadMapBegin(); for( int _i61 = 0; _i61 < _map60.Count; ++_i61) { string _key62; string _val63; _key62 = iprot.ReadString(); _val63 = iprot.ReadString(); Strategy_options[_key62] = _val63; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.I32) { Replication_factor = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.List) { { Cf_defs = new List<CfDef>(); TList _list64 = iprot.ReadListBegin(); for( int _i65 = 0; _i65 < _list64.Count; ++_i65) { CfDef _elem66 = new CfDef(); _elem66 = new CfDef(); _elem66.Read(iprot); Cf_defs.Add(_elem66); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.Bool) { Durable_writes = iprot.ReadBool(); } 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) { 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; case 3: if (field.Type == TType.Bool) { Paxos_in_progress = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public void Read (TProtocol iprot) { bool isset_name = false; bool isset_strategy_class = false; bool isset_cf_defs = 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.String) { Strategy_class = iprot.ReadString(); isset_strategy_class = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Map) { { Strategy_options = new Dictionary<string, string>(); TMap _map73 = iprot.ReadMapBegin(); for( int _i74 = 0; _i74 < _map73.Count; ++_i74) { string _key75; string _val76; _key75 = iprot.ReadString(); _val76 = iprot.ReadString(); Strategy_options[_key75] = _val76; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.I32) { Replication_factor = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.List) { { Cf_defs = new List<CfDef>(); TList _list77 = iprot.ReadListBegin(); for( int _i78 = 0; _i78 < _list77.Count; ++_i78) { CfDef _elem79 = new CfDef(); _elem79 = new CfDef(); _elem79.Read(iprot); Cf_defs.Add(_elem79); } iprot.ReadListEnd(); } isset_cf_defs = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.Bool) { Durable_writes = iprot.ReadBool(); } 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_strategy_class) throw new TProtocolException(TProtocolException.INVALID_DATA); if (!isset_cf_defs) throw new TProtocolException(TProtocolException.INVALID_DATA); }
public void Read (TProtocol iprot) { bool isset_keyspace = false; bool isset_name = 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) { Keyspace = iprot.ReadString(); isset_keyspace = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.String) { Name = iprot.ReadString(); isset_name = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.String) { Column_type = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.String) { Comparator_type = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.String) { Subcomparator_type = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.String) { Comment = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 12: if (field.Type == TType.Double) { Read_repair_chance = iprot.ReadDouble(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 13: if (field.Type == TType.List) { { Column_metadata = new List<ColumnDef>(); TList _list55 = iprot.ReadListBegin(); for( int _i56 = 0; _i56 < _list55.Count; ++_i56) { ColumnDef _elem57 = new ColumnDef(); _elem57 = new ColumnDef(); _elem57.Read(iprot); Column_metadata.Add(_elem57); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 14: if (field.Type == TType.I32) { Gc_grace_seconds = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 15: if (field.Type == TType.String) { Default_validation_class = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 16: if (field.Type == TType.I32) { Id = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 17: if (field.Type == TType.I32) { Min_compaction_threshold = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 18: if (field.Type == TType.I32) { Max_compaction_threshold = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 24: if (field.Type == TType.Bool) { Replicate_on_write = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 26: if (field.Type == TType.String) { Key_validation_class = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 28: if (field.Type == TType.String) { Key_alias = iprot.ReadBinary(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 29: if (field.Type == TType.String) { Compaction_strategy = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 30: if (field.Type == TType.Map) { { Compaction_strategy_options = new Dictionary<string, string>(); TMap _map58 = iprot.ReadMapBegin(); for( int _i59 = 0; _i59 < _map58.Count; ++_i59) { string _key60; string _val61; _key60 = iprot.ReadString(); _val61 = iprot.ReadString(); Compaction_strategy_options[_key60] = _val61; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 32: if (field.Type == TType.Map) { { Compression_options = new Dictionary<string, string>(); TMap _map62 = iprot.ReadMapBegin(); for( int _i63 = 0; _i63 < _map62.Count; ++_i63) { string _key64; string _val65; _key64 = iprot.ReadString(); _val65 = iprot.ReadString(); Compression_options[_key64] = _val65; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 33: if (field.Type == TType.Double) { Bloom_filter_fp_chance = iprot.ReadDouble(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 34: if (field.Type == TType.String) { Caching = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 37: if (field.Type == TType.Double) { Dclocal_read_repair_chance = iprot.ReadDouble(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 38: if (field.Type == TType.Bool) { Populate_io_cache_on_flush = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 39: if (field.Type == TType.I32) { Memtable_flush_period_in_ms = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 40: if (field.Type == TType.I32) { Default_time_to_live = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 41: if (field.Type == TType.I32) { Index_interval = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 42: if (field.Type == TType.String) { Speculative_retry = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 43: if (field.Type == TType.List) { { Triggers = new List<TriggerDef>(); TList _list66 = iprot.ReadListBegin(); for( int _i67 = 0; _i67 < _list66.Count; ++_i67) { TriggerDef _elem68 = new TriggerDef(); _elem68 = new TriggerDef(); _elem68.Read(iprot); Triggers.Add(_elem68); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.Double) { Row_cache_size = iprot.ReadDouble(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 11: if (field.Type == TType.Double) { Key_cache_size = iprot.ReadDouble(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 19: if (field.Type == TType.I32) { Row_cache_save_period_in_seconds = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 20: if (field.Type == TType.I32) { Key_cache_save_period_in_seconds = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 21: if (field.Type == TType.I32) { Memtable_flush_after_mins = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 22: if (field.Type == TType.I32) { Memtable_throughput_in_mb = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 23: if (field.Type == TType.Double) { Memtable_operations_in_millions = iprot.ReadDouble(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 25: if (field.Type == TType.Double) { Merge_shards_chance = iprot.ReadDouble(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 27: if (field.Type == TType.String) { Row_cache_provider = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 31: if (field.Type == TType.I32) { Row_cache_keys_to_save = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); if (!isset_keyspace) throw new TProtocolException(TProtocolException.INVALID_DATA); if (!isset_name) throw new TProtocolException(TProtocolException.INVALID_DATA); }