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 _map128 = iprot.readMapBegin();
this.parts = new Map<int, List<NewEdge>>();
for (int _i129 = 0; _i129 < _map128.length; ++_i129) {
int _key130;
List<NewEdge> _val131;
_key130 = iprot.readI32();
{
TList _list132 = iprot.readListBegin();
_val131 = <NewEdge>[];
for (int _i133 = 0; _i133 < _list132.length; ++_i133) {
NewEdge _elem134;
_elem134 = new NewEdge();
_elem134.read(iprot);
_val131.add(_elem134);
}
iprot.readListEnd();
}
this.parts?[_key130] = _val131;
}
iprot.readMapEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case PROP_NAMES:
if (field.type == TType.LIST) {
{
TList _list135 = iprot.readListBegin();
this.prop_names = <Int8List>[];
for (int _i136 = 0; _i136 < _list135.length; ++_i136) {
Int8List _elem137;
_elem137 = iprot.readBinary();
this.prop_names?.add(_elem137);
}
iprot.readListEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case IF_NOT_EXISTS:
if (field.type == TType.BOOL) {
this.if_not_exists = iprot.readBool();
this.__isset_if_not_exists = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case IGNORE_EXISTED_INDEX:
if (field.type == TType.BOOL) {
this.ignore_existed_index = iprot.readBool();
this.__isset_ignore_existed_index = true;
} 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();
}