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 elem228 in this.parts?.keys ?? <int>[]) {
        oprot.writeI32(elem228);
        this.parts?[elem228]?.write(oprot);
      }
      oprot.writeMapEnd();
    }
    oprot.writeFieldEnd();
  }
  if (this.return_columns != null) {
    oprot.writeFieldBegin(_RETURN_COLUMNS_FIELD_DESC);
    {
      oprot.writeListBegin(
          new TList(TType.STRUCT, this.return_columns?.length));
      for (var elem229 in this.return_columns ?? <VertexProp>[]) {
        elem229.write(oprot);
      }
      oprot.writeListEnd();
    }
    oprot.writeFieldEnd();
  }
  oprot.writeFieldBegin(_LIMIT_FIELD_DESC);
  oprot.writeI64(this.limit);
  oprot.writeFieldEnd();
  if (isSetStart_time()) {
    oprot.writeFieldBegin(_START_TIME_FIELD_DESC);
    oprot.writeI64(this.start_time);
    oprot.writeFieldEnd();
  }
  if (isSetEnd_time()) {
    oprot.writeFieldBegin(_END_TIME_FIELD_DESC);
    oprot.writeI64(this.end_time);
    oprot.writeFieldEnd();
  }
  if (isSetFilter()) {
    if (this.filter != null) {
      oprot.writeFieldBegin(_FILTER_FIELD_DESC);
      oprot.writeBinary(this.filter);
      oprot.writeFieldEnd();
    }
  }
  oprot.writeFieldBegin(_ONLY_LATEST_VERSION_FIELD_DESC);
  oprot.writeBool(this.only_latest_version);
  oprot.writeFieldEnd();
  oprot.writeFieldBegin(_ENABLE_READ_FROM_FOLLOWER_FIELD_DESC);
  oprot.writeBool(this.enable_read_from_follower);
  oprot.writeFieldEnd();
  if (isSetCommon()) {
    if (this.common != null) {
      oprot.writeFieldBegin(_COMMON_FIELD_DESC);
      this.common?.write(oprot);
      oprot.writeFieldEnd();
    }
  }
  oprot.writeFieldStop();
  oprot.writeStructEnd();
}