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();
  oprot.writeFieldBegin(_PART_ID_FIELD_DESC);
  oprot.writeI32(this.part_id);
  oprot.writeFieldEnd();
  if (this.vertex_id != null) {
    oprot.writeFieldBegin(_VERTEX_ID_FIELD_DESC);
    this.vertex_id?.write(oprot);
    oprot.writeFieldEnd();
  }
  oprot.writeFieldBegin(_TAG_ID_FIELD_DESC);
  oprot.writeI32(this.tag_id);
  oprot.writeFieldEnd();
  if (this.updated_props != null) {
    oprot.writeFieldBegin(_UPDATED_PROPS_FIELD_DESC);
    {
      oprot.writeListBegin(
          new TList(TType.STRUCT, this.updated_props?.length));
      for (var elem182 in this.updated_props ?? []) {
        elem182.write(oprot);
      }
      oprot.writeListEnd();
    }
    oprot.writeFieldEnd();
  }
  if (isSetInsertable()) {
    oprot.writeFieldBegin(_INSERTABLE_FIELD_DESC);
    oprot.writeBool(this.insertable);
    oprot.writeFieldEnd();
  }
  if (isSetReturn_props()) {
    if (this.return_props != null) {
      oprot.writeFieldBegin(_RETURN_PROPS_FIELD_DESC);
      {
        oprot.writeListBegin(
            new TList(TType.STRING, this.return_props?.length));
        for (var elem183 in this.return_props ?? []) {
          oprot.writeBinary(elem183);
        }
        oprot.writeListEnd();
      }
      oprot.writeFieldEnd();
    }
  }
  if (isSetCondition()) {
    if (this.condition != null) {
      oprot.writeFieldBegin(_CONDITION_FIELD_DESC);
      oprot.writeBinary(this.condition);
      oprot.writeFieldEnd();
    }
  }
  if (isSetCommon()) {
    if (this.common != null) {
      oprot.writeFieldBegin(_COMMON_FIELD_DESC);
      this.common?.write(oprot);
      oprot.writeFieldEnd();
    }
  }
  oprot.writeFieldStop();
  oprot.writeStructEnd();
}