com.vesoft.nebula.proto.common.Node 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.Node}
*/
public final class Node extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:nebula.proto.common.Node)
NodeOrBuilder {
private static final long serialVersionUID = 0L;
// Use Node.newBuilder() to construct.
private Node(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Node() {
graph_ = "";
type_ = "";
labels_ =
com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Node();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.vesoft.nebula.proto.common.Common.internal_static_nebula_proto_common_Node_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 5:
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_Node_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.vesoft.nebula.proto.common.Node.class, com.vesoft.nebula.proto.common.Node.Builder.class);
}
public static final int NODE_ID_FIELD_NUMBER = 1;
private long nodeId_ = 0L;
/**
* int64 node_id = 1;
* @return The nodeId.
*/
@java.lang.Override
public long getNodeId() {
return nodeId_;
}
public static final int GRAPH_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object graph_ = "";
/**
* string graph = 2;
* @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 = 2;
* @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 = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object type_ = "";
/**
* string type = 3;
* @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 = 3;
* @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 = 4;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList labels_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
* repeated string labels = 4;
* @return A list containing the labels.
*/
public com.google.protobuf.ProtocolStringList
getLabelsList() {
return labels_;
}
/**
* repeated string labels = 4;
* @return The count of labels.
*/
public int getLabelsCount() {
return labels_.size();
}
/**
* repeated string labels = 4;
* @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 = 4;
* @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 PROPERTIES_FIELD_NUMBER = 5;
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_Node_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 = 5;
*/
@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 = 5;
*/
@java.lang.Override
public java.util.Map getPropertiesMap() {
return internalGetProperties().getMap();
}
/**
* map<string, .nebula.proto.common.Value> properties = 5;
*/
@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 = 5;
*/
@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 (nodeId_ != 0L) {
output.writeInt64(1, nodeId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(graph_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, graph_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, type_);
}
for (int i = 0; i < labels_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, labels_.getRaw(i));
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetProperties(),
PropertiesDefaultEntryHolder.defaultEntry,
5);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (nodeId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, nodeId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(graph_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, graph_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, type_);
}
{
int dataSize = 0;
for (int i = 0; i < labels_.size(); i++) {
dataSize += computeStringSizeNoTag(labels_.getRaw(i));
}
size += dataSize;
size += 1 * getLabelsList().size();
}
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(5, 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.Node)) {
return super.equals(obj);
}
com.vesoft.nebula.proto.common.Node other = (com.vesoft.nebula.proto.common.Node) obj;
if (getNodeId()
!= other.getNodeId()) return false;
if (!getGraph()
.equals(other.getGraph())) return false;
if (!getType()
.equals(other.getType())) return false;
if (!getLabelsList()
.equals(other.getLabelsList())) 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) + NODE_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getNodeId());
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();
}
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.Node parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.vesoft.nebula.proto.common.Node 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.Node parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.vesoft.nebula.proto.common.Node 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.Node parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.vesoft.nebula.proto.common.Node 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.Node parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.vesoft.nebula.proto.common.Node 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.Node parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.vesoft.nebula.proto.common.Node 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.Node 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.Node 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.Node 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.Node}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:nebula.proto.common.Node)
com.vesoft.nebula.proto.common.NodeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.vesoft.nebula.proto.common.Common.internal_static_nebula_proto_common_Node_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 5:
return internalGetProperties();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 5:
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_Node_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.vesoft.nebula.proto.common.Node.class, com.vesoft.nebula.proto.common.Node.Builder.class);
}
// Construct using com.vesoft.nebula.proto.common.Node.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
nodeId_ = 0L;
graph_ = "";
type_ = "";
labels_ =
com.google.protobuf.LazyStringArrayList.emptyList();
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_Node_descriptor;
}
@java.lang.Override
public com.vesoft.nebula.proto.common.Node getDefaultInstanceForType() {
return com.vesoft.nebula.proto.common.Node.getDefaultInstance();
}
@java.lang.Override
public com.vesoft.nebula.proto.common.Node build() {
com.vesoft.nebula.proto.common.Node result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.vesoft.nebula.proto.common.Node buildPartial() {
com.vesoft.nebula.proto.common.Node result = new com.vesoft.nebula.proto.common.Node(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.vesoft.nebula.proto.common.Node result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.nodeId_ = nodeId_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.graph_ = graph_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.type_ = type_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
labels_.makeImmutable();
result.labels_ = labels_;
}
if (((from_bitField0_ & 0x00000010) != 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.Node) {
return mergeFrom((com.vesoft.nebula.proto.common.Node)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.vesoft.nebula.proto.common.Node other) {
if (other == com.vesoft.nebula.proto.common.Node.getDefaultInstance()) return this;
if (other.getNodeId() != 0L) {
setNodeId(other.getNodeId());
}
if (!other.getGraph().isEmpty()) {
graph_ = other.graph_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getType().isEmpty()) {
type_ = other.type_;
bitField0_ |= 0x00000004;
onChanged();
}
if (!other.labels_.isEmpty()) {
if (labels_.isEmpty()) {
labels_ = other.labels_;
bitField0_ |= 0x00000008;
} else {
ensureLabelsIsMutable();
labels_.addAll(other.labels_);
}
onChanged();
}
internalGetMutableProperties().mergeFrom(
other.internalGetProperties());
bitField0_ |= 0x00000010;
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: {
nodeId_ = input.readInt64();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
graph_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
type_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
java.lang.String s = input.readStringRequireUtf8();
ensureLabelsIsMutable();
labels_.add(s);
break;
} // case 34
case 42: {
com.google.protobuf.MapEntry
properties__ = input.readMessage(
PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableProperties().ensureBuilderMap().put(
properties__.getKey(), properties__.getValue());
bitField0_ |= 0x00000010;
break;
} // case 42
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 nodeId_ ;
/**
* int64 node_id = 1;
* @return The nodeId.
*/
@java.lang.Override
public long getNodeId() {
return nodeId_;
}
/**
* int64 node_id = 1;
* @param value The nodeId to set.
* @return This builder for chaining.
*/
public Builder setNodeId(long value) {
nodeId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* int64 node_id = 1;
* @return This builder for chaining.
*/
public Builder clearNodeId() {
bitField0_ = (bitField0_ & ~0x00000001);
nodeId_ = 0L;
onChanged();
return this;
}
private java.lang.Object graph_ = "";
/**
* string graph = 2;
* @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 = 2;
* @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 = 2;
* @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_ |= 0x00000002;
onChanged();
return this;
}
/**
* string graph = 2;
* @return This builder for chaining.
*/
public Builder clearGraph() {
graph_ = getDefaultInstance().getGraph();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* string graph = 2;
* @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_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object type_ = "";
/**
* string type = 3;
* @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 = 3;
* @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 = 3;
* @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_ |= 0x00000004;
onChanged();
return this;
}
/**
* string type = 3;
* @return This builder for chaining.
*/
public Builder clearType() {
type_ = getDefaultInstance().getType();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
* string type = 3;
* @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_ |= 0x00000004;
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_ |= 0x00000008;
}
/**
* repeated string labels = 4;
* @return A list containing the labels.
*/
public com.google.protobuf.ProtocolStringList
getLabelsList() {
labels_.makeImmutable();
return labels_;
}
/**
* repeated string labels = 4;
* @return The count of labels.
*/
public int getLabelsCount() {
return labels_.size();
}
/**
* repeated string labels = 4;
* @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 = 4;
* @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 = 4;
* @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_ |= 0x00000008;
onChanged();
return this;
}
/**
* repeated string labels = 4;
* @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_ |= 0x00000008;
onChanged();
return this;
}
/**
* repeated string labels = 4;
* @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_ |= 0x00000008;
onChanged();
return this;
}
/**
* repeated string labels = 4;
* @return This builder for chaining.
*/
public Builder clearLabels() {
labels_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);;
onChanged();
return this;
}
/**
* repeated string labels = 4;
* @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_ |= 0x00000008;
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_ |= 0x00000010;
onChanged();
return properties_;
}
public int getPropertiesCount() {
return internalGetProperties().ensureBuilderMap().size();
}
/**
* map<string, .nebula.proto.common.Value> properties = 5;
*/
@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 = 5;
*/
@java.lang.Override
public java.util.Map getPropertiesMap() {
return internalGetProperties().getImmutableMap();
}
/**
* map<string, .nebula.proto.common.Value> properties = 5;
*/
@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 = 5;
*/
@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_ & ~0x00000010);
internalGetMutableProperties().clear();
return this;
}
/**
* map<string, .nebula.proto.common.Value> properties = 5;
*/
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_ |= 0x00000010;
return internalGetMutableProperties().ensureMessageMap();
}
/**
* map<string, .nebula.proto.common.Value> properties = 5;
*/
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_ |= 0x00000010;
return this;
}
/**
* map<string, .nebula.proto.common.Value> properties = 5;
*/
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_ |= 0x00000010;
return this;
}
/**
* map<string, .nebula.proto.common.Value> properties = 5;
*/
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.Node)
}
// @@protoc_insertion_point(class_scope:nebula.proto.common.Node)
private static final com.vesoft.nebula.proto.common.Node DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.vesoft.nebula.proto.common.Node();
}
public static com.vesoft.nebula.proto.common.Node getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Node 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.Node getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}