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 (isSetPtVal()) {
    if (this.ptVal != null) {
      oprot.writeFieldBegin(_PT_VAL_FIELD_DESC);
      this.ptVal?.write(oprot);
      oprot.writeFieldEnd();
    }
  }
  if (isSetLsVal()) {
    if (this.lsVal != null) {
      oprot.writeFieldBegin(_LS_VAL_FIELD_DESC);
      this.lsVal?.write(oprot);
      oprot.writeFieldEnd();
    }
  }
  if (isSetPgVal()) {
    if (this.pgVal != null) {
      oprot.writeFieldBegin(_PG_VAL_FIELD_DESC);
      this.pgVal?.write(oprot);
      oprot.writeFieldEnd();
    }
  }
  oprot.writeFieldStop();
  oprot.writeStructEnd();
}