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 (isSetError_msg()) {
if (this.error_msg != null) {
oprot.writeFieldBegin(_ERROR_MSG_FIELD_DESC);
oprot.writeBinary(this.error_msg);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}