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

com.hederahashgraph.api.proto.java.ServiceEndpoint Maven / Gradle / Ivy

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

package com.hederahashgraph.api.proto.java;

/**
 * 
 **
 * Contains the IP address and the port representing a service endpoint of
 * a Node in a network. Used to reach the Hedera API and submit transactions
 * to the network.
 * When the `domain_name` field is set, the `ipAddressV4` field
 * MUST NOT be set.<br/>
 * When the `ipAddressV4` field is set, the `domain_name` field
 * MUST NOT be set.
 * 
* * Protobuf type {@code proto.ServiceEndpoint} */ public final class ServiceEndpoint extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:proto.ServiceEndpoint) ServiceEndpointOrBuilder { private static final long serialVersionUID = 0L; // Use ServiceEndpoint.newBuilder() to construct. private ServiceEndpoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ServiceEndpoint() { ipAddressV4_ = com.google.protobuf.ByteString.EMPTY; domainName_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new ServiceEndpoint(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ServiceEndpoint( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } 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: { ipAddressV4_ = input.readBytes(); break; } case 16: { port_ = input.readInt32(); break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); domainName_ = s; 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 { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hederahashgraph.api.proto.java.BasicTypes.internal_static_proto_ServiceEndpoint_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hederahashgraph.api.proto.java.BasicTypes.internal_static_proto_ServiceEndpoint_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hederahashgraph.api.proto.java.ServiceEndpoint.class, com.hederahashgraph.api.proto.java.ServiceEndpoint.Builder.class); } public static final int IPADDRESSV4_FIELD_NUMBER = 1; private com.google.protobuf.ByteString ipAddressV4_; /** *
   **
   * The 4-byte IPv4 address of the endpoint encoded in left to right order
   * (e.g. 127.0.0.1 has bytes [127, 0, 0, 1])
   * 
* * bytes ipAddressV4 = 1; * @return The ipAddressV4. */ @java.lang.Override public com.google.protobuf.ByteString getIpAddressV4() { return ipAddressV4_; } public static final int PORT_FIELD_NUMBER = 2; private int port_; /** *
   **
   * The port of the service endpoint
   * 
* * int32 port = 2; * @return The port. */ @java.lang.Override public int getPort() { return port_; } public static final int DOMAIN_NAME_FIELD_NUMBER = 3; private volatile java.lang.Object domainName_; /** *
   **
   * A node domain name.<br/>
   * This MUST be the fully qualified domain(DNS) name of the node.<br/>
   * This value MUST NOT be more than 253 characters.
   * domain_name and ipAddressV4 are mutually exclusive.
   * When the `domain_name` field is set, the `ipAddressV4` field MUST NOT be set.<br/>
   * When the `ipAddressV4` field is set, the `domain_name` field MUST NOT be set.
   * 
* * string domain_name = 3; * @return The domainName. */ @java.lang.Override public java.lang.String getDomainName() { java.lang.Object ref = domainName_; 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(); domainName_ = s; return s; } } /** *
   **
   * A node domain name.<br/>
   * This MUST be the fully qualified domain(DNS) name of the node.<br/>
   * This value MUST NOT be more than 253 characters.
   * domain_name and ipAddressV4 are mutually exclusive.
   * When the `domain_name` field is set, the `ipAddressV4` field MUST NOT be set.<br/>
   * When the `ipAddressV4` field is set, the `domain_name` field MUST NOT be set.
   * 
* * string domain_name = 3; * @return The bytes for domainName. */ @java.lang.Override public com.google.protobuf.ByteString getDomainNameBytes() { java.lang.Object ref = domainName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); domainName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } 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 (!ipAddressV4_.isEmpty()) { output.writeBytes(1, ipAddressV4_); } if (port_ != 0) { output.writeInt32(2, port_); } if (!getDomainNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, domainName_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!ipAddressV4_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, ipAddressV4_); } if (port_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(2, port_); } if (!getDomainNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, domainName_); } 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.ServiceEndpoint)) { return super.equals(obj); } com.hederahashgraph.api.proto.java.ServiceEndpoint other = (com.hederahashgraph.api.proto.java.ServiceEndpoint) obj; if (!getIpAddressV4() .equals(other.getIpAddressV4())) return false; if (getPort() != other.getPort()) return false; if (!getDomainName() .equals(other.getDomainName())) 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) + IPADDRESSV4_FIELD_NUMBER; hash = (53 * hash) + getIpAddressV4().hashCode(); hash = (37 * hash) + PORT_FIELD_NUMBER; hash = (53 * hash) + getPort(); hash = (37 * hash) + DOMAIN_NAME_FIELD_NUMBER; hash = (53 * hash) + getDomainName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.hederahashgraph.api.proto.java.ServiceEndpoint parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hederahashgraph.api.proto.java.ServiceEndpoint 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.ServiceEndpoint parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hederahashgraph.api.proto.java.ServiceEndpoint 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.ServiceEndpoint parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hederahashgraph.api.proto.java.ServiceEndpoint 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.ServiceEndpoint parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.hederahashgraph.api.proto.java.ServiceEndpoint 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.ServiceEndpoint parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.hederahashgraph.api.proto.java.ServiceEndpoint 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.ServiceEndpoint 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.ServiceEndpoint 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.ServiceEndpoint 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; } /** *
   **
   * Contains the IP address and the port representing a service endpoint of
   * a Node in a network. Used to reach the Hedera API and submit transactions
   * to the network.
   * When the `domain_name` field is set, the `ipAddressV4` field
   * MUST NOT be set.<br/>
   * When the `ipAddressV4` field is set, the `domain_name` field
   * MUST NOT be set.
   * 
* * Protobuf type {@code proto.ServiceEndpoint} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:proto.ServiceEndpoint) com.hederahashgraph.api.proto.java.ServiceEndpointOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hederahashgraph.api.proto.java.BasicTypes.internal_static_proto_ServiceEndpoint_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hederahashgraph.api.proto.java.BasicTypes.internal_static_proto_ServiceEndpoint_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hederahashgraph.api.proto.java.ServiceEndpoint.class, com.hederahashgraph.api.proto.java.ServiceEndpoint.Builder.class); } // Construct using com.hederahashgraph.api.proto.java.ServiceEndpoint.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); ipAddressV4_ = com.google.protobuf.ByteString.EMPTY; port_ = 0; domainName_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.hederahashgraph.api.proto.java.BasicTypes.internal_static_proto_ServiceEndpoint_descriptor; } @java.lang.Override public com.hederahashgraph.api.proto.java.ServiceEndpoint getDefaultInstanceForType() { return com.hederahashgraph.api.proto.java.ServiceEndpoint.getDefaultInstance(); } @java.lang.Override public com.hederahashgraph.api.proto.java.ServiceEndpoint build() { com.hederahashgraph.api.proto.java.ServiceEndpoint result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.hederahashgraph.api.proto.java.ServiceEndpoint buildPartial() { com.hederahashgraph.api.proto.java.ServiceEndpoint result = new com.hederahashgraph.api.proto.java.ServiceEndpoint(this); result.ipAddressV4_ = ipAddressV4_; result.port_ = port_; result.domainName_ = domainName_; 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.ServiceEndpoint) { return mergeFrom((com.hederahashgraph.api.proto.java.ServiceEndpoint)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.hederahashgraph.api.proto.java.ServiceEndpoint other) { if (other == com.hederahashgraph.api.proto.java.ServiceEndpoint.getDefaultInstance()) return this; if (other.getIpAddressV4() != com.google.protobuf.ByteString.EMPTY) { setIpAddressV4(other.getIpAddressV4()); } if (other.getPort() != 0) { setPort(other.getPort()); } if (!other.getDomainName().isEmpty()) { domainName_ = other.domainName_; onChanged(); } 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.ServiceEndpoint parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.hederahashgraph.api.proto.java.ServiceEndpoint) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private com.google.protobuf.ByteString ipAddressV4_ = com.google.protobuf.ByteString.EMPTY; /** *
     **
     * The 4-byte IPv4 address of the endpoint encoded in left to right order
     * (e.g. 127.0.0.1 has bytes [127, 0, 0, 1])
     * 
* * bytes ipAddressV4 = 1; * @return The ipAddressV4. */ @java.lang.Override public com.google.protobuf.ByteString getIpAddressV4() { return ipAddressV4_; } /** *
     **
     * The 4-byte IPv4 address of the endpoint encoded in left to right order
     * (e.g. 127.0.0.1 has bytes [127, 0, 0, 1])
     * 
* * bytes ipAddressV4 = 1; * @param value The ipAddressV4 to set. * @return This builder for chaining. */ public Builder setIpAddressV4(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ipAddressV4_ = value; onChanged(); return this; } /** *
     **
     * The 4-byte IPv4 address of the endpoint encoded in left to right order
     * (e.g. 127.0.0.1 has bytes [127, 0, 0, 1])
     * 
* * bytes ipAddressV4 = 1; * @return This builder for chaining. */ public Builder clearIpAddressV4() { ipAddressV4_ = getDefaultInstance().getIpAddressV4(); onChanged(); return this; } private int port_ ; /** *
     **
     * The port of the service endpoint
     * 
* * int32 port = 2; * @return The port. */ @java.lang.Override public int getPort() { return port_; } /** *
     **
     * The port of the service endpoint
     * 
* * int32 port = 2; * @param value The port to set. * @return This builder for chaining. */ public Builder setPort(int value) { port_ = value; onChanged(); return this; } /** *
     **
     * The port of the service endpoint
     * 
* * int32 port = 2; * @return This builder for chaining. */ public Builder clearPort() { port_ = 0; onChanged(); return this; } private java.lang.Object domainName_ = ""; /** *
     **
     * A node domain name.<br/>
     * This MUST be the fully qualified domain(DNS) name of the node.<br/>
     * This value MUST NOT be more than 253 characters.
     * domain_name and ipAddressV4 are mutually exclusive.
     * When the `domain_name` field is set, the `ipAddressV4` field MUST NOT be set.<br/>
     * When the `ipAddressV4` field is set, the `domain_name` field MUST NOT be set.
     * 
* * string domain_name = 3; * @return The domainName. */ public java.lang.String getDomainName() { java.lang.Object ref = domainName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); domainName_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     **
     * A node domain name.<br/>
     * This MUST be the fully qualified domain(DNS) name of the node.<br/>
     * This value MUST NOT be more than 253 characters.
     * domain_name and ipAddressV4 are mutually exclusive.
     * When the `domain_name` field is set, the `ipAddressV4` field MUST NOT be set.<br/>
     * When the `ipAddressV4` field is set, the `domain_name` field MUST NOT be set.
     * 
