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 (this.parts != null) {
    oprot.writeFieldBegin(_PARTS_FIELD_DESC);
    {
      oprot.writeListBegin(new TList(TType.I32, this.parts?.length));
      for (var elem212 in this.parts ?? []) {
        oprot.writeI32(elem212);
      }
      oprot.writeListEnd();
    }
    oprot.writeFieldEnd();
  }
  if (this.indices != null) {
    oprot.writeFieldBegin(_INDICES_FIELD_DESC);
    this.indices?.write(oprot);
    oprot.writeFieldEnd();
  }
  if (isSetReturn_columns()) {
    if (this.return_columns != null) {
      oprot.writeFieldBegin(_RETURN_COLUMNS_FIELD_DESC);
      {
        oprot.writeListBegin(
            new TList(TType.STRING, this.return_columns?.length));
        for (var elem213 in this.return_columns ?? []) {
          oprot.writeBinary(elem213);
        }
        oprot.writeListEnd();
      }
      oprot.writeFieldEnd();
    }
  }
  if (isSetCommon()) {
    if (this.common != null) {
      oprot.writeFieldBegin(_COMMON_FIELD_DESC);
      this.common?.write(oprot);
      oprot.writeFieldEnd();
    }
  }
  if (isSetLimit()) {
    oprot.writeFieldBegin(_LIMIT_FIELD_DESC);
    oprot.writeI64(this.limit);
    oprot.writeFieldEnd();
  }
  if (isSetOrder_by()) {
    if (this.order_by != null) {
      oprot.writeFieldBegin(_ORDER_BY_FIELD_DESC);
      {
        oprot.writeListBegin(new TList(TType.STRUCT, this.order_by?.length));
        for (var elem214 in this.order_by ?? []) {
          elem214.write(oprot);
        }
        oprot.writeListEnd();
      }
      oprot.writeFieldEnd();
    }
  }
  if (isSetStat_columns()) {
    if (this.stat_columns != null) {
      oprot.writeFieldBegin(_STAT_COLUMNS_FIELD_DESC);
      {
        oprot.writeListBegin(
            new TList(TType.STRUCT, this.stat_columns?.length));
        for (var elem215 in this.stat_columns ?? []) {
          elem215.write(oprot);
        }
        oprot.writeListEnd();
      }
      oprot.writeFieldEnd();
    }
  }
  oprot.writeFieldStop();
  oprot.writeStructEnd();
}