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.writeMapBegin(
          new TMap(TType.I32, TType.STRUCT, this.parts?.length));
      for (var elem73 in this.parts?.keys ?? <int>[]) {
        oprot.writeI32(elem73);
        this.parts?[elem73]?.write(oprot);
      }
      oprot.writeMapEnd();
    }
    oprot.writeFieldEnd();
  }
  if (this.data_path != null) {
    oprot.writeFieldBegin(_DATA_PATH_FIELD_DESC);
    oprot.writeBinary(this.data_path);
    oprot.writeFieldEnd();
  }
  oprot.writeFieldStop();
  oprot.writeStructEnd();
}