read method
Reads the TObject from the given input protocol.
Implementation
read(TProtocol iprot) {
TField field;
iprot.readStructBegin();
while (true) {
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case INDEX_ID:
if (field.type == TType.I32) {
this.index_id = iprot.readI32();
this.__isset_index_id = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case FILTER:
if (field.type == TType.STRING) {
this.filter = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case COLUMN_HINTS:
if (field.type == TType.LIST) {
{
TList _list192 = iprot.readListBegin();
this.column_hints = <IndexColumnHint>[];
for (int _i193 = 0; _i193 < _list192.length; ++_i193) {
IndexColumnHint _elem194;
_elem194 = new IndexColumnHint();
_elem194.read(iprot);
this.column_hints?.add(_elem194);
}
iprot.readListEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}