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 _map108 = iprot.readMapBegin();
this.parts = new Map<int, List<NewVertex>>();
for (int _i109 = 0; _i109 < _map108.length; ++_i109) {
int _key110;
List<NewVertex> _val111;
_key110 = iprot.readI32();
{
TList _list112 = iprot.readListBegin();
_val111 = <NewVertex>[];
for (int _i113 = 0; _i113 < _list112.length; ++_i113) {
NewVertex _elem114;
_elem114 = new NewVertex();
_elem114.read(iprot);
_val111.add(_elem114);
}
iprot.readListEnd();
}
this.parts?[_key110] = _val111;
}
iprot.readMapEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case PROP_NAMES:
if (field.type == TType.MAP) {
{
TMap _map115 = iprot.readMapBegin();
this.prop_names = new Map<int, List<Int8List>>();
for (int _i116 = 0; _i116 < _map115.length; ++_i116) {
int _key117;
List<Int8List> _val118;
_key117 = iprot.readI32();
{
TList _list119 = iprot.readListBegin();
_val118 = <Int8List>[];
for (int _i120 = 0; _i120 < _list119.length; ++_i120) {
Int8List _elem121;
_elem121 = iprot.readBinary();
_val118.add(_elem121);
}
iprot.readListEnd();
}
this.prop_names?[_key117] = _val118;
}
iprot.readMapEnd();
}
} 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();
}