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 ZONE_NAME:
if (field.type == TType.STRING) {
this.zone_name = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case ZONE_ITEMS:
if (field.type == TType.MAP) {
{
TMap _map232 = iprot.readMapBegin();
this.zone_items = new Map<Int8List, List<t_nebula.HostAddr>>();
for (int _i233 = 0; _i233 < _map232.length; ++_i233) {
Int8List _key234;
List<t_nebula.HostAddr> _val235;
_key234 = iprot.readBinary();
{
TList _list236 = iprot.readListBegin();
_val235 = <t_nebula.HostAddr>[];
for (int _i237 = 0; _i237 < _list236.length; ++_i237) {
t_nebula.HostAddr _elem238;
_elem238 = new t_nebula.HostAddr();
_elem238.read(iprot);
_val235.add(_elem238);
}
iprot.readListEnd();
}
this.zone_items?[_key234] = _val235;
}
iprot.readMapEnd();
}
} 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();
}