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.contexts != null) {
    oprot.writeFieldBegin(_CONTEXTS_FIELD_DESC);
    {
      oprot.writeListBegin(new TList(TType.STRUCT, this.contexts?.length));
      for (var elem199 in this.contexts ?? []) {
        elem199.write(oprot);
      }
      oprot.writeListEnd();
    }
    oprot.writeFieldEnd();
  }
  if (this.schema_id != null) {
    oprot.writeFieldBegin(_SCHEMA_ID_FIELD_DESC);
    this.schema_id?.write(oprot);
    oprot.writeFieldEnd();
  }
  oprot.writeFieldStop();
  oprot.writeStructEnd();
}