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.edge_name != null) {
    oprot.writeFieldBegin(_EDGE_NAME_FIELD_DESC);
    oprot.writeBinary(this.edge_name);
    oprot.writeFieldEnd();
  }
  if (this.edge_items != null) {
    oprot.writeFieldBegin(_EDGE_ITEMS_FIELD_DESC);
    {
      oprot.writeListBegin(new TList(TType.STRUCT, this.edge_items?.length));
      for (var elem99 in this.edge_items ?? []) {
        elem99.write(oprot);
      }
      oprot.writeListEnd();
    }
    oprot.writeFieldEnd();
  }
  if (this.schema_prop != null) {
    oprot.writeFieldBegin(_SCHEMA_PROP_FIELD_DESC);
    this.schema_prop?.write(oprot);
    oprot.writeFieldEnd();
  }
  oprot.writeFieldStop();
  oprot.writeStructEnd();
}