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(_SESSION_ID_FIELD_DESC);
  oprot.writeI64(this.session_id);
  oprot.writeFieldEnd();
  oprot.writeFieldBegin(_CREATE_TIME_FIELD_DESC);
  oprot.writeI64(this.create_time);
  oprot.writeFieldEnd();
  oprot.writeFieldBegin(_UPDATE_TIME_FIELD_DESC);
  oprot.writeI64(this.update_time);
  oprot.writeFieldEnd();
  if (this.user_name != null) {
    oprot.writeFieldBegin(_USER_NAME_FIELD_DESC);
    oprot.writeBinary(this.user_name);
    oprot.writeFieldEnd();
  }
  if (this.space_name != null) {
    oprot.writeFieldBegin(_SPACE_NAME_FIELD_DESC);
    oprot.writeBinary(this.space_name);
    oprot.writeFieldEnd();
  }
  if (this.graph_addr != null) {
    oprot.writeFieldBegin(_GRAPH_ADDR_FIELD_DESC);
    this.graph_addr?.write(oprot);
    oprot.writeFieldEnd();
  }
  oprot.writeFieldBegin(_TIMEZONE_FIELD_DESC);
  oprot.writeI32(this.timezone);
  oprot.writeFieldEnd();
  if (this.client_ip != null) {
    oprot.writeFieldBegin(_CLIENT_IP_FIELD_DESC);
    oprot.writeBinary(this.client_ip);
    oprot.writeFieldEnd();
  }
  if (this.configs != null) {
    oprot.writeFieldBegin(_CONFIGS_FIELD_DESC);
    {
      oprot.writeMapBegin(
          new TMap(TType.STRING, TType.STRUCT, this.configs?.length));
      for (var elem347 in this.configs?.keys ?? <Int8List>[]) {
        oprot.writeBinary(elem347);
        this.configs?[elem347]?.write(oprot);
      }
      oprot.writeMapEnd();
    }
    oprot.writeFieldEnd();
  }
  if (this.queries != null) {
    oprot.writeFieldBegin(_QUERIES_FIELD_DESC);
    {
      oprot.writeMapBegin(
          new TMap(TType.I64, TType.STRUCT, this.queries?.length));
      for (var elem349 in this.queries?.keys ?? <int>[]) {
        oprot.writeI64(elem349);
        this.queries?[elem349]?.write(oprot);
      }
      oprot.writeMapEnd();
    }
    oprot.writeFieldEnd();
  }
  oprot.writeFieldStop();
  oprot.writeStructEnd();
}