All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vesoft.nebula.proto.common.Edge Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: common.proto

// Protobuf Java Version: 3.25.1
package com.vesoft.nebula.proto.common;

/**
 * Protobuf type {@code nebula.proto.common.Edge}
 */
public final class Edge extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:nebula.proto.common.Edge)
    EdgeOrBuilder {
private static final long serialVersionUID = 0L;
  // Use Edge.newBuilder() to construct.
  private Edge(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private Edge() {
    direction_ = 0;
    graph_ = "";
    type_ = "";
    labels_ =
        com.google.protobuf.LazyStringArrayList.emptyList();
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new Edge();
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.vesoft.nebula.proto.common.Common.internal_static_nebula_proto_common_Edge_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
      int number) {
    switch (number) {
      case 8:
        return internalGetProperties();
      default:
        throw new RuntimeException(
            "Invalid map field number: " + number);
    }
  }
  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.vesoft.nebula.proto.common.Common.internal_static_nebula_proto_common_Edge_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.vesoft.nebula.proto.common.Edge.class, com.vesoft.nebula.proto.common.Edge.Builder.class);
  }

  /**
   * Protobuf enum {@code nebula.proto.common.Edge.Direction}
   */
  public enum Direction
      implements com.google.protobuf.ProtocolMessageEnum {
    /**
     * DIRECTED = 0;
     */
    DIRECTED(0),
    /**
     * UNDIRECTED = 1;
     */
    UNDIRECTED(1),
    UNRECOGNIZED(-1),
    ;

    /**
     * DIRECTED = 0;
     */
    public static final int DIRECTED_VALUE = 0;
    /**
     * UNDIRECTED = 1;
     */
    public static final int UNDIRECTED_VALUE = 1;


    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static Direction valueOf(int value) {
      return forNumber(value);
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     */
    public static Direction forNumber(int value) {
      switch (value) {
        case 0: return DIRECTED;
        case 1: return UNDIRECTED;
        default: return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap
        internalGetValueMap() {
      return internalValueMap;
    }
    private static final com.google.protobuf.Internal.EnumLiteMap<
        Direction> internalValueMap =
          new com.google.protobuf.Internal.EnumLiteMap() {
            public Direction findValueByNumber(int number) {
              return Direction.forNumber(number);
            }
          };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor
        getValueDescriptor() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalStateException(
            "Can't get the descriptor of an unrecognized enum value.");
      }
      return getDescriptor().getValues().get(ordinal());
    }
    public final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptorForType() {
      return getDescriptor();
    }
    public static final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptor() {
      return com.vesoft.nebula.proto.common.Edge.getDescriptor().getEnumTypes().get(0);
    }

    private static final Direction[] VALUES = values();

    public static Direction valueOf(
        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException(
          "EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

    private Direction(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:nebula.proto.common.Edge.Direction)
  }

  public static final int SRC_ID_FIELD_NUMBER = 1;
  private long srcId_ = 0L;
  /**
   * int64 src_id = 1;
   * @return The srcId.
   */
  @java.lang.Override
  public long getSrcId() {
    return srcId_;
  }

  public static final int DST_ID_FIELD_NUMBER = 2;
  private long dstId_ = 0L;
  /**
   * int64 dst_id = 2;
   * @return The dstId.
   */
  @java.lang.Override
  public long getDstId() {
    return dstId_;
  }

  public static final int DIRECTION_FIELD_NUMBER = 3;
  private int direction_ = 0;
  /**
   * .nebula.proto.common.Edge.Direction direction = 3;
   * @return The enum numeric value on the wire for direction.
   */
  @java.lang.Override public int getDirectionValue() {
    return direction_;
  }
  /**
   * .nebula.proto.common.Edge.Direction direction = 3;
   * @return The direction.
   */
  @java.lang.Override public com.vesoft.nebula.proto.common.Edge.Direction getDirection() {
    com.vesoft.nebula.proto.common.Edge.Direction result = com.vesoft.nebula.proto.common.Edge.Direction.forNumber(direction_);
    return result == null ? com.vesoft.nebula.proto.common.Edge.Direction.UNRECOGNIZED : result;
  }

  public static final int GRAPH_FIELD_NUMBER = 4;
  @SuppressWarnings("serial")
  private volatile java.lang.Object graph_ = "";
  /**
   * string graph = 4;
   * @return The graph.
   */
  @java.lang.Override
  public java.lang.String getGraph() {
    java.lang.Object ref = graph_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      graph_ = s;
      return s;
    }
  }
  /**
   * string graph = 4;
   * @return The bytes for graph.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getGraphBytes() {
    java.lang.Object ref = graph_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      graph_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TYPE_FIELD_NUMBER = 5;
  @SuppressWarnings("serial")
  private volatile java.lang.Object type_ = "";
  /**
   * string type = 5;
   * @return The type.
   */
  @java.lang.Override
  public java.lang.String getType() {
    java.lang.Object ref = type_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      type_ = s;
      return s;
    }
  }
  /**
   * string type = 5;
   * @return The bytes for type.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getTypeBytes() {
    java.lang.Object ref = type_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      type_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int LABELS_FIELD_NUMBER = 6;
  @SuppressWarnings("serial")
  private com.google.protobuf.LazyStringArrayList labels_ =
      com.google.protobuf.LazyStringArrayList.emptyList();
  /**
   * repeated string labels = 6;
   * @return A list containing the labels.
   */
  public com.google.protobuf.ProtocolStringList
      getLabelsList() {
    return labels_;
  }
  /**
   * repeated string labels = 6;
   * @return The count of labels.
   */
  public int getLabelsCount() {
    return labels_.size();
  }
  /**
   * repeated string labels = 6;
   * @param index The index of the element to return.
   * @return The labels at the given index.
   */
  public java.lang.String getLabels(int index) {
    return labels_.get(index);
  }
  /**
   * repeated string labels = 6;
   * @param index The index of the value to return.
   * @return The bytes of the labels at the given index.
   */
  public com.google.protobuf.ByteString
      getLabelsBytes(int index) {
    return labels_.getByteString(index);
  }

  public static final int RANK_FIELD_NUMBER = 7;
  private long rank_ = 0L;
  /**
   * int64 rank = 7;
   * @return The rank.
   */
  @java.lang.Override
  public long getRank() {
    return rank_;
  }

  public static final int PROPERTIES_FIELD_NUMBER = 8;
  private static final class PropertiesDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<
        java.lang.String, com.vesoft.nebula.proto.common.Value> defaultEntry =
            com.google.protobuf.MapEntry
            .newDefaultInstance(
                com.vesoft.nebula.proto.common.Common.internal_static_nebula_proto_common_Edge_PropertiesEntry_descriptor, 
                com.google.protobuf.WireFormat.FieldType.STRING,
                "",
                com.google.protobuf.WireFormat.FieldType.MESSAGE,
                com.vesoft.nebula.proto.common.Value.getDefaultInstance());
  }
  @SuppressWarnings("serial")
  private com.google.protobuf.MapField<
      java.lang.String, com.vesoft.nebula.proto.common.Value> properties_;
  private com.google.protobuf.MapField
  internalGetProperties() {
    if (properties_ == null) {
      return com.google.protobuf.MapField.emptyMapField(
          PropertiesDefaultEntryHolder.defaultEntry);
    }
    return properties_;
  }
  public int getPropertiesCount() {
    return internalGetProperties().getMap().size();
  }
  /**
   * map<string, .nebula.proto.common.Value> properties = 8;
   */
  @java.lang.Override
  public boolean containsProperties(
      java.lang.String key) {
    if (key == null) { throw new NullPointerException("map key"); }
    return internalGetProperties().getMap().containsKey(key);
  }
  /**
   * Use {@link #getPropertiesMap()} instead.
   */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map getProperties() {
    return getPropertiesMap();
  }
  /**
   * map<string, .nebula.proto.common.Value> properties = 8;
   */
  @java.lang.Override
  public java.util.Map getPropertiesMap() {
    return internalGetProperties().getMap();
  }
  /**
   * map<string, .nebula.proto.common.Value> properties = 8;
   */
  @java.lang.Override
  public /* nullable */
