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.removed_session_ids != null) {
oprot.writeFieldBegin(_REMOVED_SESSION_IDS_FIELD_DESC);
{
oprot.writeListBegin(
new TList(TType.I64, this.removed_session_ids?.length));
for (var elem381 in this.removed_session_ids ?? []) {
oprot.writeI64(elem381);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}