write method

void write(
  1. TProtocol oprot
)
override

Writes the objects out to the oprot protocol.

Implementation

write(TProtocol oprot) {
  validate();

  oprot.writeStructBegin(_STRUCT_DESC);
  if (this.result != null) {
    oprot.writeFieldBegin(_RESULT_FIELD_DESC);
    this.result?.write(oprot);
    oprot.writeFieldEnd();
  }
  if (isSetData()) {
    if (this.data != null) {
      oprot.writeFieldBegin(_DATA_FIELD_DESC);
      this.data?.write(oprot);
      oprot.writeFieldEnd();
    }
  }
  if (isSetStat_data()) {
    if (this.stat_data != null) {
      oprot.writeFieldBegin(_STAT_DATA_FIELD_DESC);
      this.stat_data?.write(oprot);
      oprot.writeFieldEnd();
    }
  }
  oprot.writeFieldStop();
  oprot.writeStructEnd();
}