com.vesoft.nebula.proto.common.Value getPropertiesOrDefault(
      java.lang.String key,
      /* nullable */
com.vesoft.nebula.proto.common.Value defaultValue) {
    if (key == null) { throw new NullPointerException("map key"); }
    java.util.Map map =
        internalGetProperties().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   * map<string, .nebula.proto.common.Value> properties = 8;
   */
  @java.lang.Override
  public com.vesoft.nebula.proto.common.Value getPropertiesOrThrow(
      java.lang.String key) {
    if (key == null) { throw new NullPointerException("map key"); }
    java.util.Map map =
        internalGetProperties().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  private byte memoizedIsInitialized = -1;
  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (srcId_ != 0L) {
      output.writeInt64(1, srcId_);
    }
    if (dstId_ != 0L) {
      output.writeInt64(2, dstId_);
    }
    if (direction_ != com.vesoft.nebula.proto.common.Edge.Direction.DIRECTED.getNumber()) {
      output.writeEnum(3, direction_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(graph_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, graph_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, type_);
    }
    for (int i = 0; i < labels_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, labels_.getRaw(i));
    }
    if (rank_ != 0L) {
      output.writeInt64(7, rank_);
    }
    com.google.protobuf.GeneratedMessageV3
      .serializeStringMapTo(
        output,
        internalGetProperties(),
        PropertiesDefaultEntryHolder.defaultEntry,
        8);
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (srcId_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(1, srcId_);
    }
    if (dstId_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(2, dstId_);
    }
    if (direction_ != com.vesoft.nebula.proto.common.Edge.Direction.DIRECTED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(3, direction_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(graph_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, graph_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, type_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < labels_.size(); i++) {
        dataSize += computeStringSizeNoTag(labels_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getLabelsList().size();
    }
    if (rank_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(7, rank_);
    }
    for (java.util.Map.Entry entry
         : internalGetProperties().getMap().entrySet()) {
      com.google.protobuf.MapEntry
      properties__ = PropertiesDefaultEntryHolder.defaultEntry.newBuilderForType()
          .setKey(entry.getKey())
          .setValue(entry.getValue())
          .build();
      size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(8, properties__);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof com.vesoft.nebula.proto.common.Edge)) {
      return super.equals(obj);
    }
    com.vesoft.nebula.proto.common.Edge other = (com.vesoft.nebula.proto.common.Edge) obj;

    if (getSrcId()
        != other.getSrcId()) return false;
    if (getDstId()
        != other.getDstId()) return false;
    if (direction_ != other.direction_) return false;
    if (!getGraph()
        .equals(other.getGraph())) return false;
    if (!getType()
        .equals(other.getType())) return false;
    if (!getLabelsList()
        .equals(other.getLabelsList())) return false;
    if (getRank()
        != other.getRank()) return false;
    if (!internalGetProperties().equals(
        other.internalGetProperties())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + SRC_ID_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getSrcId());
    hash = (37 * hash) + DST_ID_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getDstId());
    hash = (37 * hash) + DIRECTION_FIELD_NUMBER;
    hash = (53 * hash) + direction_;
    hash = (37 * hash) + GRAPH_FIELD_NUMBER;
    hash = (53 * hash) + getGraph().hashCode();
    hash = (37 * hash) + TYPE_FIELD_NUMBER;
    hash = (53 * hash) + getType().hashCode();
    if (getLabelsCount() > 0) {
      hash = (37 * hash) + LABELS_FIELD_NUMBER;
      hash = (53 * hash) + getLabelsList().hashCode();
    }
    hash = (37 * hash) + RANK_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getRank());
    if (!internalGetProperties().getMap().isEmpty()) {
      hash = (37 * hash) + PROPERTIES_FIELD_NUMBER;
      hash = (53 * hash) + internalGetProperties().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.vesoft.nebula.proto.common.Edge parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.vesoft.nebula.proto.common.Edge parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.vesoft.nebula.proto.common.Edge parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.vesoft.nebula.proto.common.Edge parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.vesoft.nebula.proto.common.Edge parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.vesoft.nebula.proto.common.Edge parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.vesoft.nebula.proto.common.Edge parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.vesoft.nebula.proto.common.Edge parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public static com.vesoft.nebula.proto.common.Edge parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static com.vesoft.nebula.proto.common.Edge parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static com.vesoft.nebula.proto.common.Edge parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.vesoft.nebula.proto.common.Edge parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.vesoft.nebula.proto.common.Edge prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code nebula.proto.common.Edge}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:nebula.proto.common.Edge)
      com.vesoft.nebula.proto.common.EdgeOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.vesoft.nebula.proto.common.Common.internal_static_nebula_proto_common_Edge_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
        int number) {
      switch (number) {
        case 8:
          return internalGetProperties();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
        int number) {
      switch (number) {
        case 8:
          return internalGetMutableProperties();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.vesoft.nebula.proto.common.Common.internal_static_nebula_proto_common_Edge_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.vesoft.nebula.proto.common.Edge.class, com.vesoft.nebula.proto.common.Edge.Builder.class);
    }

    // Construct using com.vesoft.nebula.proto.common.Edge.newBuilder()
    private Builder() {

    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);

    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      srcId_ = 0L;
      dstId_ = 0L;
      direction_ = 0;
      graph_ = "";
      type_ = "";
      labels_ =
          com.google.protobuf.LazyStringArrayList.emptyList();
      rank_ = 0L;
      internalGetMutableProperties().clear();
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.vesoft.nebula.proto.common.Common.internal_static_nebula_proto_common_Edge_descriptor;
    }

    @java.lang.Override
    public com.vesoft.nebula.proto.common.Edge getDefaultInstanceForType() {
      return com.vesoft.nebula.proto.common.Edge.getDefaultInstance();
    }

    @java.lang.Override
    public com.vesoft.nebula.proto.common.Edge build() {
      com.vesoft.nebula.proto.common.Edge result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.vesoft.nebula.proto.common.Edge buildPartial() {
      com.vesoft.nebula.proto.common.Edge result = new com.vesoft.nebula.proto.common.Edge(this);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartial0(com.vesoft.nebula.proto.common.Edge result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.srcId_ = srcId_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.dstId_ = dstId_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.direction_ = direction_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.graph_ = graph_;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.type_ = type_;
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        labels_.makeImmutable();
        result.labels_ = labels_;
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.rank_ = rank_;
      }
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.properties_ = internalGetProperties().build(PropertiesDefaultEntryHolder.defaultEntry);
      }
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }
    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.setField(field, value);
    }
    @java.lang.Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @java.lang.Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }
    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }
    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.vesoft.nebula.proto.common.Edge) {
        return mergeFrom((com.vesoft.nebula.proto.common.Edge)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.vesoft.nebula.proto.common.Edge other) {
      if (other == com.vesoft.nebula.proto.common.Edge.getDefaultInstance()) return this;
      if (other.getSrcId() != 0L) {
        setSrcId(other.getSrcId());
      }
      if (other.getDstId() != 0L) {
        setDstId(other.getDstId());
      }
      if (other.direction_ != 0) {
        setDirectionValue(other.getDirectionValue());
      }
      if (!other.getGraph().isEmpty()) {
        graph_ = other.graph_;
        bitField0_ |= 0x00000008;
        onChanged();
      }
      if (!other.getType().isEmpty()) {
        type_ = other.type_;
        bitField0_ |= 0x00000010;
        onChanged();
      }
      if (!other.labels_.isEmpty()) {
        if (labels_.isEmpty()) {
          labels_ = other.labels_;
          bitField0_ |= 0x00000020;
        } else {
          ensureLabelsIsMutable();
          labels_.addAll(other.labels_);
        }
        onChanged();
      }
      if (other.getRank() != 0L) {
        setRank(other.getRank());
      }
      internalGetMutableProperties().mergeFrom(
          other.internalGetProperties());
      bitField0_ |= 0x00000080;
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8: {
              srcId_ = input.readInt64();
              bitField0_ |= 0x00000001;
              break;
            } // case 8
            case 16: {
              dstId_ = input.readInt64();
              bitField0_ |= 0x00000002;
              break;
            } // case 16
            case 24: {
              direction_ = input.readEnum();
              bitField0_ |= 0x00000004;
              break;
            } // case 24
            case 34: {
              graph_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000008;
              break;
            } // case 34
            case 42: {
              type_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000010;
              break;
            } // case 42
            case 50: {
              java.lang.String s = input.readStringRequireUtf8();
              ensureLabelsIsMutable();
              labels_.add(s);
              break;
            } // case 50
            case 56: {
              rank_ = input.readInt64();
              bitField0_ |= 0x00000040;
              break;
            } // case 56
            case 66: {
              com.google.protobuf.MapEntry
              properties__ = input.readMessage(
                  PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
              internalGetMutableProperties().ensureBuilderMap().put(
                  properties__.getKey(), properties__.getValue());
              bitField0_ |= 0x00000080;
              break;
            } // case 66
            default: {
              if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                done = true; // was an endgroup tag
              }
              break;
            } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }
    private int bitField0_;

    private long srcId_ ;
    /**
     * int64 src_id = 1;
     * @return The srcId.
     */
    @java.lang.Override
    public long getSrcId() {
      return srcId_;
    }
    /**
     * int64 src_id = 1;
     * @param value The srcId to set.
     * @return This builder for chaining.
     */
    public Builder setSrcId(long value) {

      srcId_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * int64 src_id = 1;
     * @return This builder for chaining.
     */
    public Builder clearSrcId() {
      bitField0_ = (bitField0_ & ~0x00000001);
      srcId_ = 0L;
      onChanged();
      return this;
    }

    private long dstId_ ;
    /**
     * int64 dst_id = 2;
     * @return The dstId.
     */
    @java.lang.Override
    public long getDstId() {
      return dstId_;
    }
    /**
     * int64 dst_id = 2;
     * @param value The dstId to set.
     * @return This builder for chaining.
     */
    public Builder setDstId(long value) {

      dstId_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * int64 dst_id = 2;
     * @return This builder for chaining.
     */
    public Builder clearDstId() {
      bitField0_ = (bitField0_ & ~0x00000002);
      dstId_ = 0L;
      onChanged();
      return this;
    }

    private int direction_ = 0;
    /**
     * .nebula.proto.common.Edge.Direction direction = 3;
     * @return The enum numeric value on the wire for direction.
     */
    @java.lang.Override public int getDirectionValue() {
      return direction_;
    }
    /**
     * .nebula.proto.common.Edge.Direction direction = 3;
     * @param value The enum numeric value on the wire for direction to set.
     * @return This builder for chaining.
     */
    public Builder setDirectionValue(int value) {
      direction_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     * .nebula.proto.common.Edge.Direction direction = 3;
     * @return The direction.
     */
    @java.lang.Override
    public com.vesoft.nebula.proto.common.Edge.Direction getDirection() {
      com.vesoft.nebula.proto.common.Edge.Direction result = com.vesoft.nebula.proto.common.Edge.Direction.forNumber(direction_);
      return result == null ? com.vesoft.nebula.proto.common.Edge.Direction.UNRECOGNIZED : result;
    }
    /**
     * .nebula.proto.common.Edge.Direction direction = 3;
     * @param value The direction to set.
     * @return This builder for chaining.
     */
    public Builder setDirection(com.vesoft.nebula.proto.common.Edge.Direction value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000004;
      direction_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * .nebula.proto.common.Edge.Direction direction = 3;
     * @return This builder for chaining.
     */
    public Builder clearDirection() {
      bitField0_ = (bitField0_ & ~0x00000004);
      direction_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object graph_ = "";
    /**
     * string graph = 4;
     * @return The graph.
     */
    public java.lang.String getGraph() {
      java.lang.Object ref = graph_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        graph_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string graph = 4;
     * @return The bytes for graph.
     */
    public com.google.protobuf.ByteString
        getGraphBytes() {
      java.lang.Object ref = graph_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        graph_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string graph = 4;
     * @param value The graph to set.
     * @return This builder for chaining.
     */
    public Builder setGraph(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      graph_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     * string graph = 4;
     * @return This builder for chaining.
     */
    public Builder clearGraph() {
      graph_ = getDefaultInstance().getGraph();
      bitField0_ = (bitField0_ & ~0x00000008);
      onChanged();
      return this;
    }
    /**
     * string graph = 4;
     * @param value The bytes for graph to set.
     * @return This builder for chaining.
     */
    public Builder setGraphBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      graph_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }

    private java.lang.Object type_ = "";
    /**
     * string type = 5;
     * @return The type.
     */
    public java.lang.String getType() {
      java.lang.Object ref = type_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        type_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string type = 5;
     * @return The bytes for type.
     */
    public com.google.protobuf.ByteString
        getTypeBytes() {
      java.lang.Object ref = type_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        type_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string type = 5;
     * @param value The type to set.
     * @return This builder for chaining.
     */
    public Builder setType(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      type_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     * string type = 5;
     * @return This builder for chaining.
     */
    public Builder clearType() {
      type_ = getDefaultInstance().getType();
      bitField0_ = (bitField0_ & ~0x00000010);
      onChanged();
      return this;
    }
    /**
     * string type = 5;
     * @param value The bytes for type to set.
     * @return This builder for chaining.
     */
    public Builder setTypeBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      type_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringArrayList labels_ =
        com.google.protobuf.LazyStringArrayList.emptyList();
    private void ensureLabelsIsMutable() {
      if (!labels_.isModifiable()) {
        labels_ = new com.google.protobuf.LazyStringArrayList(labels_);
      }
      bitField0_ |= 0x00000020;
    }
    /**
     * repeated string labels = 6;
     * @return A list containing the labels.
     */
    public com.google.protobuf.ProtocolStringList
        getLabelsList() {
      labels_.makeImmutable();
      return labels_;
    }
    /**
     * repeated string labels = 6;
     * @return The count of labels.
     */
    public int getLabelsCount() {
      return labels_.size();
    }
    /**
     * repeated string labels = 6;
     * @param index The index of the element to return.
     * @return The labels at the given index.
     */
    public java.lang.String getLabels(int index) {
      return labels_.get(index);
    }
    /**
     * repeated string labels = 6;
     * @param index The index of the value to return.
     * @return The bytes of the labels at the given index.
     */
    public com.google.protobuf.ByteString
        getLabelsBytes(int index) {
      return labels_.getByteString(index);
    }
    /**
     * repeated string labels = 6;
     * @param index The index to set the value at.
     * @param value The labels to set.
     * @return This builder for chaining.
     */
    public Builder setLabels(
        int index, java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      ensureLabelsIsMutable();
      labels_.set(index, value);
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     * repeated string labels = 6;
     * @param value The labels to add.
     * @return This builder for chaining.
     */
    public Builder addLabels(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      ensureLabelsIsMutable();
      labels_.add(value);
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     * repeated string labels = 6;
     * @param values The labels to add.
     * @return This builder for chaining.
     */
    public Builder addAllLabels(
        java.lang.Iterable values) {
      ensureLabelsIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, labels_);
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     * repeated string labels = 6;
     * @return This builder for chaining.
     */
    public Builder clearLabels() {
      labels_ =
        com.google.protobuf.LazyStringArrayList.emptyList();
      bitField0_ = (bitField0_ & ~0x00000020);;
      onChanged();
      return this;
    }
    /**
     * repeated string labels = 6;
     * @param value The bytes of the labels to add.
     * @return This builder for chaining.
     */
    public Builder addLabelsBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      ensureLabelsIsMutable();
      labels_.add(value);
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }

    private long rank_ ;
    /**
     * int64 rank = 7;
     * @return The rank.
     */
    @java.lang.Override
    public long getRank() {
      return rank_;
    }
    /**
     * int64 rank = 7;
     * @param value The rank to set.
     * @return This builder for chaining.
     */
    public Builder setRank(long value) {

      rank_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     * int64 rank = 7;
     * @return This builder for chaining.
     */
    public Builder clearRank() {
      bitField0_ = (bitField0_ & ~0x00000040);
      rank_ = 0L;
      onChanged();
      return this;
    }

    private static final class PropertiesConverter implements com.google.protobuf.MapFieldBuilder.Converter {
      @java.lang.Override
      public com.vesoft.nebula.proto.common.Value build(com.vesoft.nebula.proto.common.ValueOrBuilder val) {
        if (val instanceof com.vesoft.nebula.proto.common.Value) { return (com.vesoft.nebula.proto.common.Value) val; }
        return ((com.vesoft.nebula.proto.common.Value.Builder) val).build();
      }

      @java.lang.Override
      public com.google.protobuf.MapEntry defaultEntry() {
        return PropertiesDefaultEntryHolder.defaultEntry;
      }
    };
    private static final PropertiesConverter propertiesConverter = new PropertiesConverter();

    private com.google.protobuf.MapFieldBuilder<
        java.lang.String, com.vesoft.nebula.proto.common.ValueOrBuilder, com.vesoft.nebula.proto.common.Value, com.vesoft.nebula.proto.common.Value.Builder> properties_;
    private com.google.protobuf.MapFieldBuilder
        internalGetProperties() {
      if (properties_ == null) {
        return new com.google.protobuf.MapFieldBuilder<>(propertiesConverter);
      }
      return properties_;
    }
    private com.google.protobuf.MapFieldBuilder
        internalGetMutableProperties() {
      if (properties_ == null) {
        properties_ = new com.google.protobuf.MapFieldBuilder<>(propertiesConverter);
      }
      bitField0_ |= 0x00000080;
      onChanged();
      return properties_;
    }
    public int getPropertiesCount() {
      return internalGetProperties().ensureBuilderMap().size();
    }
    /**
     * map<string, .nebula.proto.common.Value> properties = 8;
     */
    @java.lang.Override
    public boolean containsProperties(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      return internalGetProperties().ensureBuilderMap().containsKey(key);
    }
    /**
     * Use {@link #getPropertiesMap()} instead.
     */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map getProperties() {
      return getPropertiesMap();
    }
    /**
     * map<string, .nebula.proto.common.Value> properties = 8;
     */
    @java.lang.Override
    public java.util.Map getPropertiesMap() {
      return internalGetProperties().getImmutableMap();
    }
    /**
     * map<string, .nebula.proto.common.Value> properties = 8;
     */
    @java.lang.Override
    public /* nullable */
com.vesoft.nebula.proto.common.Value getPropertiesOrDefault(
        java.lang.String key,
        /* nullable */
com.vesoft.nebula.proto.common.Value defaultValue) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map map = internalGetMutableProperties().ensureBuilderMap();
      return map.containsKey(key) ? propertiesConverter.build(map.get(key)) : defaultValue;
    }
    /**
     * map<string, .nebula.proto.common.Value> properties = 8;
     */
    @java.lang.Override
    public com.vesoft.nebula.proto.common.Value getPropertiesOrThrow(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map map = internalGetMutableProperties().ensureBuilderMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return propertiesConverter.build(map.get(key));
    }
    public Builder clearProperties() {
      bitField0_ = (bitField0_ & ~0x00000080);
      internalGetMutableProperties().clear();
      return this;
    }
    /**
     * map<string, .nebula.proto.common.Value> properties = 8;
     */
    public Builder removeProperties(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      internalGetMutableProperties().ensureBuilderMap()
          .remove(key);
      return this;
    }
    /**
     * Use alternate mutation accessors instead.
     */
    @java.lang.Deprecated
    public java.util.Map
        getMutableProperties() {
      bitField0_ |= 0x00000080;
      return internalGetMutableProperties().ensureMessageMap();
    }
    /**
     * map<string, .nebula.proto.common.Value> properties = 8;
     */
    public Builder putProperties(
        java.lang.String key,
        com.vesoft.nebula.proto.common.Value value) {
      if (key == null) { throw new NullPointerException("map key"); }
      if (value == null) { throw new NullPointerException("map value"); }
      internalGetMutableProperties().ensureBuilderMap()
          .put(key, value);
      bitField0_ |= 0x00000080;
      return this;
    }
    /**
     * map<string, .nebula.proto.common.Value> properties = 8;
     */
    public Builder putAllProperties(
        java.util.Map values) {
      for (java.util.Map.Entry e : values.entrySet()) {
        if (e.getKey() == null || e.getValue() == null) {
          throw new NullPointerException();
        }
      }
      internalGetMutableProperties().ensureBuilderMap()
          .putAll(values);
      bitField0_ |= 0x00000080;
      return this;
    }
    /**
     * map<string, .nebula.proto.common.Value> properties = 8;
     */
    public com.vesoft.nebula.proto.common.Value.Builder putPropertiesBuilderIfAbsent(
        java.lang.String key) {
      java.util.Map builderMap = internalGetMutableProperties().ensureBuilderMap();
      com.vesoft.nebula.proto.common.ValueOrBuilder entry = builderMap.get(key);
      if (entry == null) {
        entry = com.vesoft.nebula.proto.common.Value.newBuilder();
        builderMap.put(key, entry);
      }
      if (entry instanceof com.vesoft.nebula.proto.common.Value) {
        entry = ((com.vesoft.nebula.proto.common.Value) entry).toBuilder();
        builderMap.put(key, entry);
      }
      return (com.vesoft.nebula.proto.common.Value.Builder) entry;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:nebula.proto.common.Edge)
  }

  // @@protoc_insertion_point(class_scope:nebula.proto.common.Edge)
  private static final com.vesoft.nebula.proto.common.Edge DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.vesoft.nebula.proto.common.Edge();
  }

  public static com.vesoft.nebula.proto.common.Edge getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser
      PARSER = new com.google.protobuf.AbstractParser() {
    @java.lang.Override
    public Edge parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      Builder builder = newBuilder();
      try {
        builder.mergeFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(builder.buildPartial());
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e)
            .setUnfinishedMessage(builder.buildPartial());
      }
      return builder.buildPartial();
    }
  };

  public static com.google.protobuf.Parser parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.vesoft.nebula.proto.common.Edge getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy