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 SPACE_ID:
if (field.type == TType.I32) {
this.space_id = iprot.readI32();
this.__isset_space_id = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case COLUMN_NAMES:
if (field.type == TType.LIST) {
{
TList _list42 = iprot.readListBegin();
this.column_names = <Int8List>[];
for (int _i43 = 0; _i43 < _list42.length; ++_i43) {
Int8List _elem44;
_elem44 = iprot.readBinary();
this.column_names?.add(_elem44);
}
iprot.readListEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case PARTS:
if (field.type == TType.MAP) {
{
TMap _map45 = iprot.readMapBegin();
this.parts = new Map<int, List<t_nebula.Value>>();
for (int _i46 = 0; _i46 < _map45.length; ++_i46) {
int _key47;
List<t_nebula.Value> _val48;
_key47 = iprot.readI32();
{
TList _list49 = iprot.readListBegin();
_val48 = <t_nebula.Value>[];
for (int _i50 = 0; _i50 < _list49.length; ++_i50) {
t_nebula.Value _elem51;
_elem51 = new t_nebula.Value();
_elem51.read(iprot);
_val48.add(_elem51);
}
iprot.readListEnd();
}
this.parts?[_key47] = _val48;
}
iprot.readMapEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case TRAVERSE_SPEC:
if (field.type == TType.STRUCT) {
this.traverse_spec = new TraverseSpec();
this.traverse_spec?.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case COMMON:
if (field.type == TType.STRUCT) {
this.common = new RequestCommon();
this.common?.read(iprot);
} 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();
}