write method
Writes the objects out to the oprot
protocol.
Implementation
write(TProtocol oprot) {
validate();
oprot.writeStructBegin(_STRUCT_DESC);
oprot.writeFieldBegin(_CODE_FIELD_DESC);
oprot.writeI32(this.code);
oprot.writeFieldEnd();
if (this.leader != null) {
oprot.writeFieldBegin(_LEADER_FIELD_DESC);
this.leader?.write(oprot);
oprot.writeFieldEnd();
}
if (this.users != null) {
oprot.writeFieldBegin(_USERS_FIELD_DESC);
{
oprot.writeMapBegin(
new TMap(TType.STRING, TType.STRING, this.users?.length));
for (var elem199 in this.users?.keys ?? <Int8List>[]) {
oprot.writeBinary(elem199);
oprot.writeBinary(this.users?[elem199]);
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}