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.sessions != null) {
    oprot.writeFieldBegin(_SESSIONS_FIELD_DESC);
    {
      oprot.writeListBegin(new TList(TType.STRUCT, this.sessions?.length));
      for (var elem353 in this.sessions ?? <Session>[]) {
        elem353.write(oprot);
      }
      oprot.writeListEnd();
    }
    oprot.writeFieldEnd();
  }
  oprot.writeFieldStop();
  oprot.writeStructEnd();
}