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(_SPACE_ID_FIELD_DESC);
  oprot.writeI32(this.space_id);
  oprot.writeFieldEnd();
  if (isSetParts()) {
    if (this.parts != null) {
      oprot.writeFieldBegin(_PARTS_FIELD_DESC);
      {
        oprot.writeListBegin(new TList(TType.I32, this.parts?.length));
        for (var elem252 in this.parts ?? []) {
          oprot.writeI32(elem252);
        }
        oprot.writeListEnd();
      }
      oprot.writeFieldEnd();
    }
  }
  if (isSetTask_specific_paras()) {
    if (this.task_specific_paras != null) {
      oprot.writeFieldBegin(_TASK_SPECIFIC_PARAS_FIELD_DESC);
      {
        oprot.writeListBegin(
            new TList(TType.STRING, this.task_specific_paras?.length));
        for (var elem253 in this.task_specific_paras ?? []) {
          oprot.writeBinary(elem253);
        }
        oprot.writeListEnd();
      }
      oprot.writeFieldEnd();
    }
  }
  oprot.writeFieldStop();
  oprot.writeStructEnd();
}