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.src != null) {
    oprot.writeFieldBegin(_SRC_FIELD_DESC);
    this.src?.write(oprot);
    oprot.writeFieldEnd();
  }
  if (this.dst != null) {
    oprot.writeFieldBegin(_DST_FIELD_DESC);
    this.dst?.write(oprot);
    oprot.writeFieldEnd();
  }
  oprot.writeFieldBegin(_TYPE_FIELD_DESC);
  oprot.writeI32(this.type);
  oprot.writeFieldEnd();
  if (this.name != null) {
    oprot.writeFieldBegin(_NAME_FIELD_DESC);
    oprot.writeBinary(this.name);
    oprot.writeFieldEnd();
  }
  oprot.writeFieldBegin(_RANKING_FIELD_DESC);
  oprot.writeI64(this.ranking);
  oprot.writeFieldEnd();
  if (this.props != null) {
    oprot.writeFieldBegin(_PROPS_FIELD_DESC);
    {
      oprot.writeMapBegin(
          new TMap(TType.STRING, TType.STRUCT, this.props?.length));
      for (var elem53 in this.props?.keys ?? <Int8List>[]) {
        oprot.writeBinary(elem53);
        this.props?[elem53]?.write(oprot);
      }
      oprot.writeMapEnd();
    }
    oprot.writeFieldEnd();
  }
  oprot.writeFieldStop();
  oprot.writeStructEnd();
}