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);
  oprot.writeFieldBegin(_SPACE_ID_FIELD_DESC);
  oprot.writeI32(this.space_id);
  oprot.writeFieldEnd();
  oprot.writeFieldBegin(_PART_ID_FIELD_DESC);
  oprot.writeI32(this.part_id);
  oprot.writeFieldEnd();
  if (this.name != null) {
    oprot.writeFieldBegin(_NAME_FIELD_DESC);
    oprot.writeBinary(this.name);
    oprot.writeFieldEnd();
  }
  if (isSetCommon()) {
    if (this.common != null) {
      oprot.writeFieldBegin(_COMMON_FIELD_DESC);
      this.common?.write(oprot);
      oprot.writeFieldEnd();
    }
  }
  oprot.writeFieldStop();
  oprot.writeStructEnd();
}