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 ID:
if (field.type == TType.STRUCT) {
this.id = new t_nebula.Value();
this.id?.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case TAGS:
if (field.type == TType.LIST) {
{
TList _list100 = iprot.readListBegin();
this.tags = <NewTag>[];
for (int _i101 = 0; _i101 < _list100.length; ++_i101) {
NewTag _elem102;
_elem102 = new NewTag();
_elem102.read(iprot);
this.tags?.add(_elem102);
}
iprot.readListEnd();
}
} 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();
}