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 _map68 = iprot.readMapBegin();
this.parts = new Map<int, LogInfo>();
for (int _i69 = 0; _i69 < _map68.length; ++_i69) {
int _key70;
LogInfo _val71;
_key70 = iprot.readI32();
_val71 = new LogInfo();
_val71.read(iprot);
this.parts?[_key70] = _val71;
}
iprot.readMapEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case DATA_PATH:
if (field.type == TType.STRING) {
this.data_path = iprot.readBinary();
} 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();
}