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 DST:
if (field.type == TType.STRUCT) {
this.dst = new Vertex();
this.dst?.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case TYPE:
if (field.type == TType.I32) {
this.type = iprot.readI32();
this.__isset_type = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case NAME:
if (field.type == TType.STRING) {
this.name = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case RANKING:
if (field.type == TType.I64) {
this.ranking = iprot.readI64();
this.__isset_ranking = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case PROPS:
if (field.type == TType.MAP) {
{
TMap _map54 = iprot.readMapBegin();
this.props = new Map<Int8List, Value>();
for (int _i55 = 0; _i55 < _map54.length; ++_i55) {
Int8List _key56;
Value _val57;
_key56 = iprot.readBinary();
_val57 = new Value();
_val57.read(iprot);
this.props?[_key56] = _val57;
}
iprot.readMapEnd();
}
} 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();
}