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 PARTS:
if (field.type == TType.MAP) {
{
TMap _map346 = iprot.readMapBegin();
this.parts = new Map<int, List<EdgeKey>>();
for (int _i347 = 0; _i347 < _map346.length; ++_i347) {
int _key348;
List<EdgeKey> _val349;
_key348 = iprot.readI32();
{
TList _list350 = iprot.readListBegin();
_val349 = <EdgeKey>[];
for (int _i351 = 0; _i351 < _list350.length; ++_i351) {
EdgeKey _elem352;
_elem352 = new EdgeKey();
_elem352.read(iprot);
_val349.add(_elem352);
}
iprot.readListEnd();
}
this.parts?[_key348] = _val349;
}
iprot.readMapEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case TXN_ID:
if (field.type == TType.STRING) {
this.txn_id = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case TERM:
if (field.type == TType.I64) {
this.term = iprot.readI64();
this.__isset_term = true;
} 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();
}