* * string domain_name = 3; * @return The bytes for domainName. */ public com.google.protobuf.ByteString getDomainNameBytes() { java.lang.Object ref = domainName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); domainName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     **
     * A node domain name.<br/>
     * This MUST be the fully qualified domain(DNS) name of the node.<br/>
     * This value MUST NOT be more than 253 characters.
     * domain_name and ipAddressV4 are mutually exclusive.
     * When the `domain_name` field is set, the `ipAddressV4` field MUST NOT be set.<br/>
     * When the `ipAddressV4` field is set, the `domain_name` field MUST NOT be set.
     * 
* * string domain_name = 3; * @param value The domainName to set. * @return This builder for chaining. */ public Builder setDomainName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } domainName_ = value; onChanged(); return this; } /** *
     **
     * A node domain name.<br/>
     * This MUST be the fully qualified domain(DNS) name of the node.<br/>
     * This value MUST NOT be more than 253 characters.
     * domain_name and ipAddressV4 are mutually exclusive.
     * When the `domain_name` field is set, the `ipAddressV4` field MUST NOT be set.<br/>
     * When the `ipAddressV4` field is set, the `domain_name` field MUST NOT be set.
     * 
* * string domain_name = 3; * @return This builder for chaining. */ public Builder clearDomainName() { domainName_ = getDefaultInstance().getDomainName(); onChanged(); return this; } /** *
     **
     * A node domain name.<br/>
     * This MUST be the fully qualified domain(DNS) name of the node.<br/>
     * This value MUST NOT be more than 253 characters.
     * domain_name and ipAddressV4 are mutually exclusive.
     * When the `domain_name` field is set, the `ipAddressV4` field MUST NOT be set.<br/>
     * When the `ipAddressV4` field is set, the `domain_name` field MUST NOT be set.
     * 
* * string domain_name = 3; * @param value The bytes for domainName to set. * @return This builder for chaining. */ public Builder setDomainNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); domainName_ = value; 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.ServiceEndpoint) } // @@protoc_insertion_point(class_scope:proto.ServiceEndpoint) private static final com.hederahashgraph.api.proto.java.ServiceEndpoint DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.hederahashgraph.api.proto.java.ServiceEndpoint(); } public static com.hederahashgraph.api.proto.java.ServiceEndpoint getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ServiceEndpoint parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ServiceEndpoint(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.ServiceEndpoint getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy