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.edge_types != null) {
    oprot.writeFieldBegin(_EDGE_TYPES_FIELD_DESC);
    {
      oprot.writeListBegin(new TList(TType.I32, this.edge_types?.length));
      for (var elem36 in this.edge_types ?? []) {
        oprot.writeI32(elem36);
      }
      oprot.writeListEnd();
    }
    oprot.writeFieldEnd();
  }
  oprot.writeFieldBegin(_EDGE_DIRECTION_FIELD_DESC);
  oprot.writeI32(this.edge_direction);
  oprot.writeFieldEnd();
  oprot.writeFieldBegin(_DEDUP_FIELD_DESC);
  oprot.writeBool(this.dedup);
  oprot.writeFieldEnd();
  if (isSetStat_props()) {
    if (this.stat_props != null) {
      oprot.writeFieldBegin(_STAT_PROPS_FIELD_DESC);
      {
        oprot
            .writeListBegin(new TList(TType.STRUCT, this.stat_props?.length));
        for (var elem37 in this.stat_props ?? []) {
          elem37.write(oprot);
        }
        oprot.writeListEnd();
      }
      oprot.writeFieldEnd();
    }
  }
  if (isSetVertex_props()) {
    if (this.vertex_props != null) {
      oprot.writeFieldBegin(_VERTEX_PROPS_FIELD_DESC);
      {
        oprot.writeListBegin(
            new TList(TType.STRUCT, this.vertex_props?.length));
        for (var elem38 in this.vertex_props ?? []) {
          elem38.write(oprot);
        }
        oprot.writeListEnd();
      }
      oprot.writeFieldEnd();
    }
  }
  if (isSetEdge_props()) {
    if (this.edge_props != null) {
      oprot.writeFieldBegin(_EDGE_PROPS_FIELD_DESC);
      {
        oprot
            .writeListBegin(new TList(TType.STRUCT, this.edge_props?.length));
        for (var elem39 in this.edge_props ?? []) {
          elem39.write(oprot);
        }
        oprot.writeListEnd();
      }
      oprot.writeFieldEnd();
    }
  }
  if (isSetExpressions()) {
    if (this.expressions != null) {
      oprot.writeFieldBegin(_EXPRESSIONS_FIELD_DESC);
      {
        oprot.writeListBegin(
            new TList(TType.STRUCT, this.expressions?.length));
        for (var elem40 in this.expressions ?? []) {
          elem40.write(oprot);
        }
        oprot.writeListEnd();
      }
      oprot.writeFieldEnd();
    }
  }
  if (isSetOrder_by()) {
    if (this.order_by != null) {
      oprot.writeFieldBegin(_ORDER_BY_FIELD_DESC);
      {
        oprot.writeListBegin(new TList(TType.STRUCT, this.order_by?.length));
        for (var elem41 in this.order_by ?? []) {
          elem41.write(oprot);
        }
        oprot.writeListEnd();
      }
      oprot.writeFieldEnd();
    }
  }
  if (isSetRandom()) {
    oprot.writeFieldBegin(_RANDOM_FIELD_DESC);
    oprot.writeBool(this.random);
    oprot.writeFieldEnd();
  }
  if (isSetLimit()) {
    oprot.writeFieldBegin(_LIMIT_FIELD_DESC);
    oprot.writeI64(this.limit);
    oprot.writeFieldEnd();
  }
  if (isSetFilter()) {
    if (this.filter != null) {
      oprot.writeFieldBegin(_FILTER_FIELD_DESC);
      oprot.writeBinary(this.filter);
      oprot.writeFieldEnd();
    }
  }
  if (isSetTag_filter()) {
    if (this.tag_filter != null) {
      oprot.writeFieldBegin(_TAG_FILTER_FIELD_DESC);
      oprot.writeBinary(this.tag_filter);
      oprot.writeFieldEnd();
    }
  }
  oprot.writeFieldStop();
  oprot.writeStructEnd();
}