com.hederahashgraph.api.proto.java.NodeAddress Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: basic_types.proto
package com.hederahashgraph.api.proto.java;
/**
*
**
* The data about a node, including its service endpoints and the Hedera account to be paid for
* services provided by the node (that is, queries answered and transactions submitted.)
* If the `serviceEndpoint` list is not set, or empty, then the endpoint given by the
* (deprecated) `ipAddress` and `portno` fields should be used.
* All fields are populated in the 0.0.102 address book file while only fields that start with # are
* populated in the 0.0.101 address book file.
*
*
* Protobuf type {@code proto.NodeAddress}
*/
public final class NodeAddress extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:proto.NodeAddress)
NodeAddressOrBuilder {
private static final long serialVersionUID = 0L;
// Use NodeAddress.newBuilder() to construct.
private NodeAddress(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private NodeAddress() {
ipAddress_ = com.google.protobuf.ByteString.EMPTY;
memo_ = com.google.protobuf.ByteString.EMPTY;
rSAPubKey_ = "";
nodeCertHash_ = com.google.protobuf.ByteString.EMPTY;
serviceEndpoint_ = java.util.Collections.emptyList();
description_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new NodeAddress();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private NodeAddress(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
ipAddress_ = input.readBytes();
break;
}
case 16: {
portno_ = input.readInt32();
break;
}
case 26: {
memo_ = input.readBytes();
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
rSAPubKey_ = s;
break;
}
case 40: {
nodeId_ = input.readInt64();
break;
}
case 50: {
com.hederahashgraph.api.proto.java.AccountID.Builder subBuilder = null;
if (nodeAccountId_ != null) {
subBuilder = nodeAccountId_.toBuilder();
}
nodeAccountId_ = input.readMessage(com.hederahashgraph.api.proto.java.AccountID.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(nodeAccountId_);
nodeAccountId_ = subBuilder.buildPartial();
}
break;
}
case 58: {
nodeCertHash_ = input.readBytes();
break;
}
case 66: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
serviceEndpoint_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
serviceEndpoint_.add(
input.readMessage(com.hederahashgraph.api.proto.java.ServiceEndpoint.parser(), extensionRegistry));
break;
}
case 74: {
java.lang.String s = input.readStringRequireUtf8();
description_ = s;
break;
}
case 80: {
stake_ = input.readInt64();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
serviceEndpoint_ = java.util.Collections.unmodifiableList(serviceEndpoint_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hederahashgraph.api.proto.java.BasicTypes.internal_static_proto_NodeAddress_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hederahashgraph.api.proto.java.BasicTypes.internal_static_proto_NodeAddress_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hederahashgraph.api.proto.java.NodeAddress.class, com.hederahashgraph.api.proto.java.NodeAddress.Builder.class);
}
public static final int IPADDRESS_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString ipAddress_;
/**
*
**
* The IP address of the Node with separator & octets encoded in UTF-8. Usage is deprecated,
* ServiceEndpoint is preferred to retrieve a node's list of IP addresses and ports
*
*
* bytes ipAddress = 1 [deprecated = true];
* @return The ipAddress.
*/
@java.lang.Override
@java.lang.Deprecated public com.google.protobuf.ByteString getIpAddress() {
return ipAddress_;
}
public static final int PORTNO_FIELD_NUMBER = 2;
private int portno_;
/**
*
**
* The port number of the grpc server for the node. Usage is deprecated, ServiceEndpoint is
* preferred to retrieve a node's list of IP addresses and ports
*
*
* int32 portno = 2 [deprecated = true];
* @return The portno.
*/
@java.lang.Override
@java.lang.Deprecated public int getPortno() {
return portno_;
}
public static final int MEMO_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString memo_;
/**
*
**
* Usage is deprecated, nodeAccountId is preferred to retrieve a node's account ID
*
*
* bytes memo = 3 [deprecated = true];
* @return The memo.
*/
@java.lang.Override
@java.lang.Deprecated public com.google.protobuf.ByteString getMemo() {
return memo_;
}
public static final int RSA_PUBKEY_FIELD_NUMBER = 4;
private volatile java.lang.Object rSAPubKey_;
/**
*
**
* The node's X509 RSA public key used to sign stream files (e.g., record stream
* files). Precisely, this field is a string of hexadecimal characters which,
* translated to binary, are the public key's DER encoding.
*
*
* string RSA_PubKey = 4;
* @return The rSAPubKey.
*/
@java.lang.Override
public java.lang.String getRSAPubKey() {
java.lang.Object ref = rSAPubKey_;
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();
rSAPubKey_ = s;
return s;
}
}
/**
*
**
* The node's X509 RSA public key used to sign stream files (e.g., record stream
* files). Precisely, this field is a string of hexadecimal characters which,
* translated to binary, are the public key's DER encoding.
*
*
* string RSA_PubKey = 4;
* @return The bytes for rSAPubKey.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getRSAPubKeyBytes() {
java.lang.Object ref = rSAPubKey_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
rSAPubKey_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NODEID_FIELD_NUMBER = 5;
private long nodeId_;
/**
*
**
* # A non-sequential identifier for the node
*
*
* int64 nodeId = 5;
* @return The nodeId.
*/
@java.lang.Override
public long getNodeId() {
return nodeId_;
}
public static final int NODEACCOUNTID_FIELD_NUMBER = 6;
private com.hederahashgraph.api.proto.java.AccountID nodeAccountId_;
/**
*
**
* # The account to be paid for queries and transactions sent to this node
*
*
* .proto.AccountID nodeAccountId = 6;
* @return Whether the nodeAccountId field is set.
*/
@java.lang.Override
public boolean hasNodeAccountId() {
return nodeAccountId_ != null;
}
/**
*
**
* # The account to be paid for queries and transactions sent to this node
*
*
* .proto.AccountID nodeAccountId = 6;
* @return The nodeAccountId.
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.AccountID getNodeAccountId() {
return nodeAccountId_ == null ? com.hederahashgraph.api.proto.java.AccountID.getDefaultInstance() : nodeAccountId_;
}
/**
*
**
* # The account to be paid for queries and transactions sent to this node
*
*
* .proto.AccountID nodeAccountId = 6;
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.AccountIDOrBuilder getNodeAccountIdOrBuilder() {
return getNodeAccountId();
}
public static final int NODECERTHASH_FIELD_NUMBER = 7;
private com.google.protobuf.ByteString nodeCertHash_;
/**
*
**
* # Hash of the node's TLS certificate. Precisely, this field is a string of
* hexadecimal characters which, translated to binary, are the SHA-384 hash of
* the UTF-8 NFKD encoding of the node's TLS cert in PEM format. Its value can be
* used to verify the node's certificate it presents during TLS negotiations.
*
*
* bytes nodeCertHash = 7;
* @return The nodeCertHash.
*/
@java.lang.Override
public com.google.protobuf.ByteString getNodeCertHash() {
return nodeCertHash_;
}
public static final int SERVICEENDPOINT_FIELD_NUMBER = 8;
private java.util.List serviceEndpoint_;
/**
*
**
* # A node's service IP addresses and ports
*
*
* repeated .proto.ServiceEndpoint serviceEndpoint = 8;
*/
@java.lang.Override
public java.util.List getServiceEndpointList() {
return serviceEndpoint_;
}
/**
*
**
* # A node's service IP addresses and ports
*
*
* repeated .proto.ServiceEndpoint serviceEndpoint = 8;
*/
@java.lang.Override
public java.util.List extends com.hederahashgraph.api.proto.java.ServiceEndpointOrBuilder>
getServiceEndpointOrBuilderList() {
return serviceEndpoint_;
}
/**
*
**
* # A node's service IP addresses and ports
*
*
* repeated .proto.ServiceEndpoint serviceEndpoint = 8;
*/
@java.lang.Override
public int getServiceEndpointCount() {
return serviceEndpoint_.size();
}
/**
*
**
* # A node's service IP addresses and ports
*
*
* repeated .proto.ServiceEndpoint serviceEndpoint = 8;
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.ServiceEndpoint getServiceEndpoint(int index) {
return serviceEndpoint_.get(index);
}
/**
*
**
* # A node's service IP addresses and ports
*
*
* repeated .proto.ServiceEndpoint serviceEndpoint = 8;
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.ServiceEndpointOrBuilder getServiceEndpointOrBuilder(
int index) {
return serviceEndpoint_.get(index);
}
public static final int DESCRIPTION_FIELD_NUMBER = 9;
private volatile java.lang.Object description_;
/**
*
**
* A description of the node, with UTF-8 encoding up to 100 bytes
*
*
* string description = 9;
* @return The description.
*/
@java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
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();
description_ = s;
return s;
}
}
/**
*
**
* A description of the node, with UTF-8 encoding up to 100 bytes
*
*
* string description = 9;
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STAKE_FIELD_NUMBER = 10;
private long stake_;
/**
*
**
* [Deprecated] The amount of tinybars staked to the node
*
*
* int64 stake = 10 [deprecated = true];
* @return The stake.
*/
@java.lang.Override
@java.lang.Deprecated public long getStake() {
return stake_;
}
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 (!ipAddress_.isEmpty()) {
output.writeBytes(1, ipAddress_);
}
if (portno_ != 0) {
output.writeInt32(2, portno_);
}
if (!memo_.isEmpty()) {
output.writeBytes(3, memo_);
}
if (!getRSAPubKeyBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, rSAPubKey_);
}
if (nodeId_ != 0L) {
output.writeInt64(5, nodeId_);
}
if (nodeAccountId_ != null) {
output.writeMessage(6, getNodeAccountId());
}
if (!nodeCertHash_.isEmpty()) {
output.writeBytes(7, nodeCertHash_);
}
for (int i = 0; i < serviceEndpoint_.size(); i++) {
output.writeMessage(8, serviceEndpoint_.get(i));
}
if (!getDescriptionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, description_);
}
if (stake_ != 0L) {
output.writeInt64(10, stake_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!ipAddress_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, ipAddress_);
}
if (portno_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, portno_);
}
if (!memo_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, memo_);
}
if (!getRSAPubKeyBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, rSAPubKey_);
}
if (nodeId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(5, nodeId_);
}
if (nodeAccountId_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getNodeAccountId());
}
if (!nodeCertHash_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(7, nodeCertHash_);
}
for (int i = 0; i < serviceEndpoint_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, serviceEndpoint_.get(i));
}
if (!getDescriptionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, description_);
}
if (stake_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(10, stake_);
}
size += unknownFields.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.hederahashgraph.api.proto.java.NodeAddress)) {
return super.equals(obj);
}
com.hederahashgraph.api.proto.java.NodeAddress other = (com.hederahashgraph.api.proto.java.NodeAddress) obj;
if (!getIpAddress()
.equals(other.getIpAddress())) return false;
if (getPortno()
!= other.getPortno()) return false;
if (!getMemo()
.equals(other.getMemo())) return false;
if (!getRSAPubKey()
.equals(other.getRSAPubKey())) return false;
if (getNodeId()
!= other.getNodeId()) return false;
if (hasNodeAccountId() != other.hasNodeAccountId()) return false;
if (hasNodeAccountId()) {
if (!getNodeAccountId()
.equals(other.getNodeAccountId())) return false;
}
if (!getNodeCertHash()
.equals(other.getNodeCertHash())) return false;
if (!getServiceEndpointList()
.equals(other.getServiceEndpointList())) return false;
if (!getDescription()
.equals(other.getDescription())) return false;
if (getStake()
!= other.getStake()) return false;
if (!unknownFields.equals(other.unknownFields)) 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) + IPADDRESS_FIELD_NUMBER;
hash = (53 * hash) + getIpAddress().hashCode();
hash = (37 * hash) + PORTNO_FIELD_NUMBER;
hash = (53 * hash) + getPortno();
hash = (37 * hash) + MEMO_FIELD_NUMBER;
hash = (53 * hash) + getMemo().hashCode();
hash = (37 * hash) + RSA_PUBKEY_FIELD_NUMBER;
hash = (53 * hash) + getRSAPubKey().hashCode();
hash = (37 * hash) + NODEID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getNodeId());
if (hasNodeAccountId()) {
hash = (37 * hash) + NODEACCOUNTID_FIELD_NUMBER;
hash = (53 * hash) + getNodeAccountId().hashCode();
}
hash = (37 * hash) + NODECERTHASH_FIELD_NUMBER;
hash = (53 * hash) + getNodeCertHash().hashCode();
if (getServiceEndpointCount() > 0) {
hash = (37 * hash) + SERVICEENDPOINT_FIELD_NUMBER;
hash = (53 * hash) + getServiceEndpointList().hashCode();
}
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
hash = (37 * hash) + STAKE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getStake());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hederahashgraph.api.proto.java.NodeAddress parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hederahashgraph.api.proto.java.NodeAddress parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hederahashgraph.api.proto.java.NodeAddress parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hederahashgraph.api.proto.java.NodeAddress parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hederahashgraph.api.proto.java.NodeAddress parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hederahashgraph.api.proto.java.NodeAddress parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hederahashgraph.api.proto.java.NodeAddress parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hederahashgraph.api.proto.java.NodeAddress 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.hederahashgraph.api.proto.java.NodeAddress parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hederahashgraph.api.proto.java.NodeAddress 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.hederahashgraph.api.proto.java.NodeAddress parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hederahashgraph.api.proto.java.NodeAddress 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.hederahashgraph.api.proto.java.NodeAddress 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;
}
/**
*
**
* The data about a node, including its service endpoints and the Hedera account to be paid for
* services provided by the node (that is, queries answered and transactions submitted.)
* If the `serviceEndpoint` list is not set, or empty, then the endpoint given by the
* (deprecated) `ipAddress` and `portno` fields should be used.
* All fields are populated in the 0.0.102 address book file while only fields that start with # are
* populated in the 0.0.101 address book file.
*
*
* Protobuf type {@code proto.NodeAddress}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:proto.NodeAddress)
com.hederahashgraph.api.proto.java.NodeAddressOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hederahashgraph.api.proto.java.BasicTypes.internal_static_proto_NodeAddress_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hederahashgraph.api.proto.java.BasicTypes.internal_static_proto_NodeAddress_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hederahashgraph.api.proto.java.NodeAddress.class, com.hederahashgraph.api.proto.java.NodeAddress.Builder.class);
}
// Construct using com.hederahashgraph.api.proto.java.NodeAddress.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getServiceEndpointFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
ipAddress_ = com.google.protobuf.ByteString.EMPTY;
portno_ = 0;
memo_ = com.google.protobuf.ByteString.EMPTY;
rSAPubKey_ = "";
nodeId_ = 0L;
if (nodeAccountIdBuilder_ == null) {
nodeAccountId_ = null;
} else {
nodeAccountId_ = null;
nodeAccountIdBuilder_ = null;
}
nodeCertHash_ = com.google.protobuf.ByteString.EMPTY;
if (serviceEndpointBuilder_ == null) {
serviceEndpoint_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
serviceEndpointBuilder_.clear();
}
description_ = "";
stake_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.hederahashgraph.api.proto.java.BasicTypes.internal_static_proto_NodeAddress_descriptor;
}
@java.lang.Override
public com.hederahashgraph.api.proto.java.NodeAddress getDefaultInstanceForType() {
return com.hederahashgraph.api.proto.java.NodeAddress.getDefaultInstance();
}
@java.lang.Override
public com.hederahashgraph.api.proto.java.NodeAddress build() {
com.hederahashgraph.api.proto.java.NodeAddress result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hederahashgraph.api.proto.java.NodeAddress buildPartial() {
com.hederahashgraph.api.proto.java.NodeAddress result = new com.hederahashgraph.api.proto.java.NodeAddress(this);
int from_bitField0_ = bitField0_;
result.ipAddress_ = ipAddress_;
result.portno_ = portno_;
result.memo_ = memo_;
result.rSAPubKey_ = rSAPubKey_;
result.nodeId_ = nodeId_;
if (nodeAccountIdBuilder_ == null) {
result.nodeAccountId_ = nodeAccountId_;
} else {
result.nodeAccountId_ = nodeAccountIdBuilder_.build();
}
result.nodeCertHash_ = nodeCertHash_;
if (serviceEndpointBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
serviceEndpoint_ = java.util.Collections.unmodifiableList(serviceEndpoint_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.serviceEndpoint_ = serviceEndpoint_;
} else {
result.serviceEndpoint_ = serviceEndpointBuilder_.build();
}
result.description_ = description_;
result.stake_ = stake_;
onBuilt();
return result;
}
@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.hederahashgraph.api.proto.java.NodeAddress) {
return mergeFrom((com.hederahashgraph.api.proto.java.NodeAddress)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hederahashgraph.api.proto.java.NodeAddress other) {
if (other == com.hederahashgraph.api.proto.java.NodeAddress.getDefaultInstance()) return this;
if (other.getIpAddress() != com.google.protobuf.ByteString.EMPTY) {
setIpAddress(other.getIpAddress());
}
if (other.getPortno() != 0) {
setPortno(other.getPortno());
}
if (other.getMemo() != com.google.protobuf.ByteString.EMPTY) {
setMemo(other.getMemo());
}
if (!other.getRSAPubKey().isEmpty()) {
rSAPubKey_ = other.rSAPubKey_;
onChanged();
}
if (other.getNodeId() != 0L) {
setNodeId(other.getNodeId());
}
if (other.hasNodeAccountId()) {
mergeNodeAccountId(other.getNodeAccountId());
}
if (other.getNodeCertHash() != com.google.protobuf.ByteString.EMPTY) {
setNodeCertHash(other.getNodeCertHash());
}
if (serviceEndpointBuilder_ == null) {
if (!other.serviceEndpoint_.isEmpty()) {
if (serviceEndpoint_.isEmpty()) {
serviceEndpoint_ = other.serviceEndpoint_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureServiceEndpointIsMutable();
serviceEndpoint_.addAll(other.serviceEndpoint_);
}
onChanged();
}
} else {
if (!other.serviceEndpoint_.isEmpty()) {
if (serviceEndpointBuilder_.isEmpty()) {
serviceEndpointBuilder_.dispose();
serviceEndpointBuilder_ = null;
serviceEndpoint_ = other.serviceEndpoint_;
bitField0_ = (bitField0_ & ~0x00000001);
serviceEndpointBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getServiceEndpointFieldBuilder() : null;
} else {
serviceEndpointBuilder_.addAllMessages(other.serviceEndpoint_);
}
}
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
if (other.getStake() != 0L) {
setStake(other.getStake());
}
this.mergeUnknownFields(other.unknownFields);
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 {
com.hederahashgraph.api.proto.java.NodeAddress parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.hederahashgraph.api.proto.java.NodeAddress) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.ByteString ipAddress_ = com.google.protobuf.ByteString.EMPTY;
/**
*
**
* The IP address of the Node with separator & octets encoded in UTF-8. Usage is deprecated,
* ServiceEndpoint is preferred to retrieve a node's list of IP addresses and ports
*
*
* bytes ipAddress = 1 [deprecated = true];
* @return The ipAddress.
*/
@java.lang.Override
@java.lang.Deprecated public com.google.protobuf.ByteString getIpAddress() {
return ipAddress_;
}
/**
*
**
* The IP address of the Node with separator & octets encoded in UTF-8. Usage is deprecated,
* ServiceEndpoint is preferred to retrieve a node's list of IP addresses and ports
*
*
* bytes ipAddress = 1 [deprecated = true];
* @param value The ipAddress to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setIpAddress(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ipAddress_ = value;
onChanged();
return this;
}
/**
*
**
* The IP address of the Node with separator & octets encoded in UTF-8. Usage is deprecated,
* ServiceEndpoint is preferred to retrieve a node's list of IP addresses and ports
*
*
* bytes ipAddress = 1 [deprecated = true];
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder clearIpAddress() {
ipAddress_ = getDefaultInstance().getIpAddress();
onChanged();
return this;
}
private int portno_ ;
/**
*
**
* The port number of the grpc server for the node. Usage is deprecated, ServiceEndpoint is
* preferred to retrieve a node's list of IP addresses and ports
*
*
* int32 portno = 2 [deprecated = true];
* @return The portno.
*/
@java.lang.Override
@java.lang.Deprecated public int getPortno() {
return portno_;
}
/**
*
**
* The port number of the grpc server for the node. Usage is deprecated, ServiceEndpoint is
* preferred to retrieve a node's list of IP addresses and ports
*
*
* int32 portno = 2 [deprecated = true];
* @param value The portno to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setPortno(int value) {
portno_ = value;
onChanged();
return this;
}
/**
*
**
* The port number of the grpc server for the node. Usage is deprecated, ServiceEndpoint is
* preferred to retrieve a node's list of IP addresses and ports
*
*
* int32 portno = 2 [deprecated = true];
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder clearPortno() {
portno_ = 0;
onChanged();
return this;
}
private com.google.protobuf.ByteString memo_ = com.google.protobuf.ByteString.EMPTY;
/**
*
**
* Usage is deprecated, nodeAccountId is preferred to retrieve a node's account ID
*
*
* bytes memo = 3 [deprecated = true];
* @return The memo.
*/
@java.lang.Override
@java.lang.Deprecated public com.google.protobuf.ByteString getMemo() {
return memo_;
}
/**
*
**
* Usage is deprecated, nodeAccountId is preferred to retrieve a node's account ID
*
*
* bytes memo = 3 [deprecated = true];
* @param value The memo to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setMemo(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
memo_ = value;
onChanged();
return this;
}
/**
*
**
* Usage is deprecated, nodeAccountId is preferred to retrieve a node's account ID
*
*
* bytes memo = 3 [deprecated = true];
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder clearMemo() {
memo_ = getDefaultInstance().getMemo();
onChanged();
return this;
}
private java.lang.Object rSAPubKey_ = "";
/**
*
**
* The node's X509 RSA public key used to sign stream files (e.g., record stream
* files). Precisely, this field is a string of hexadecimal characters which,
* translated to binary, are the public key's DER encoding.
*
*
* string RSA_PubKey = 4;
* @return The rSAPubKey.
*/
public java.lang.String getRSAPubKey() {
java.lang.Object ref = rSAPubKey_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
rSAPubKey_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
**
* The node's X509 RSA public key used to sign stream files (e.g., record stream
* files). Precisely, this field is a string of hexadecimal characters which,
* translated to binary, are the public key's DER encoding.
*
*
* string RSA_PubKey = 4;
* @return The bytes for rSAPubKey.
*/
public com.google.protobuf.ByteString
getRSAPubKeyBytes() {
java.lang.Object ref = rSAPubKey_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
rSAPubKey_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
**
* The node's X509 RSA public key used to sign stream files (e.g., record stream
* files). Precisely, this field is a string of hexadecimal characters which,
* translated to binary, are the public key's DER encoding.
*
*
* string RSA_PubKey = 4;
* @param value The rSAPubKey to set.
* @return This builder for chaining.
*/
public Builder setRSAPubKey(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
rSAPubKey_ = value;
onChanged();
return this;
}
/**
*
**
* The node's X509 RSA public key used to sign stream files (e.g., record stream
* files). Precisely, this field is a string of hexadecimal characters which,
* translated to binary, are the public key's DER encoding.
*
*
* string RSA_PubKey = 4;
* @return This builder for chaining.
*/
public Builder clearRSAPubKey() {
rSAPubKey_ = getDefaultInstance().getRSAPubKey();
onChanged();
return this;
}
/**
*
**
* The node's X509 RSA public key used to sign stream files (e.g., record stream
* files). Precisely, this field is a string of hexadecimal characters which,
* translated to binary, are the public key's DER encoding.
*
*
* string RSA_PubKey = 4;
* @param value The bytes for rSAPubKey to set.
* @return This builder for chaining.
*/
public Builder setRSAPubKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
rSAPubKey_ = value;
onChanged();
return this;
}
private long nodeId_ ;
/**
*
**
* # A non-sequential identifier for the node
*
*
* int64 nodeId = 5;
* @return The nodeId.
*/
@java.lang.Override
public long getNodeId() {
return nodeId_;
}
/**
*
**
* # A non-sequential identifier for the node
*
*
* int64 nodeId = 5;
* @param value The nodeId to set.
* @return This builder for chaining.
*/
public Builder setNodeId(long value) {
nodeId_ = value;
onChanged();
return this;
}
/**
*
**
* # A non-sequential identifier for the node
*
*
* int64 nodeId = 5;
* @return This builder for chaining.
*/
public Builder clearNodeId() {
nodeId_ = 0L;
onChanged();
return this;
}
private com.hederahashgraph.api.proto.java.AccountID nodeAccountId_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.AccountID, com.hederahashgraph.api.proto.java.AccountID.Builder, com.hederahashgraph.api.proto.java.AccountIDOrBuilder> nodeAccountIdBuilder_;
/**
*
**
* # The account to be paid for queries and transactions sent to this node
*
*
* .proto.AccountID nodeAccountId = 6;
* @return Whether the nodeAccountId field is set.
*/
public boolean hasNodeAccountId() {
return nodeAccountIdBuilder_ != null || nodeAccountId_ != null;
}
/**
*
**
* # The account to be paid for queries and transactions sent to this node
*
*
* .proto.AccountID nodeAccountId = 6;
* @return The nodeAccountId.
*/
public com.hederahashgraph.api.proto.java.AccountID getNodeAccountId() {
if (nodeAccountIdBuilder_ == null) {
return nodeAccountId_ == null ? com.hederahashgraph.api.proto.java.AccountID.getDefaultInstance() : nodeAccountId_;
} else {
return nodeAccountIdBuilder_.getMessage();
}
}
/**
*
**
* # The account to be paid for queries and transactions sent to this node
*
*
* .proto.AccountID nodeAccountId = 6;
*/
public Builder setNodeAccountId(com.hederahashgraph.api.proto.java.AccountID value) {
if (nodeAccountIdBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
nodeAccountId_ = value;
onChanged();
} else {
nodeAccountIdBuilder_.setMessage(value);
}
return this;
}
/**
*
**
* # The account to be paid for queries and transactions sent to this node
*
*
* .proto.AccountID nodeAccountId = 6;
*/
public Builder setNodeAccountId(
com.hederahashgraph.api.proto.java.AccountID.Builder builderForValue) {
if (nodeAccountIdBuilder_ == null) {
nodeAccountId_ = builderForValue.build();
onChanged();
} else {
nodeAccountIdBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
**
* # The account to be paid for queries and transactions sent to this node
*
*
* .proto.AccountID nodeAccountId = 6;
*/
public Builder mergeNodeAccountId(com.hederahashgraph.api.proto.java.AccountID value) {
if (nodeAccountIdBuilder_ == null) {
if (nodeAccountId_ != null) {
nodeAccountId_ =
com.hederahashgraph.api.proto.java.AccountID.newBuilder(nodeAccountId_).mergeFrom(value).buildPartial();
} else {
nodeAccountId_ = value;
}
onChanged();
} else {
nodeAccountIdBuilder_.mergeFrom(value);
}
return this;
}
/**
*
**
* # The account to be paid for queries and transactions sent to this node
*
*
* .proto.AccountID nodeAccountId = 6;
*/
public Builder clearNodeAccountId() {
if (nodeAccountIdBuilder_ == null) {
nodeAccountId_ = null;
onChanged();
} else {
nodeAccountId_ = null;
nodeAccountIdBuilder_ = null;
}
return this;
}
/**
*
**
* # The account to be paid for queries and transactions sent to this node
*
*
* .proto.AccountID nodeAccountId = 6;
*/
public com.hederahashgraph.api.proto.java.AccountID.Builder getNodeAccountIdBuilder() {
onChanged();
return getNodeAccountIdFieldBuilder().getBuilder();
}
/**
*
**
* # The account to be paid for queries and transactions sent to this node
*
*
* .proto.AccountID nodeAccountId = 6;
*/
public com.hederahashgraph.api.proto.java.AccountIDOrBuilder getNodeAccountIdOrBuilder() {
if (nodeAccountIdBuilder_ != null) {
return nodeAccountIdBuilder_.getMessageOrBuilder();
} else {
return nodeAccountId_ == null ?
com.hederahashgraph.api.proto.java.AccountID.getDefaultInstance() : nodeAccountId_;
}
}
/**
*
**
* # The account to be paid for queries and transactions sent to this node
*
*
* .proto.AccountID nodeAccountId = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.AccountID, com.hederahashgraph.api.proto.java.AccountID.Builder, com.hederahashgraph.api.proto.java.AccountIDOrBuilder>
getNodeAccountIdFieldBuilder() {
if (nodeAccountIdBuilder_ == null) {
nodeAccountIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.AccountID, com.hederahashgraph.api.proto.java.AccountID.Builder, com.hederahashgraph.api.proto.java.AccountIDOrBuilder>(
getNodeAccountId(),
getParentForChildren(),
isClean());
nodeAccountId_ = null;
}
return nodeAccountIdBuilder_;
}
private com.google.protobuf.ByteString nodeCertHash_ = com.google.protobuf.ByteString.EMPTY;
/**
*
**
* # Hash of the node's TLS certificate. Precisely, this field is a string of
* hexadecimal characters which, translated to binary, are the SHA-384 hash of
* the UTF-8 NFKD encoding of the node's TLS cert in PEM format. Its value can be
* used to verify the node's certificate it presents during TLS negotiations.
*
*
* bytes nodeCertHash = 7;
* @return The nodeCertHash.
*/
@java.lang.Override
public com.google.protobuf.ByteString getNodeCertHash() {
return nodeCertHash_;
}
/**
*
**
* # Hash of the node's TLS certificate. Precisely, this field is a string of
* hexadecimal characters which, translated to binary, are the SHA-384 hash of
* the UTF-8 NFKD encoding of the node's TLS cert in PEM format. Its value can be
* used to verify the node's certificate it presents during TLS negotiations.
*
*
* bytes nodeCertHash = 7;
* @param value The nodeCertHash to set.
* @return This builder for chaining.
*/
public Builder setNodeCertHash(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
nodeCertHash_ = value;
onChanged();
return this;
}
/**
*
**
* # Hash of the node's TLS certificate. Precisely, this field is a string of
* hexadecimal characters which, translated to binary, are the SHA-384 hash of
* the UTF-8 NFKD encoding of the node's TLS cert in PEM format. Its value can be
* used to verify the node's certificate it presents during TLS negotiations.
*
*
* bytes nodeCertHash = 7;
* @return This builder for chaining.
*/
public Builder clearNodeCertHash() {
nodeCertHash_ = getDefaultInstance().getNodeCertHash();
onChanged();
return this;
}
private java.util.List serviceEndpoint_ =
java.util.Collections.emptyList();
private void ensureServiceEndpointIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
serviceEndpoint_ = new java.util.ArrayList(serviceEndpoint_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.hederahashgraph.api.proto.java.ServiceEndpoint, com.hederahashgraph.api.proto.java.ServiceEndpoint.Builder, com.hederahashgraph.api.proto.java.ServiceEndpointOrBuilder> serviceEndpointBuilder_;
/**
*
**
* # A node's service IP addresses and ports
*
*
* repeated .proto.ServiceEndpoint serviceEndpoint = 8;
*/
public java.util.List getServiceEndpointList() {
if (serviceEndpointBuilder_ == null) {
return java.util.Collections.unmodifiableList(serviceEndpoint_);
} else {
return serviceEndpointBuilder_.getMessageList();
}
}
/**
*
**
* # A node's service IP addresses and ports
*
*
* repeated .proto.ServiceEndpoint serviceEndpoint = 8;
*/
public int getServiceEndpointCount() {
if (serviceEndpointBuilder_ == null) {
return serviceEndpoint_.size();
} else {
return serviceEndpointBuilder_.getCount();
}
}
/**
*
**
* # A node's service IP addresses and ports
*
*
* repeated .proto.ServiceEndpoint serviceEndpoint = 8;
*/
public com.hederahashgraph.api.proto.java.ServiceEndpoint getServiceEndpoint(int index) {
if (serviceEndpointBuilder_ == null) {
return serviceEndpoint_.get(index);
} else {
return serviceEndpointBuilder_.getMessage(index);
}
}
/**
*
**
* # A node's service IP addresses and ports
*
*
* repeated .proto.ServiceEndpoint serviceEndpoint = 8;
*/
public Builder setServiceEndpoint(
int index, com.hederahashgraph.api.proto.java.ServiceEndpoint value) {
if (serviceEndpointBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureServiceEndpointIsMutable();
serviceEndpoint_.set(index, value);
onChanged();
} else {
serviceEndpointBuilder_.setMessage(index, value);
}
return this;
}
/**
*
**
* # A node's service IP addresses and ports
*
*
* repeated .proto.ServiceEndpoint serviceEndpoint = 8;
*/
public Builder setServiceEndpoint(
int index, com.hederahashgraph.api.proto.java.ServiceEndpoint.Builder builderForValue) {
if (serviceEndpointBuilder_ == null) {
ensureServiceEndpointIsMutable();
serviceEndpoint_.set(index, builderForValue.build());
onChanged();
} else {
serviceEndpointBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
**
* # A node's service IP addresses and ports
*
*
* repeated .proto.ServiceEndpoint serviceEndpoint = 8;
*/
public Builder addServiceEndpoint(com.hederahashgraph.api.proto.java.ServiceEndpoint value) {
if (serviceEndpointBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureServiceEndpointIsMutable();
serviceEndpoint_.add(value);
onChanged();
} else {
serviceEndpointBuilder_.addMessage(value);
}
return this;
}
/**
*
**
* # A node's service IP addresses and ports
*
*
* repeated .proto.ServiceEndpoint serviceEndpoint = 8;
*/
public Builder addServiceEndpoint(
int index, com.hederahashgraph.api.proto.java.ServiceEndpoint value) {
if (serviceEndpointBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureServiceEndpointIsMutable();
serviceEndpoint_.add(index, value);
onChanged();
} else {
serviceEndpointBuilder_.addMessage(index, value);
}
return this;
}
/**
*
**
* # A node's service IP addresses and ports
*
*
* repeated .proto.ServiceEndpoint serviceEndpoint = 8;
*/
public Builder addServiceEndpoint(
com.hederahashgraph.api.proto.java.ServiceEndpoint.Builder builderForValue) {
if (serviceEndpointBuilder_ == null) {
ensureServiceEndpointIsMutable();
serviceEndpoint_.add(builderForValue.build());
onChanged();
} else {
serviceEndpointBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
**
* # A node's service IP addresses and ports
*
*
* repeated .proto.ServiceEndpoint serviceEndpoint = 8;
*/
public Builder addServiceEndpoint(
int index, com.hederahashgraph.api.proto.java.ServiceEndpoint.Builder builderForValue) {
if (serviceEndpointBuilder_ == null) {
ensureServiceEndpointIsMutable();
serviceEndpoint_.add(index, builderForValue.build());
onChanged();
} else {
serviceEndpointBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
**
* # A node's service IP addresses and ports
*
*
* repeated .proto.ServiceEndpoint serviceEndpoint = 8;
*/
public Builder addAllServiceEndpoint(
java.lang.Iterable extends com.hederahashgraph.api.proto.java.ServiceEndpoint> values) {
if (serviceEndpointBuilder_ == null) {
ensureServiceEndpointIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, serviceEndpoint_);
onChanged();
} else {
serviceEndpointBuilder_.addAllMessages(values);
}
return this;
}
/**
*
**
* # A node's service IP addresses and ports
*
*
* repeated .proto.ServiceEndpoint serviceEndpoint = 8;
*/
public Builder clearServiceEndpoint() {
if (serviceEndpointBuilder_ == null) {
serviceEndpoint_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
serviceEndpointBuilder_.clear();
}
return this;
}
/**
*
**
* # A node's service IP addresses and ports
*
*
* repeated .proto.ServiceEndpoint serviceEndpoint = 8;
*/
public Builder removeServiceEndpoint(int index) {
if (serviceEndpointBuilder_ == null) {
ensureServiceEndpointIsMutable();
serviceEndpoint_.remove(index);
onChanged();
} else {
serviceEndpointBuilder_.remove(index);
}
return this;
}
/**
*
**
* # A node's service IP addresses and ports
*
*
* repeated .proto.ServiceEndpoint serviceEndpoint = 8;
*/
public com.hederahashgraph.api.proto.java.ServiceEndpoint.Builder getServiceEndpointBuilder(
int index) {
return getServiceEndpointFieldBuilder().getBuilder(index);
}
/**
*
**
* # A node's service IP addresses and ports
*
*
* repeated .proto.ServiceEndpoint serviceEndpoint = 8;
*/
public com.hederahashgraph.api.proto.java.ServiceEndpointOrBuilder getServiceEndpointOrBuilder(
int index) {
if (serviceEndpointBuilder_ == null) {
return serviceEndpoint_.get(index); } else {
return serviceEndpointBuilder_.getMessageOrBuilder(index);
}
}
/**
*
**
* # A node's service IP addresses and ports
*
*
* repeated .proto.ServiceEndpoint serviceEndpoint = 8;
*/
public java.util.List extends com.hederahashgraph.api.proto.java.ServiceEndpointOrBuilder>
getServiceEndpointOrBuilderList() {
if (serviceEndpointBuilder_ != null) {
return serviceEndpointBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(serviceEndpoint_);
}
}
/**
*
**
* # A node's service IP addresses and ports
*
*
* repeated .proto.ServiceEndpoint serviceEndpoint = 8;
*/
public com.hederahashgraph.api.proto.java.ServiceEndpoint.Builder addServiceEndpointBuilder() {
return getServiceEndpointFieldBuilder().addBuilder(
com.hederahashgraph.api.proto.java.ServiceEndpoint.getDefaultInstance());
}
/**
*
**
* # A node's service IP addresses and ports
*
*
* repeated .proto.ServiceEndpoint serviceEndpoint = 8;
*/
public com.hederahashgraph.api.proto.java.ServiceEndpoint.Builder addServiceEndpointBuilder(
int index) {
return getServiceEndpointFieldBuilder().addBuilder(
index, com.hederahashgraph.api.proto.java.ServiceEndpoint.getDefaultInstance());
}
/**
*
**
* # A node's service IP addresses and ports
*
*
* repeated .proto.ServiceEndpoint serviceEndpoint = 8;
*/
public java.util.List
getServiceEndpointBuilderList() {
return getServiceEndpointFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.hederahashgraph.api.proto.java.ServiceEndpoint, com.hederahashgraph.api.proto.java.ServiceEndpoint.Builder, com.hederahashgraph.api.proto.java.ServiceEndpointOrBuilder>
getServiceEndpointFieldBuilder() {
if (serviceEndpointBuilder_ == null) {
serviceEndpointBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.hederahashgraph.api.proto.java.ServiceEndpoint, com.hederahashgraph.api.proto.java.ServiceEndpoint.Builder, com.hederahashgraph.api.proto.java.ServiceEndpointOrBuilder>(
serviceEndpoint_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
serviceEndpoint_ = null;
}
return serviceEndpointBuilder_;
}
private java.lang.Object description_ = "";
/**
*
**
* A description of the node, with UTF-8 encoding up to 100 bytes
*
*
* string description = 9;
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
**
* A description of the node, with UTF-8 encoding up to 100 bytes
*
*
* string description = 9;
* @return The bytes for description.
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
**
* A description of the node, with UTF-8 encoding up to 100 bytes
*
*
* string description = 9;
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
onChanged();
return this;
}
/**
*
**
* A description of the node, with UTF-8 encoding up to 100 bytes
*
*
* string description = 9;
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
*
**
* A description of the node, with UTF-8 encoding up to 100 bytes
*
*
* string description = 9;
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
onChanged();
return this;
}
private long stake_ ;
/**
*
**
* [Deprecated] The amount of tinybars staked to the node
*
*
* int64 stake = 10 [deprecated = true];
* @return The stake.
*/
@java.lang.Override
@java.lang.Deprecated public long getStake() {
return stake_;
}
/**
*
**
* [Deprecated] The amount of tinybars staked to the node
*
*
* int64 stake = 10 [deprecated = true];
* @param value The stake to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setStake(long value) {
stake_ = value;
onChanged();
return this;
}
/**
*
**
* [Deprecated] The amount of tinybars staked to the node
*
*
* int64 stake = 10 [deprecated = true];
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder clearStake() {
stake_ = 0L;
onChanged();
return this;
}
@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:proto.NodeAddress)
}
// @@protoc_insertion_point(class_scope:proto.NodeAddress)
private static final com.hederahashgraph.api.proto.java.NodeAddress DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hederahashgraph.api.proto.java.NodeAddress();
}
public static com.hederahashgraph.api.proto.java.NodeAddress getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public NodeAddress parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new NodeAddress(input, extensionRegistry);
}
};
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.hederahashgraph.api.proto.java.NodeAddress getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy