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(_TYPE_FIELD_DESC);
  oprot.writeI32(this.type);
  oprot.writeFieldEnd();
  if (this.clients != null) {
    oprot.writeFieldBegin(_CLIENTS_FIELD_DESC);
    {
      oprot.writeListBegin(new TList(TType.STRUCT, this.clients?.length));
      for (var elem317 in this.clients ?? []) {
        elem317.write(oprot);
      }
      oprot.writeListEnd();
    }
    oprot.writeFieldEnd();
  }
  oprot.writeFieldStop();
  oprot.writeStructEnd();
}