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 PART_ID:
if (field.type == TType.I32) {
this.part_id = iprot.readI32();
this.__isset_part_id = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case EDGE_KEY:
if (field.type == TType.STRUCT) {
this.edge_key = new EdgeKey();
this.edge_key?.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case UPDATED_PROPS:
if (field.type == TType.LIST) {
{
TList _list184 = iprot.readListBegin();
this.updated_props = <UpdatedProp>[];
for (int _i185 = 0; _i185 < _list184.length; ++_i185) {
UpdatedProp _elem186;
_elem186 = new UpdatedProp();
_elem186.read(iprot);
this.updated_props?.add(_elem186);
}
iprot.readListEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case INSERTABLE:
if (field.type == TType.BOOL) {
this.insertable = iprot.readBool();
this.__isset_insertable = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case RETURN_PROPS:
if (field.type == TType.LIST) {
{
TList _list187 = iprot.readListBegin();
this.return_props = <Int8List>[];
for (int _i188 = 0; _i188 < _list187.length; ++_i188) {
Int8List _elem189;
_elem189 = iprot.readBinary();
this.return_props?.add(_elem189);
}
iprot.readListEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case CONDITION:
if (field.type == TType.STRING) {
this.condition = iprot.readBinary();
} 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();
}