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.name != null) {
    oprot.writeFieldBegin(_NAME_FIELD_DESC);
    oprot.writeBinary(this.name);
    oprot.writeFieldEnd();
  }
  if (isSetType_length()) {
    oprot.writeFieldBegin(_TYPE_LENGTH_FIELD_DESC);
    oprot.writeI16(this.type_length);
    oprot.writeFieldEnd();
  }
  oprot.writeFieldStop();
  oprot.writeStructEnd();
}