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);
  if (this.plan_node_descs != null) {
    oprot.writeFieldBegin(_PLAN_NODE_DESCS_FIELD_DESC);
    {
      oprot.writeListBegin(
          new TList(TType.STRUCT, this.plan_node_descs?.length));
      for (var elem25 in this.plan_node_descs ?? []) {
        elem25.write(oprot);
      }
      oprot.writeListEnd();
    }
    oprot.writeFieldEnd();
  }
  if (this.node_index_map != null) {
    oprot.writeFieldBegin(_NODE_INDEX_MAP_FIELD_DESC);
    {
      oprot.writeMapBegin(
          new TMap(TType.I64, TType.I64, this.node_index_map?.length));
      for (var elem27 in this.node_index_map?.keys ?? <int>[]) {
        oprot.writeI64(elem27);
        oprot.writeI64(this.node_index_map?[elem27]);
      }
      oprot.writeMapEnd();
    }
    oprot.writeFieldEnd();
  }
  if (this.format != null) {
    oprot.writeFieldBegin(_FORMAT_FIELD_DESC);
    oprot.writeBinary(this.format);
    oprot.writeFieldEnd();
  }
  oprot.writeFieldBegin(_OPTIMIZE_TIME_IN_US_FIELD_DESC);
  oprot.writeI32(this.optimize_time_in_us);
  oprot.writeFieldEnd();
  oprot.writeFieldStop();
  oprot.writeStructEnd();
}