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

com.alibaba.nacos.istio.model.naming.ServiceEntry Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: service_entry.proto

package com.alibaba.nacos.istio.model.naming;

/**
 * 
 * ServiceEntry enables adding additional entries into Istio's internal
 * service registry.
 * <!-- go code generation tags
 * +kubetype-gen
 * +kubetype-gen:groupVersion=networking.istio.io/v1alpha3
 * +genclient
 * +k8s:deepcopy-gen=true
 * -->
 * 
* * Protobuf type {@code istio.networking.v1alpha3.ServiceEntry} */ public final class ServiceEntry extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:istio.networking.v1alpha3.ServiceEntry) ServiceEntryOrBuilder { private static final long serialVersionUID = 0L; // Use ServiceEntry.newBuilder() to construct. private ServiceEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ServiceEntry() { hosts_ = com.google.protobuf.LazyStringArrayList.EMPTY; addresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; ports_ = java.util.Collections.emptyList(); location_ = 0; resolution_ = 0; endpoints_ = java.util.Collections.emptyList(); exportTo_ = com.google.protobuf.LazyStringArrayList.EMPTY; subjectAltNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new ServiceEntry(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ServiceEntry( 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: { java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000001) != 0)) { hosts_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000001; } hosts_.add(s); break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000002) != 0)) { addresses_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000002; } addresses_.add(s); break; } case 26: { if (!((mutable_bitField0_ & 0x00000004) != 0)) { ports_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; } ports_.add( input.readMessage(com.alibaba.nacos.istio.model.Port.parser(), extensionRegistry)); break; } case 32: { int rawValue = input.readEnum(); location_ = rawValue; break; } case 40: { int rawValue = input.readEnum(); resolution_ = rawValue; break; } case 50: { if (!((mutable_bitField0_ & 0x00000008) != 0)) { endpoints_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000008; } endpoints_.add( input.readMessage(com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint.parser(), extensionRegistry)); break; } case 58: { java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000010) != 0)) { exportTo_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000010; } exportTo_.add(s); break; } case 66: { java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000020) != 0)) { subjectAltNames_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000020; } subjectAltNames_.add(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 { if (((mutable_bitField0_ & 0x00000001) != 0)) { hosts_ = hosts_.getUnmodifiableView(); } if (((mutable_bitField0_ & 0x00000002) != 0)) { addresses_ = addresses_.getUnmodifiableView(); } if (((mutable_bitField0_ & 0x00000004) != 0)) { ports_ = java.util.Collections.unmodifiableList(ports_); } if (((mutable_bitField0_ & 0x00000008) != 0)) { endpoints_ = java.util.Collections.unmodifiableList(endpoints_); } if (((mutable_bitField0_ & 0x00000010) != 0)) { exportTo_ = exportTo_.getUnmodifiableView(); } if (((mutable_bitField0_ & 0x00000020) != 0)) { subjectAltNames_ = subjectAltNames_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.alibaba.nacos.istio.model.naming.ServiceEntryOuterClass.internal_static_istio_networking_v1alpha3_ServiceEntry_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.nacos.istio.model.naming.ServiceEntryOuterClass.internal_static_istio_networking_v1alpha3_ServiceEntry_fieldAccessorTable .ensureFieldAccessorsInitialized( com.alibaba.nacos.istio.model.naming.ServiceEntry.class, com.alibaba.nacos.istio.model.naming.ServiceEntry.Builder.class); } /** *
   * Location specifies whether the service is part of Istio mesh or
   * outside the mesh.  Location determines the behavior of several
   * features, such as service-to-service mTLS authentication, policy
   * enforcement, etc. When communicating with services outside the mesh,
   * Istio's mTLS authentication is disabled, and policy enforcement is
   * performed on the client-side as opposed to server-side.
   * 
* * Protobuf enum {@code istio.networking.v1alpha3.ServiceEntry.Location} */ public enum Location implements com.google.protobuf.ProtocolMessageEnum { /** *
     * Signifies that the service is external to the mesh. Typically used
     * to indicate external services consumed through APIs.
     * 
* * MESH_EXTERNAL = 0; */ MESH_EXTERNAL(0), /** *
     * Signifies that the service is part of the mesh. Typically used to
     * indicate services added explicitly as part of expanding the service
     * mesh to include unmanaged infrastructure (e.g., VMs added to a
     * Kubernetes based service mesh).
     * 
* * MESH_INTERNAL = 1; */ MESH_INTERNAL(1), UNRECOGNIZED(-1), ; /** *
     * Signifies that the service is external to the mesh. Typically used
     * to indicate external services consumed through APIs.
     * 
* * MESH_EXTERNAL = 0; */ public static final int MESH_EXTERNAL_VALUE = 0; /** *
     * Signifies that the service is part of the mesh. Typically used to
     * indicate services added explicitly as part of expanding the service
     * mesh to include unmanaged infrastructure (e.g., VMs added to a
     * Kubernetes based service mesh).
     * 
* * MESH_INTERNAL = 1; */ public static final int MESH_INTERNAL_VALUE = 1; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Location valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static Location forNumber(int value) { switch (value) { case 0: return MESH_EXTERNAL; case 1: return MESH_INTERNAL; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< Location> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Location findValueByNumber(int number) { return Location.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.alibaba.nacos.istio.model.naming.ServiceEntry.getDescriptor().getEnumTypes().get(0); } private static final Location[] VALUES = values(); public static Location valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private Location(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:istio.networking.v1alpha3.ServiceEntry.Location) } /** *
   * Resolution determines how the proxy will resolve the IP addresses of
   * the network endpoints associated with the service, so that it can
   * route to one of them. The resolution mode specified here has no impact
   * on how the application resolves the IP address associated with the
   * service. The application may still have to use DNS to resolve the
   * service to an IP so that the outbound traffic can be captured by the
   * Proxy. Alternatively, for HTTP services, the application could
   * directly communicate with the proxy (e.g., by setting HTTP_PROXY) to
   * talk to these services.
   * 
* * Protobuf enum {@code istio.networking.v1alpha3.ServiceEntry.Resolution} */ public enum Resolution implements com.google.protobuf.ProtocolMessageEnum { /** *
     * Assume that incoming connections have already been resolved (to a
     * specific destination IP address). Such connections are typically
     * routed via the proxy using mechanisms such as IP table REDIRECT/
     * eBPF. After performing any routing related transformations, the
     * proxy will forward the connection to the IP address to which the
     * connection was bound.
     * 
* * NONE = 0; */ NONE(0), /** *
     * Use the static IP addresses specified in endpoints (see below) as the
     * backing instances associated with the service.
     * 
* * STATIC = 1; */ STATIC(1), /** *
     * Attempt to resolve the IP address by querying the ambient DNS,
     * during request processing. If no endpoints are specified, the proxy
     * will resolve the DNS address specified in the hosts field, if
     * wildcards are not used. If endpoints are specified, the DNS
     * addresses specified in the endpoints will be resolved to determine
     * the destination IP address.  DNS resolution cannot be used with Unix
     * domain socket endpoints.
     * 
* * DNS = 2; */ DNS(2), UNRECOGNIZED(-1), ; /** *
     * Assume that incoming connections have already been resolved (to a
     * specific destination IP address). Such connections are typically
     * routed via the proxy using mechanisms such as IP table REDIRECT/
     * eBPF. After performing any routing related transformations, the
     * proxy will forward the connection to the IP address to which the
     * connection was bound.
     * 
* * NONE = 0; */ public static final int NONE_VALUE = 0; /** *
     * Use the static IP addresses specified in endpoints (see below) as the
     * backing instances associated with the service.
     * 
* * STATIC = 1; */ public static final int STATIC_VALUE = 1; /** *
     * Attempt to resolve the IP address by querying the ambient DNS,
     * during request processing. If no endpoints are specified, the proxy
     * will resolve the DNS address specified in the hosts field, if
     * wildcards are not used. If endpoints are specified, the DNS
     * addresses specified in the endpoints will be resolved to determine
     * the destination IP address.  DNS resolution cannot be used with Unix
     * domain socket endpoints.
     * 
* * DNS = 2; */ public static final int DNS_VALUE = 2; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Resolution valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static Resolution forNumber(int value) { switch (value) { case 0: return NONE; case 1: return STATIC; case 2: return DNS; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< Resolution> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Resolution findValueByNumber(int number) { return Resolution.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.alibaba.nacos.istio.model.naming.ServiceEntry.getDescriptor().getEnumTypes().get(1); } private static final Resolution[] VALUES = values(); public static Resolution valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private Resolution(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:istio.networking.v1alpha3.ServiceEntry.Resolution) } public interface EndpointOrBuilder extends // @@protoc_insertion_point(interface_extends:istio.networking.v1alpha3.ServiceEntry.Endpoint) com.google.protobuf.MessageOrBuilder { /** *
     * REQUIRED: Address associated with the network endpoint without the
     * port.  Domain names can be used if and only if the resolution is set
     * to DNS, and must be fully-qualified without wildcards. Use the form
     * unix:///absolute/path/to/socket for Unix domain socket endpoints.
     * 
* * string address = 1; * @return The address. */ java.lang.String getAddress(); /** *
     * REQUIRED: Address associated with the network endpoint without the
     * port.  Domain names can be used if and only if the resolution is set
     * to DNS, and must be fully-qualified without wildcards. Use the form
     * unix:///absolute/path/to/socket for Unix domain socket endpoints.
     * 
* * string address = 1; * @return The bytes for address. */ com.google.protobuf.ByteString getAddressBytes(); /** *
     * Set of ports associated with the endpoint. The ports must be
     * associated with a port name that was declared as part of the
     * service. Do not use for `unix://` addresses.
     * 
* * map<string, uint32> ports = 2; */ int getPortsCount(); /** *
     * Set of ports associated with the endpoint. The ports must be
     * associated with a port name that was declared as part of the
     * service. Do not use for `unix://` addresses.
     * 
* * map<string, uint32> ports = 2; */ boolean containsPorts( java.lang.String key); /** * Use {@link #getPortsMap()} instead. */ @java.lang.Deprecated java.util.Map getPorts(); /** *
     * Set of ports associated with the endpoint. The ports must be
     * associated with a port name that was declared as part of the
     * service. Do not use for `unix://` addresses.
     * 
* * map<string, uint32> ports = 2; */ java.util.Map getPortsMap(); /** *
     * Set of ports associated with the endpoint. The ports must be
     * associated with a port name that was declared as part of the
     * service. Do not use for `unix://` addresses.
     * 
* * map<string, uint32> ports = 2; */ int getPortsOrDefault( java.lang.String key, int defaultValue); /** *
     * Set of ports associated with the endpoint. The ports must be
     * associated with a port name that was declared as part of the
     * service. Do not use for `unix://` addresses.
     * 
* * map<string, uint32> ports = 2; */ int getPortsOrThrow( java.lang.String key); /** *
     * One or more labels associated with the endpoint.
     * 
* * map<string, string> labels = 3; */ int getLabelsCount(); /** *
     * One or more labels associated with the endpoint.
     * 
* * map<string, string> labels = 3; */ boolean containsLabels( java.lang.String key); /** * Use {@link #getLabelsMap()} instead. */ @java.lang.Deprecated java.util.Map getLabels(); /** *
     * One or more labels associated with the endpoint.
     * 
* * map<string, string> labels = 3; */ java.util.Map getLabelsMap(); /** *
     * One or more labels associated with the endpoint.
     * 
* * map<string, string> labels = 3; */ java.lang.String getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue); /** *
     * One or more labels associated with the endpoint.
     * 
* * map<string, string> labels = 3; */ java.lang.String getLabelsOrThrow( java.lang.String key); /** *
     * Network enables Istio to group endpoints resident in the same L3
     * domain/network. All endpoints in the same network are assumed to be
     * directly reachable from one another. When endpoints in different
     * networks cannot reach each other directly, an Istio Gateway can be
     * used to establish connectivity (usually using the
     * AUTO_PASSTHROUGH mode in a Gateway Server). This is
     * an advanced configuration used typically for spanning an Istio mesh
     * over multiple clusters.
     * 
* * string network = 4; * @return The network. */ java.lang.String getNetwork(); /** *
     * Network enables Istio to group endpoints resident in the same L3
     * domain/network. All endpoints in the same network are assumed to be
     * directly reachable from one another. When endpoints in different
     * networks cannot reach each other directly, an Istio Gateway can be
     * used to establish connectivity (usually using the
     * AUTO_PASSTHROUGH mode in a Gateway Server). This is
     * an advanced configuration used typically for spanning an Istio mesh
     * over multiple clusters.
     * 
* * string network = 4; * @return The bytes for network. */ com.google.protobuf.ByteString getNetworkBytes(); /** *
     * The locality associated with the endpoint. A locality corresponds
     * to a failure domain (e.g., country/region/zone). Arbitrary failure
     * domain hierarchies can be represented by separating each
     * encapsulating failure domain by /. For example, the locality of an
     * an endpoint in US, in US-East-1 region, within availability zone
     * az-1, in data center rack r11 can be represented as
     * us/us-east-1/az-1/r11. Istio will configure the sidecar to route to
     * endpoints within the same locality as the sidecar. If none of the
     * endpoints in the locality are available, endpoints parent locality
     * (but within the same network ID) will be chosen. For example, if
     * there are two endpoints in same network (networkID "n1"), say e1
     * with locality us/us-east-1/az-1/r11 and e2 with locality
     * us/us-east-1/az-2/r12, a sidecar from us/us-east-1/az-1/r11 locality
     * will prefer e1 from the same locality over e2 from a different
     * locality. Endpoint e2 could be the IP associated with a gateway
     * (that bridges networks n1 and n2), or the IP associated with a
     * standard service endpoint.
     * 
* * string locality = 5; * @return The locality. */ java.lang.String getLocality(); /** *
     * The locality associated with the endpoint. A locality corresponds
     * to a failure domain (e.g., country/region/zone). Arbitrary failure
     * domain hierarchies can be represented by separating each
     * encapsulating failure domain by /. For example, the locality of an
     * an endpoint in US, in US-East-1 region, within availability zone
     * az-1, in data center rack r11 can be represented as
     * us/us-east-1/az-1/r11. Istio will configure the sidecar to route to
     * endpoints within the same locality as the sidecar. If none of the
     * endpoints in the locality are available, endpoints parent locality
     * (but within the same network ID) will be chosen. For example, if
     * there are two endpoints in same network (networkID "n1"), say e1
     * with locality us/us-east-1/az-1/r11 and e2 with locality
     * us/us-east-1/az-2/r12, a sidecar from us/us-east-1/az-1/r11 locality
     * will prefer e1 from the same locality over e2 from a different
     * locality. Endpoint e2 could be the IP associated with a gateway
     * (that bridges networks n1 and n2), or the IP associated with a
     * standard service endpoint.
     * 
* * string locality = 5; * @return The bytes for locality. */ com.google.protobuf.ByteString getLocalityBytes(); /** *
     * The load balancing weight associated with the endpoint. Endpoints
     * with higher weights will receive proportionally higher traffic.
     * 
* * uint32 weight = 6; * @return The weight. */ int getWeight(); } /** *
   * Endpoint defines a network address (IP or hostname) associated with
   * the mesh service.
   * 
* * Protobuf type {@code istio.networking.v1alpha3.ServiceEntry.Endpoint} */ public static final class Endpoint extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:istio.networking.v1alpha3.ServiceEntry.Endpoint) EndpointOrBuilder { private static final long serialVersionUID = 0L; // Use Endpoint.newBuilder() to construct. private Endpoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Endpoint() { address_ = ""; network_ = ""; locality_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Endpoint(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Endpoint( 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: { java.lang.String s = input.readStringRequireUtf8(); address_ = s; break; } case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { ports_ = com.google.protobuf.MapField.newMapField( PortsDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000001; } com.google.protobuf.MapEntry ports__ = input.readMessage( PortsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); ports_.getMutableMap().put( ports__.getKey(), ports__.getValue()); break; } case 26: { if (!((mutable_bitField0_ & 0x00000002) != 0)) { labels_ = com.google.protobuf.MapField.newMapField( LabelsDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000002; } com.google.protobuf.MapEntry labels__ = input.readMessage( LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); labels_.getMutableMap().put( labels__.getKey(), labels__.getValue()); break; } case 34: { java.lang.String s = input.readStringRequireUtf8(); network_ = s; break; } case 42: { java.lang.String s = input.readStringRequireUtf8(); locality_ = s; break; } case 48: { weight_ = input.readUInt32(); 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.alibaba.nacos.istio.model.naming.ServiceEntryOuterClass.internal_static_istio_networking_v1alpha3_ServiceEntry_Endpoint_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 2: return internalGetPorts(); case 3: return internalGetLabels(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.nacos.istio.model.naming.ServiceEntryOuterClass.internal_static_istio_networking_v1alpha3_ServiceEntry_Endpoint_fieldAccessorTable .ensureFieldAccessorsInitialized( com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint.class, com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint.Builder.class); } public static final int ADDRESS_FIELD_NUMBER = 1; private volatile java.lang.Object address_; /** *
     * REQUIRED: Address associated with the network endpoint without the
     * port.  Domain names can be used if and only if the resolution is set
     * to DNS, and must be fully-qualified without wildcards. Use the form
     * unix:///absolute/path/to/socket for Unix domain socket endpoints.
     * 
* * string address = 1; * @return The address. */ public java.lang.String getAddress() { java.lang.Object ref = address_; 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(); address_ = s; return s; } } /** *
     * REQUIRED: Address associated with the network endpoint without the
     * port.  Domain names can be used if and only if the resolution is set
     * to DNS, and must be fully-qualified without wildcards. Use the form
     * unix:///absolute/path/to/socket for Unix domain socket endpoints.
     * 
* * string address = 1; * @return The bytes for address. */ public com.google.protobuf.ByteString getAddressBytes() { java.lang.Object ref = address_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); address_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PORTS_FIELD_NUMBER = 2; private static final class PortsDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, java.lang.Integer> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( com.alibaba.nacos.istio.model.naming.ServiceEntryOuterClass.internal_static_istio_networking_v1alpha3_ServiceEntry_Endpoint_PortsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.UINT32, 0); } private com.google.protobuf.MapField< java.lang.String, java.lang.Integer> ports_; private com.google.protobuf.MapField internalGetPorts() { if (ports_ == null) { return com.google.protobuf.MapField.emptyMapField( PortsDefaultEntryHolder.defaultEntry); } return ports_; } public int getPortsCount() { return internalGetPorts().getMap().size(); } /** *
     * Set of ports associated with the endpoint. The ports must be
     * associated with a port name that was declared as part of the
     * service. Do not use for `unix://` addresses.
     * 
* * map<string, uint32> ports = 2; */ public boolean containsPorts( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetPorts().getMap().containsKey(key); } /** * Use {@link #getPortsMap()} instead. */ @java.lang.Deprecated public java.util.Map getPorts() { return getPortsMap(); } /** *
     * Set of ports associated with the endpoint. The ports must be
     * associated with a port name that was declared as part of the
     * service. Do not use for `unix://` addresses.
     * 
* * map<string, uint32> ports = 2; */ public java.util.Map getPortsMap() { return internalGetPorts().getMap(); } /** *
     * Set of ports associated with the endpoint. The ports must be
     * associated with a port name that was declared as part of the
     * service. Do not use for `unix://` addresses.
     * 
* * map<string, uint32> ports = 2; */ public int getPortsOrDefault( java.lang.String key, int defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetPorts().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * Set of ports associated with the endpoint. The ports must be
     * associated with a port name that was declared as part of the
     * service. Do not use for `unix://` addresses.
     * 
* * map<string, uint32> ports = 2; */ public int getPortsOrThrow( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetPorts().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int LABELS_FIELD_NUMBER = 3; private static final class LabelsDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, java.lang.String> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( com.alibaba.nacos.istio.model.naming.ServiceEntryOuterClass.internal_static_istio_networking_v1alpha3_ServiceEntry_Endpoint_LabelsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } private com.google.protobuf.MapField< java.lang.String, java.lang.String> labels_; private com.google.protobuf.MapField internalGetLabels() { if (labels_ == null) { return com.google.protobuf.MapField.emptyMapField( LabelsDefaultEntryHolder.defaultEntry); } return labels_; } public int getLabelsCount() { return internalGetLabels().getMap().size(); } /** *
     * One or more labels associated with the endpoint.
     * 
* * map<string, string> labels = 3; */ public boolean containsLabels( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetLabels().getMap().containsKey(key); } /** * Use {@link #getLabelsMap()} instead. */ @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } /** *
     * One or more labels associated with the endpoint.
     * 
* * map<string, string> labels = 3; */ public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } /** *
     * One or more labels associated with the endpoint.
     * 
* * map<string, string> labels = 3; */ public java.lang.String getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * One or more labels associated with the endpoint.
     * 
* * map<string, string> labels = 3; */ public java.lang.String getLabelsOrThrow( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int NETWORK_FIELD_NUMBER = 4; private volatile java.lang.Object network_; /** *
     * Network enables Istio to group endpoints resident in the same L3
     * domain/network. All endpoints in the same network are assumed to be
     * directly reachable from one another. When endpoints in different
     * networks cannot reach each other directly, an Istio Gateway can be
     * used to establish connectivity (usually using the
     * AUTO_PASSTHROUGH mode in a Gateway Server). This is
     * an advanced configuration used typically for spanning an Istio mesh
     * over multiple clusters.
     * 
* * string network = 4; * @return The network. */ public java.lang.String getNetwork() { java.lang.Object ref = network_; 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(); network_ = s; return s; } } /** *
     * Network enables Istio to group endpoints resident in the same L3
     * domain/network. All endpoints in the same network are assumed to be
     * directly reachable from one another. When endpoints in different
     * networks cannot reach each other directly, an Istio Gateway can be
     * used to establish connectivity (usually using the
     * AUTO_PASSTHROUGH mode in a Gateway Server). This is
     * an advanced configuration used typically for spanning an Istio mesh
     * over multiple clusters.
     * 
* * string network = 4; * @return The bytes for network. */ public com.google.protobuf.ByteString getNetworkBytes() { java.lang.Object ref = network_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); network_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LOCALITY_FIELD_NUMBER = 5; private volatile java.lang.Object locality_; /** *
     * The locality associated with the endpoint. A locality corresponds
     * to a failure domain (e.g., country/region/zone). Arbitrary failure
     * domain hierarchies can be represented by separating each
     * encapsulating failure domain by /. For example, the locality of an
     * an endpoint in US, in US-East-1 region, within availability zone
     * az-1, in data center rack r11 can be represented as
     * us/us-east-1/az-1/r11. Istio will configure the sidecar to route to
     * endpoints within the same locality as the sidecar. If none of the
     * endpoints in the locality are available, endpoints parent locality
     * (but within the same network ID) will be chosen. For example, if
     * there are two endpoints in same network (networkID "n1"), say e1
     * with locality us/us-east-1/az-1/r11 and e2 with locality
     * us/us-east-1/az-2/r12, a sidecar from us/us-east-1/az-1/r11 locality
     * will prefer e1 from the same locality over e2 from a different
     * locality. Endpoint e2 could be the IP associated with a gateway
     * (that bridges networks n1 and n2), or the IP associated with a
     * standard service endpoint.
     * 
* * string locality = 5; * @return The locality. */ public java.lang.String getLocality() { java.lang.Object ref = locality_; 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(); locality_ = s; return s; } } /** *
     * The locality associated with the endpoint. A locality corresponds
     * to a failure domain (e.g., country/region/zone). Arbitrary failure
     * domain hierarchies can be represented by separating each
     * encapsulating failure domain by /. For example, the locality of an
     * an endpoint in US, in US-East-1 region, within availability zone
     * az-1, in data center rack r11 can be represented as
     * us/us-east-1/az-1/r11. Istio will configure the sidecar to route to
     * endpoints within the same locality as the sidecar. If none of the
     * endpoints in the locality are available, endpoints parent locality
     * (but within the same network ID) will be chosen. For example, if
     * there are two endpoints in same network (networkID "n1"), say e1
     * with locality us/us-east-1/az-1/r11 and e2 with locality
     * us/us-east-1/az-2/r12, a sidecar from us/us-east-1/az-1/r11 locality
     * will prefer e1 from the same locality over e2 from a different
     * locality. Endpoint e2 could be the IP associated with a gateway
     * (that bridges networks n1 and n2), or the IP associated with a
     * standard service endpoint.
     * 
* * string locality = 5; * @return The bytes for locality. */ public com.google.protobuf.ByteString getLocalityBytes() { java.lang.Object ref = locality_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); locality_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int WEIGHT_FIELD_NUMBER = 6; private int weight_; /** *
     * The load balancing weight associated with the endpoint. Endpoints
     * with higher weights will receive proportionally higher traffic.
     * 
* * uint32 weight = 6; * @return The weight. */ public int getWeight() { return weight_; } 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 (!getAddressBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_); } com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetPorts(), PortsDefaultEntryHolder.defaultEntry, 2); com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 3); if (!getNetworkBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, network_); } if (!getLocalityBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, locality_); } if (weight_ != 0) { output.writeUInt32(6, weight_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getAddressBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, address_); } for (java.util.Map.Entry entry : internalGetPorts().getMap().entrySet()) { com.google.protobuf.MapEntry ports__ = PortsDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, ports__); } for (java.util.Map.Entry entry : internalGetLabels().getMap().entrySet()) { com.google.protobuf.MapEntry labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, labels__); } if (!getNetworkBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, network_); } if (!getLocalityBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, locality_); } if (weight_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(6, weight_); } 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.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint)) { return super.equals(obj); } com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint other = (com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint) obj; if (!getAddress() .equals(other.getAddress())) return false; if (!internalGetPorts().equals( other.internalGetPorts())) return false; if (!internalGetLabels().equals( other.internalGetLabels())) return false; if (!getNetwork() .equals(other.getNetwork())) return false; if (!getLocality() .equals(other.getLocality())) return false; if (getWeight() != other.getWeight()) 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) + ADDRESS_FIELD_NUMBER; hash = (53 * hash) + getAddress().hashCode(); if (!internalGetPorts().getMap().isEmpty()) { hash = (37 * hash) + PORTS_FIELD_NUMBER; hash = (53 * hash) + internalGetPorts().hashCode(); } if (!internalGetLabels().getMap().isEmpty()) { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } hash = (37 * hash) + NETWORK_FIELD_NUMBER; hash = (53 * hash) + getNetwork().hashCode(); hash = (37 * hash) + LOCALITY_FIELD_NUMBER; hash = (53 * hash) + getLocality().hashCode(); hash = (37 * hash) + WEIGHT_FIELD_NUMBER; hash = (53 * hash) + getWeight(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint 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.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint 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.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint 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.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint 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; } /** *
     * Endpoint defines a network address (IP or hostname) associated with
     * the mesh service.
     * 
* * Protobuf type {@code istio.networking.v1alpha3.ServiceEntry.Endpoint} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:istio.networking.v1alpha3.ServiceEntry.Endpoint) com.alibaba.nacos.istio.model.naming.ServiceEntry.EndpointOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.alibaba.nacos.istio.model.naming.ServiceEntryOuterClass.internal_static_istio_networking_v1alpha3_ServiceEntry_Endpoint_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 2: return internalGetPorts(); case 3: return internalGetLabels(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMutableMapField( int number) { switch (number) { case 2: return internalGetMutablePorts(); case 3: return internalGetMutableLabels(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.nacos.istio.model.naming.ServiceEntryOuterClass.internal_static_istio_networking_v1alpha3_ServiceEntry_Endpoint_fieldAccessorTable .ensureFieldAccessorsInitialized( com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint.class, com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint.Builder.class); } // Construct using com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint.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(); address_ = ""; internalGetMutablePorts().clear(); internalGetMutableLabels().clear(); network_ = ""; locality_ = ""; weight_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.alibaba.nacos.istio.model.naming.ServiceEntryOuterClass.internal_static_istio_networking_v1alpha3_ServiceEntry_Endpoint_descriptor; } @java.lang.Override public com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint getDefaultInstanceForType() { return com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint.getDefaultInstance(); } @java.lang.Override public com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint build() { com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint buildPartial() { com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint result = new com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint(this); int from_bitField0_ = bitField0_; result.address_ = address_; result.ports_ = internalGetPorts(); result.ports_.makeImmutable(); result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); result.network_ = network_; result.locality_ = locality_; result.weight_ = weight_; 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.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint) { return mergeFrom((com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint other) { if (other == com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint.getDefaultInstance()) return this; if (!other.getAddress().isEmpty()) { address_ = other.address_; onChanged(); } internalGetMutablePorts().mergeFrom( other.internalGetPorts()); internalGetMutableLabels().mergeFrom( other.internalGetLabels()); if (!other.getNetwork().isEmpty()) { network_ = other.network_; onChanged(); } if (!other.getLocality().isEmpty()) { locality_ = other.locality_; onChanged(); } if (other.getWeight() != 0) { setWeight(other.getWeight()); } 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.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object address_ = ""; /** *
       * REQUIRED: Address associated with the network endpoint without the
       * port.  Domain names can be used if and only if the resolution is set
       * to DNS, and must be fully-qualified without wildcards. Use the form
       * unix:///absolute/path/to/socket for Unix domain socket endpoints.
       * 
* * string address = 1; * @return The address. */ public java.lang.String getAddress() { java.lang.Object ref = address_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); address_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * REQUIRED: Address associated with the network endpoint without the
       * port.  Domain names can be used if and only if the resolution is set
       * to DNS, and must be fully-qualified without wildcards. Use the form
       * unix:///absolute/path/to/socket for Unix domain socket endpoints.
       * 
* * string address = 1; * @return The bytes for address. */ public com.google.protobuf.ByteString getAddressBytes() { java.lang.Object ref = address_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); address_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * REQUIRED: Address associated with the network endpoint without the
       * port.  Domain names can be used if and only if the resolution is set
       * to DNS, and must be fully-qualified without wildcards. Use the form
       * unix:///absolute/path/to/socket for Unix domain socket endpoints.
       * 
* * string address = 1; * @param value The address to set. * @return This builder for chaining. */ public Builder setAddress( java.lang.String value) { if (value == null) { throw new NullPointerException(); } address_ = value; onChanged(); return this; } /** *
       * REQUIRED: Address associated with the network endpoint without the
       * port.  Domain names can be used if and only if the resolution is set
       * to DNS, and must be fully-qualified without wildcards. Use the form
       * unix:///absolute/path/to/socket for Unix domain socket endpoints.
       * 
* * string address = 1; * @return This builder for chaining. */ public Builder clearAddress() { address_ = getDefaultInstance().getAddress(); onChanged(); return this; } /** *
       * REQUIRED: Address associated with the network endpoint without the
       * port.  Domain names can be used if and only if the resolution is set
       * to DNS, and must be fully-qualified without wildcards. Use the form
       * unix:///absolute/path/to/socket for Unix domain socket endpoints.
       * 
* * string address = 1; * @param value The bytes for address to set. * @return This builder for chaining. */ public Builder setAddressBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); address_ = value; onChanged(); return this; } private com.google.protobuf.MapField< java.lang.String, java.lang.Integer> ports_; private com.google.protobuf.MapField internalGetPorts() { if (ports_ == null) { return com.google.protobuf.MapField.emptyMapField( PortsDefaultEntryHolder.defaultEntry); } return ports_; } private com.google.protobuf.MapField internalGetMutablePorts() { onChanged();; if (ports_ == null) { ports_ = com.google.protobuf.MapField.newMapField( PortsDefaultEntryHolder.defaultEntry); } if (!ports_.isMutable()) { ports_ = ports_.copy(); } return ports_; } public int getPortsCount() { return internalGetPorts().getMap().size(); } /** *
       * Set of ports associated with the endpoint. The ports must be
       * associated with a port name that was declared as part of the
       * service. Do not use for `unix://` addresses.
       * 
* * map<string, uint32> ports = 2; */ public boolean containsPorts( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetPorts().getMap().containsKey(key); } /** * Use {@link #getPortsMap()} instead. */ @java.lang.Deprecated public java.util.Map getPorts() { return getPortsMap(); } /** *
       * Set of ports associated with the endpoint. The ports must be
       * associated with a port name that was declared as part of the
       * service. Do not use for `unix://` addresses.
       * 
* * map<string, uint32> ports = 2; */ public java.util.Map getPortsMap() { return internalGetPorts().getMap(); } /** *
       * Set of ports associated with the endpoint. The ports must be
       * associated with a port name that was declared as part of the
       * service. Do not use for `unix://` addresses.
       * 
* * map<string, uint32> ports = 2; */ public int getPortsOrDefault( java.lang.String key, int defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetPorts().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
       * Set of ports associated with the endpoint. The ports must be
       * associated with a port name that was declared as part of the
       * service. Do not use for `unix://` addresses.
       * 
* * map<string, uint32> ports = 2; */ public int getPortsOrThrow( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetPorts().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearPorts() { internalGetMutablePorts().getMutableMap() .clear(); return this; } /** *
       * Set of ports associated with the endpoint. The ports must be
       * associated with a port name that was declared as part of the
       * service. Do not use for `unix://` addresses.
       * 
* * map<string, uint32> ports = 2; */ public Builder removePorts( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } internalGetMutablePorts().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutablePorts() { return internalGetMutablePorts().getMutableMap(); } /** *
       * Set of ports associated with the endpoint. The ports must be
       * associated with a port name that was declared as part of the
       * service. Do not use for `unix://` addresses.
       * 
* * map<string, uint32> ports = 2; */ public Builder putPorts( java.lang.String key, int value) { if (key == null) { throw new java.lang.NullPointerException(); } internalGetMutablePorts().getMutableMap() .put(key, value); return this; } /** *
       * Set of ports associated with the endpoint. The ports must be
       * associated with a port name that was declared as part of the
       * service. Do not use for `unix://` addresses.
       * 
* * map<string, uint32> ports = 2; */ public Builder putAllPorts( java.util.Map values) { internalGetMutablePorts().getMutableMap() .putAll(values); return this; } private com.google.protobuf.MapField< java.lang.String, java.lang.String> labels_; private com.google.protobuf.MapField internalGetLabels() { if (labels_ == null) { return com.google.protobuf.MapField.emptyMapField( LabelsDefaultEntryHolder.defaultEntry); } return labels_; } private com.google.protobuf.MapField internalGetMutableLabels() { onChanged();; if (labels_ == null) { labels_ = com.google.protobuf.MapField.newMapField( LabelsDefaultEntryHolder.defaultEntry); } if (!labels_.isMutable()) { labels_ = labels_.copy(); } return labels_; } public int getLabelsCount() { return internalGetLabels().getMap().size(); } /** *
       * One or more labels associated with the endpoint.
       * 
* * map<string, string> labels = 3; */ public boolean containsLabels( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetLabels().getMap().containsKey(key); } /** * Use {@link #getLabelsMap()} instead. */ @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } /** *
       * One or more labels associated with the endpoint.
       * 
* * map<string, string> labels = 3; */ public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } /** *
       * One or more labels associated with the endpoint.
       * 
* * map<string, string> labels = 3; */ public java.lang.String getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
       * One or more labels associated with the endpoint.
       * 
* * map<string, string> labels = 3; */ public java.lang.String getLabelsOrThrow( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearLabels() { internalGetMutableLabels().getMutableMap() .clear(); return this; } /** *
       * One or more labels associated with the endpoint.
       * 
* * map<string, string> labels = 3; */ public Builder removeLabels( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } internalGetMutableLabels().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableLabels() { return internalGetMutableLabels().getMutableMap(); } /** *
       * One or more labels associated with the endpoint.
       * 
* * map<string, string> labels = 3; */ public Builder putLabels( java.lang.String key, java.lang.String value) { if (key == null) { throw new java.lang.NullPointerException(); } if (value == null) { throw new java.lang.NullPointerException(); } internalGetMutableLabels().getMutableMap() .put(key, value); return this; } /** *
       * One or more labels associated with the endpoint.
       * 
* * map<string, string> labels = 3; */ public Builder putAllLabels( java.util.Map values) { internalGetMutableLabels().getMutableMap() .putAll(values); return this; } private java.lang.Object network_ = ""; /** *
       * Network enables Istio to group endpoints resident in the same L3
       * domain/network. All endpoints in the same network are assumed to be
       * directly reachable from one another. When endpoints in different
       * networks cannot reach each other directly, an Istio Gateway can be
       * used to establish connectivity (usually using the
       * AUTO_PASSTHROUGH mode in a Gateway Server). This is
       * an advanced configuration used typically for spanning an Istio mesh
       * over multiple clusters.
       * 
* * string network = 4; * @return The network. */ public java.lang.String getNetwork() { java.lang.Object ref = network_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); network_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Network enables Istio to group endpoints resident in the same L3
       * domain/network. All endpoints in the same network are assumed to be
       * directly reachable from one another. When endpoints in different
       * networks cannot reach each other directly, an Istio Gateway can be
       * used to establish connectivity (usually using the
       * AUTO_PASSTHROUGH mode in a Gateway Server). This is
       * an advanced configuration used typically for spanning an Istio mesh
       * over multiple clusters.
       * 
* * string network = 4; * @return The bytes for network. */ public com.google.protobuf.ByteString getNetworkBytes() { java.lang.Object ref = network_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); network_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Network enables Istio to group endpoints resident in the same L3
       * domain/network. All endpoints in the same network are assumed to be
       * directly reachable from one another. When endpoints in different
       * networks cannot reach each other directly, an Istio Gateway can be
       * used to establish connectivity (usually using the
       * AUTO_PASSTHROUGH mode in a Gateway Server). This is
       * an advanced configuration used typically for spanning an Istio mesh
       * over multiple clusters.
       * 
* * string network = 4; * @param value The network to set. * @return This builder for chaining. */ public Builder setNetwork( java.lang.String value) { if (value == null) { throw new NullPointerException(); } network_ = value; onChanged(); return this; } /** *
       * Network enables Istio to group endpoints resident in the same L3
       * domain/network. All endpoints in the same network are assumed to be
       * directly reachable from one another. When endpoints in different
       * networks cannot reach each other directly, an Istio Gateway can be
       * used to establish connectivity (usually using the
       * AUTO_PASSTHROUGH mode in a Gateway Server). This is
       * an advanced configuration used typically for spanning an Istio mesh
       * over multiple clusters.
       * 
* * string network = 4; * @return This builder for chaining. */ public Builder clearNetwork() { network_ = getDefaultInstance().getNetwork(); onChanged(); return this; } /** *
       * Network enables Istio to group endpoints resident in the same L3
       * domain/network. All endpoints in the same network are assumed to be
       * directly reachable from one another. When endpoints in different
       * networks cannot reach each other directly, an Istio Gateway can be
       * used to establish connectivity (usually using the
       * AUTO_PASSTHROUGH mode in a Gateway Server). This is
       * an advanced configuration used typically for spanning an Istio mesh
       * over multiple clusters.
       * 
* * string network = 4; * @param value The bytes for network to set. * @return This builder for chaining. */ public Builder setNetworkBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); network_ = value; onChanged(); return this; } private java.lang.Object locality_ = ""; /** *
       * The locality associated with the endpoint. A locality corresponds
       * to a failure domain (e.g., country/region/zone). Arbitrary failure
       * domain hierarchies can be represented by separating each
       * encapsulating failure domain by /. For example, the locality of an
       * an endpoint in US, in US-East-1 region, within availability zone
       * az-1, in data center rack r11 can be represented as
       * us/us-east-1/az-1/r11. Istio will configure the sidecar to route to
       * endpoints within the same locality as the sidecar. If none of the
       * endpoints in the locality are available, endpoints parent locality
       * (but within the same network ID) will be chosen. For example, if
       * there are two endpoints in same network (networkID "n1"), say e1
       * with locality us/us-east-1/az-1/r11 and e2 with locality
       * us/us-east-1/az-2/r12, a sidecar from us/us-east-1/az-1/r11 locality
       * will prefer e1 from the same locality over e2 from a different
       * locality. Endpoint e2 could be the IP associated with a gateway
       * (that bridges networks n1 and n2), or the IP associated with a
       * standard service endpoint.
       * 
* * string locality = 5; * @return The locality. */ public java.lang.String getLocality() { java.lang.Object ref = locality_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); locality_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * The locality associated with the endpoint. A locality corresponds
       * to a failure domain (e.g., country/region/zone). Arbitrary failure
       * domain hierarchies can be represented by separating each
       * encapsulating failure domain by /. For example, the locality of an
       * an endpoint in US, in US-East-1 region, within availability zone
       * az-1, in data center rack r11 can be represented as
       * us/us-east-1/az-1/r11. Istio will configure the sidecar to route to
       * endpoints within the same locality as the sidecar. If none of the
       * endpoints in the locality are available, endpoints parent locality
       * (but within the same network ID) will be chosen. For example, if
       * there are two endpoints in same network (networkID "n1"), say e1
       * with locality us/us-east-1/az-1/r11 and e2 with locality
       * us/us-east-1/az-2/r12, a sidecar from us/us-east-1/az-1/r11 locality
       * will prefer e1 from the same locality over e2 from a different
       * locality. Endpoint e2 could be the IP associated with a gateway
       * (that bridges networks n1 and n2), or the IP associated with a
       * standard service endpoint.
       * 
* * string locality = 5; * @return The bytes for locality. */ public com.google.protobuf.ByteString getLocalityBytes() { java.lang.Object ref = locality_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); locality_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * The locality associated with the endpoint. A locality corresponds
       * to a failure domain (e.g., country/region/zone). Arbitrary failure
       * domain hierarchies can be represented by separating each
       * encapsulating failure domain by /. For example, the locality of an
       * an endpoint in US, in US-East-1 region, within availability zone
       * az-1, in data center rack r11 can be represented as
       * us/us-east-1/az-1/r11. Istio will configure the sidecar to route to
       * endpoints within the same locality as the sidecar. If none of the
       * endpoints in the locality are available, endpoints parent locality
       * (but within the same network ID) will be chosen. For example, if
       * there are two endpoints in same network (networkID "n1"), say e1
       * with locality us/us-east-1/az-1/r11 and e2 with locality
       * us/us-east-1/az-2/r12, a sidecar from us/us-east-1/az-1/r11 locality
       * will prefer e1 from the same locality over e2 from a different
       * locality. Endpoint e2 could be the IP associated with a gateway
       * (that bridges networks n1 and n2), or the IP associated with a
       * standard service endpoint.
       * 
* * string locality = 5; * @param value The locality to set. * @return This builder for chaining. */ public Builder setLocality( java.lang.String value) { if (value == null) { throw new NullPointerException(); } locality_ = value; onChanged(); return this; } /** *
       * The locality associated with the endpoint. A locality corresponds
       * to a failure domain (e.g., country/region/zone). Arbitrary failure
       * domain hierarchies can be represented by separating each
       * encapsulating failure domain by /. For example, the locality of an
       * an endpoint in US, in US-East-1 region, within availability zone
       * az-1, in data center rack r11 can be represented as
       * us/us-east-1/az-1/r11. Istio will configure the sidecar to route to
       * endpoints within the same locality as the sidecar. If none of the
       * endpoints in the locality are available, endpoints parent locality
       * (but within the same network ID) will be chosen. For example, if
       * there are two endpoints in same network (networkID "n1"), say e1
       * with locality us/us-east-1/az-1/r11 and e2 with locality
       * us/us-east-1/az-2/r12, a sidecar from us/us-east-1/az-1/r11 locality
       * will prefer e1 from the same locality over e2 from a different
       * locality. Endpoint e2 could be the IP associated with a gateway
       * (that bridges networks n1 and n2), or the IP associated with a
       * standard service endpoint.
       * 
* * string locality = 5; * @return This builder for chaining. */ public Builder clearLocality() { locality_ = getDefaultInstance().getLocality(); onChanged(); return this; } /** *
       * The locality associated with the endpoint. A locality corresponds
       * to a failure domain (e.g., country/region/zone). Arbitrary failure
       * domain hierarchies can be represented by separating each
       * encapsulating failure domain by /. For example, the locality of an
       * an endpoint in US, in US-East-1 region, within availability zone
       * az-1, in data center rack r11 can be represented as
       * us/us-east-1/az-1/r11. Istio will configure the sidecar to route to
       * endpoints within the same locality as the sidecar. If none of the
       * endpoints in the locality are available, endpoints parent locality
       * (but within the same network ID) will be chosen. For example, if
       * there are two endpoints in same network (networkID "n1"), say e1
       * with locality us/us-east-1/az-1/r11 and e2 with locality
       * us/us-east-1/az-2/r12, a sidecar from us/us-east-1/az-1/r11 locality
       * will prefer e1 from the same locality over e2 from a different
       * locality. Endpoint e2 could be the IP associated with a gateway
       * (that bridges networks n1 and n2), or the IP associated with a
       * standard service endpoint.
       * 
* * string locality = 5; * @param value The bytes for locality to set. * @return This builder for chaining. */ public Builder setLocalityBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); locality_ = value; onChanged(); return this; } private int weight_ ; /** *
       * The load balancing weight associated with the endpoint. Endpoints
       * with higher weights will receive proportionally higher traffic.
       * 
* * uint32 weight = 6; * @return The weight. */ public int getWeight() { return weight_; } /** *
       * The load balancing weight associated with the endpoint. Endpoints
       * with higher weights will receive proportionally higher traffic.
       * 
* * uint32 weight = 6; * @param value The weight to set. * @return This builder for chaining. */ public Builder setWeight(int value) { weight_ = value; onChanged(); return this; } /** *
       * The load balancing weight associated with the endpoint. Endpoints
       * with higher weights will receive proportionally higher traffic.
       * 
* * uint32 weight = 6; * @return This builder for chaining. */ public Builder clearWeight() { weight_ = 0; 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:istio.networking.v1alpha3.ServiceEntry.Endpoint) } // @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.ServiceEntry.Endpoint) private static final com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint(); } public static com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Endpoint parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Endpoint(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.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int HOSTS_FIELD_NUMBER = 1; private com.google.protobuf.LazyStringList hosts_; /** *
   * REQUIRED. The hosts associated with the ServiceEntry. Could be a DNS
   * name with wildcard prefix.
   * 1. The hosts field is used to select matching hosts in VirtualServices and DestinationRules.
   * 2. For HTTP traffic the HTTP Host/Authority header will be matched against the hosts field.
   * 3. For HTTPs or TLS traffic containing Server Name Indication (SNI), the SNI value
   * will be matched against the hosts field.
   * Note that when resolution is set to type DNS
   * and no endpoints are specified, the host field will be used as the DNS name
   * of the endpoint to route traffic to.
   * 
* * repeated string hosts = 1; * @return A list containing the hosts. */ public com.google.protobuf.ProtocolStringList getHostsList() { return hosts_; } /** *
   * REQUIRED. The hosts associated with the ServiceEntry. Could be a DNS
   * name with wildcard prefix.
   * 1. The hosts field is used to select matching hosts in VirtualServices and DestinationRules.
   * 2. For HTTP traffic the HTTP Host/Authority header will be matched against the hosts field.
   * 3. For HTTPs or TLS traffic containing Server Name Indication (SNI), the SNI value
   * will be matched against the hosts field.
   * Note that when resolution is set to type DNS
   * and no endpoints are specified, the host field will be used as the DNS name
   * of the endpoint to route traffic to.
   * 
* * repeated string hosts = 1; * @return The count of hosts. */ public int getHostsCount() { return hosts_.size(); } /** *
   * REQUIRED. The hosts associated with the ServiceEntry. Could be a DNS
   * name with wildcard prefix.
   * 1. The hosts field is used to select matching hosts in VirtualServices and DestinationRules.
   * 2. For HTTP traffic the HTTP Host/Authority header will be matched against the hosts field.
   * 3. For HTTPs or TLS traffic containing Server Name Indication (SNI), the SNI value
   * will be matched against the hosts field.
   * Note that when resolution is set to type DNS
   * and no endpoints are specified, the host field will be used as the DNS name
   * of the endpoint to route traffic to.
   * 
* * repeated string hosts = 1; * @param index The index of the element to return. * @return The hosts at the given index. */ public java.lang.String getHosts(int index) { return hosts_.get(index); } /** *
   * REQUIRED. The hosts associated with the ServiceEntry. Could be a DNS
   * name with wildcard prefix.
   * 1. The hosts field is used to select matching hosts in VirtualServices and DestinationRules.
   * 2. For HTTP traffic the HTTP Host/Authority header will be matched against the hosts field.
   * 3. For HTTPs or TLS traffic containing Server Name Indication (SNI), the SNI value
   * will be matched against the hosts field.
   * Note that when resolution is set to type DNS
   * and no endpoints are specified, the host field will be used as the DNS name
   * of the endpoint to route traffic to.
   * 
* * repeated string hosts = 1; * @param index The index of the value to return. * @return The bytes of the hosts at the given index. */ public com.google.protobuf.ByteString getHostsBytes(int index) { return hosts_.getByteString(index); } public static final int ADDRESSES_FIELD_NUMBER = 2; private com.google.protobuf.LazyStringList addresses_; /** *
   * The virtual IP addresses associated with the service. Could be CIDR
   * prefix. For HTTP traffic, generated route configurations will include http route
   * domains for both the `addresses` and `hosts` field values and the destination will
   * be identified based on the HTTP Host/Authority header.
   * If one or more IP addresses are specified,
   * the incoming traffic will be identified as belonging to this service
   * if the destination IP matches the IP/CIDRs specified in the addresses
   * field. If the Addresses field is empty, traffic will be identified
   * solely based on the destination port. In such scenarios, the port on
   * which the service is being accessed must not be shared by any other
   * service in the mesh. In other words, the sidecar will behave as a
   * simple TCP proxy, forwarding incoming traffic on a specified port to
   * the specified destination endpoint IP/host. Unix domain socket
   * addresses are not supported in this field.
   * 
* * repeated string addresses = 2; * @return A list containing the addresses. */ public com.google.protobuf.ProtocolStringList getAddressesList() { return addresses_; } /** *
   * The virtual IP addresses associated with the service. Could be CIDR
   * prefix. For HTTP traffic, generated route configurations will include http route
   * domains for both the `addresses` and `hosts` field values and the destination will
   * be identified based on the HTTP Host/Authority header.
   * If one or more IP addresses are specified,
   * the incoming traffic will be identified as belonging to this service
   * if the destination IP matches the IP/CIDRs specified in the addresses
   * field. If the Addresses field is empty, traffic will be identified
   * solely based on the destination port. In such scenarios, the port on
   * which the service is being accessed must not be shared by any other
   * service in the mesh. In other words, the sidecar will behave as a
   * simple TCP proxy, forwarding incoming traffic on a specified port to
   * the specified destination endpoint IP/host. Unix domain socket
   * addresses are not supported in this field.
   * 
* * repeated string addresses = 2; * @return The count of addresses. */ public int getAddressesCount() { return addresses_.size(); } /** *
   * The virtual IP addresses associated with the service. Could be CIDR
   * prefix. For HTTP traffic, generated route configurations will include http route
   * domains for both the `addresses` and `hosts` field values and the destination will
   * be identified based on the HTTP Host/Authority header.
   * If one or more IP addresses are specified,
   * the incoming traffic will be identified as belonging to this service
   * if the destination IP matches the IP/CIDRs specified in the addresses
   * field. If the Addresses field is empty, traffic will be identified
   * solely based on the destination port. In such scenarios, the port on
   * which the service is being accessed must not be shared by any other
   * service in the mesh. In other words, the sidecar will behave as a
   * simple TCP proxy, forwarding incoming traffic on a specified port to
   * the specified destination endpoint IP/host. Unix domain socket
   * addresses are not supported in this field.
   * 
* * repeated string addresses = 2; * @param index The index of the element to return. * @return The addresses at the given index. */ public java.lang.String getAddresses(int index) { return addresses_.get(index); } /** *
   * The virtual IP addresses associated with the service. Could be CIDR
   * prefix. For HTTP traffic, generated route configurations will include http route
   * domains for both the `addresses` and `hosts` field values and the destination will
   * be identified based on the HTTP Host/Authority header.
   * If one or more IP addresses are specified,
   * the incoming traffic will be identified as belonging to this service
   * if the destination IP matches the IP/CIDRs specified in the addresses
   * field. If the Addresses field is empty, traffic will be identified
   * solely based on the destination port. In such scenarios, the port on
   * which the service is being accessed must not be shared by any other
   * service in the mesh. In other words, the sidecar will behave as a
   * simple TCP proxy, forwarding incoming traffic on a specified port to
   * the specified destination endpoint IP/host. Unix domain socket
   * addresses are not supported in this field.
   * 
* * repeated string addresses = 2; * @param index The index of the value to return. * @return The bytes of the addresses at the given index. */ public com.google.protobuf.ByteString getAddressesBytes(int index) { return addresses_.getByteString(index); } public static final int PORTS_FIELD_NUMBER = 3; private java.util.List ports_; /** *
   * REQUIRED. The ports associated with the external service. If the
   * Endpoints are Unix domain socket addresses, there must be exactly one
   * port.
   * 
* * repeated .istio.networking.v1alpha3.Port ports = 3; */ public java.util.List getPortsList() { return ports_; } /** *
   * REQUIRED. The ports associated with the external service. If the
   * Endpoints are Unix domain socket addresses, there must be exactly one
   * port.
   * 
* * repeated .istio.networking.v1alpha3.Port ports = 3; */ public java.util.List getPortsOrBuilderList() { return ports_; } /** *
   * REQUIRED. The ports associated with the external service. If the
   * Endpoints are Unix domain socket addresses, there must be exactly one
   * port.
   * 
* * repeated .istio.networking.v1alpha3.Port ports = 3; */ public int getPortsCount() { return ports_.size(); } /** *
   * REQUIRED. The ports associated with the external service. If the
   * Endpoints are Unix domain socket addresses, there must be exactly one
   * port.
   * 
* * repeated .istio.networking.v1alpha3.Port ports = 3; */ public com.alibaba.nacos.istio.model.Port getPorts(int index) { return ports_.get(index); } /** *
   * REQUIRED. The ports associated with the external service. If the
   * Endpoints are Unix domain socket addresses, there must be exactly one
   * port.
   * 
* * repeated .istio.networking.v1alpha3.Port ports = 3; */ public com.alibaba.nacos.istio.model.PortOrBuilder getPortsOrBuilder( int index) { return ports_.get(index); } public static final int LOCATION_FIELD_NUMBER = 4; private int location_; /** *
   * Specify whether the service should be considered external to the mesh
   * or part of the mesh.
   * 
* * .istio.networking.v1alpha3.ServiceEntry.Location location = 4; * @return The enum numeric value on the wire for location. */ public int getLocationValue() { return location_; } /** *
   * Specify whether the service should be considered external to the mesh
   * or part of the mesh.
   * 
* * .istio.networking.v1alpha3.ServiceEntry.Location location = 4; * @return The location. */ public com.alibaba.nacos.istio.model.naming.ServiceEntry.Location getLocation() { @SuppressWarnings("deprecation") com.alibaba.nacos.istio.model.naming.ServiceEntry.Location result = com.alibaba.nacos.istio.model.naming.ServiceEntry.Location.valueOf(location_); return result == null ? com.alibaba.nacos.istio.model.naming.ServiceEntry.Location.UNRECOGNIZED : result; } public static final int RESOLUTION_FIELD_NUMBER = 5; private int resolution_; /** *
   * REQUIRED: Service discovery mode for the hosts. Care must be taken
   * when setting the resolution mode to NONE for a TCP port without
   * accompanying IP addresses. In such cases, traffic to any IP on
   * said port will be allowed (i.e. 0.0.0.0:<port>).
   * 
* * .istio.networking.v1alpha3.ServiceEntry.Resolution resolution = 5; * @return The enum numeric value on the wire for resolution. */ public int getResolutionValue() { return resolution_; } /** *
   * REQUIRED: Service discovery mode for the hosts. Care must be taken
   * when setting the resolution mode to NONE for a TCP port without
   * accompanying IP addresses. In such cases, traffic to any IP on
   * said port will be allowed (i.e. 0.0.0.0:<port>).
   * 
* * .istio.networking.v1alpha3.ServiceEntry.Resolution resolution = 5; * @return The resolution. */ public com.alibaba.nacos.istio.model.naming.ServiceEntry.Resolution getResolution() { @SuppressWarnings("deprecation") com.alibaba.nacos.istio.model.naming.ServiceEntry.Resolution result = com.alibaba.nacos.istio.model.naming.ServiceEntry.Resolution.valueOf(resolution_); return result == null ? com.alibaba.nacos.istio.model.naming.ServiceEntry.Resolution.UNRECOGNIZED : result; } public static final int ENDPOINTS_FIELD_NUMBER = 6; private java.util.List endpoints_; /** *
   * One or more endpoints associated with the service.
   * 
* * repeated .istio.networking.v1alpha3.ServiceEntry.Endpoint endpoints = 6; */ public java.util.List getEndpointsList() { return endpoints_; } /** *
   * One or more endpoints associated with the service.
   * 
* * repeated .istio.networking.v1alpha3.ServiceEntry.Endpoint endpoints = 6; */ public java.util.List getEndpointsOrBuilderList() { return endpoints_; } /** *
   * One or more endpoints associated with the service.
   * 
* * repeated .istio.networking.v1alpha3.ServiceEntry.Endpoint endpoints = 6; */ public int getEndpointsCount() { return endpoints_.size(); } /** *
   * One or more endpoints associated with the service.
   * 
* * repeated .istio.networking.v1alpha3.ServiceEntry.Endpoint endpoints = 6; */ public com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint getEndpoints(int index) { return endpoints_.get(index); } /** *
   * One or more endpoints associated with the service.
   * 
* * repeated .istio.networking.v1alpha3.ServiceEntry.Endpoint endpoints = 6; */ public com.alibaba.nacos.istio.model.naming.ServiceEntry.EndpointOrBuilder getEndpointsOrBuilder( int index) { return endpoints_.get(index); } public static final int EXPORT_TO_FIELD_NUMBER = 7; private com.google.protobuf.LazyStringList exportTo_; /** *
   * A list of namespaces to which this service is exported. Exporting a service
   * allows it to be used by sidecars, gateways and virtual services defined in
   * other namespaces. This feature provides a mechanism for service owners
   * and mesh administrators to control the visibility of services across
   * namespace boundaries.
   * If no namespaces are specified then the service is exported to all
   * namespaces by default.
   * The value "." is reserved and defines an export to the same namespace that
   * the service is declared in. Similarly the value "*" is reserved and
   * defines an export to all namespaces.
   * For a Kubernetes Service, the equivalent effect can be achieved by setting
   * the annotation "networking.istio.io/exportTo" to a comma-separated list
   * of namespace names.
   * NOTE: in the current release, the `exportTo` value is restricted to
   * "." or "*" (i.e., the current namespace or all namespaces).
   * 
* * repeated string export_to = 7; * @return A list containing the exportTo. */ public com.google.protobuf.ProtocolStringList getExportToList() { return exportTo_; } /** *
   * A list of namespaces to which this service is exported. Exporting a service
   * allows it to be used by sidecars, gateways and virtual services defined in
   * other namespaces. This feature provides a mechanism for service owners
   * and mesh administrators to control the visibility of services across
   * namespace boundaries.
   * If no namespaces are specified then the service is exported to all
   * namespaces by default.
   * The value "." is reserved and defines an export to the same namespace that
   * the service is declared in. Similarly the value "*" is reserved and
   * defines an export to all namespaces.
   * For a Kubernetes Service, the equivalent effect can be achieved by setting
   * the annotation "networking.istio.io/exportTo" to a comma-separated list
   * of namespace names.
   * NOTE: in the current release, the `exportTo` value is restricted to
   * "." or "*" (i.e., the current namespace or all namespaces).
   * 
* * repeated string export_to = 7; * @return The count of exportTo. */ public int getExportToCount() { return exportTo_.size(); } /** *
   * A list of namespaces to which this service is exported. Exporting a service
   * allows it to be used by sidecars, gateways and virtual services defined in
   * other namespaces. This feature provides a mechanism for service owners
   * and mesh administrators to control the visibility of services across
   * namespace boundaries.
   * If no namespaces are specified then the service is exported to all
   * namespaces by default.
   * The value "." is reserved and defines an export to the same namespace that
   * the service is declared in. Similarly the value "*" is reserved and
   * defines an export to all namespaces.
   * For a Kubernetes Service, the equivalent effect can be achieved by setting
   * the annotation "networking.istio.io/exportTo" to a comma-separated list
   * of namespace names.
   * NOTE: in the current release, the `exportTo` value is restricted to
   * "." or "*" (i.e., the current namespace or all namespaces).
   * 
* * repeated string export_to = 7; * @param index The index of the element to return. * @return The exportTo at the given index. */ public java.lang.String getExportTo(int index) { return exportTo_.get(index); } /** *
   * A list of namespaces to which this service is exported. Exporting a service
   * allows it to be used by sidecars, gateways and virtual services defined in
   * other namespaces. This feature provides a mechanism for service owners
   * and mesh administrators to control the visibility of services across
   * namespace boundaries.
   * If no namespaces are specified then the service is exported to all
   * namespaces by default.
   * The value "." is reserved and defines an export to the same namespace that
   * the service is declared in. Similarly the value "*" is reserved and
   * defines an export to all namespaces.
   * For a Kubernetes Service, the equivalent effect can be achieved by setting
   * the annotation "networking.istio.io/exportTo" to a comma-separated list
   * of namespace names.
   * NOTE: in the current release, the `exportTo` value is restricted to
   * "." or "*" (i.e., the current namespace or all namespaces).
   * 
* * repeated string export_to = 7; * @param index The index of the value to return. * @return The bytes of the exportTo at the given index. */ public com.google.protobuf.ByteString getExportToBytes(int index) { return exportTo_.getByteString(index); } public static final int SUBJECT_ALT_NAMES_FIELD_NUMBER = 8; private com.google.protobuf.LazyStringList subjectAltNames_; /** *
   * The list of subject alternate names allowed for workload instances that
   * implement this service. This information is used to enforce
   * [secure-naming](https://istio.io/docs/concepts/security/#secure-naming).
   * If specified, the proxy will verify that the server
   * certificate's subject alternate name matches one of the specified values.
   * 
* * repeated string subject_alt_names = 8; * @return A list containing the subjectAltNames. */ public com.google.protobuf.ProtocolStringList getSubjectAltNamesList() { return subjectAltNames_; } /** *
   * The list of subject alternate names allowed for workload instances that
   * implement this service. This information is used to enforce
   * [secure-naming](https://istio.io/docs/concepts/security/#secure-naming).
   * If specified, the proxy will verify that the server
   * certificate's subject alternate name matches one of the specified values.
   * 
* * repeated string subject_alt_names = 8; * @return The count of subjectAltNames. */ public int getSubjectAltNamesCount() { return subjectAltNames_.size(); } /** *
   * The list of subject alternate names allowed for workload instances that
   * implement this service. This information is used to enforce
   * [secure-naming](https://istio.io/docs/concepts/security/#secure-naming).
   * If specified, the proxy will verify that the server
   * certificate's subject alternate name matches one of the specified values.
   * 
* * repeated string subject_alt_names = 8; * @param index The index of the element to return. * @return The subjectAltNames at the given index. */ public java.lang.String getSubjectAltNames(int index) { return subjectAltNames_.get(index); } /** *
   * The list of subject alternate names allowed for workload instances that
   * implement this service. This information is used to enforce
   * [secure-naming](https://istio.io/docs/concepts/security/#secure-naming).
   * If specified, the proxy will verify that the server
   * certificate's subject alternate name matches one of the specified values.
   * 
* * repeated string subject_alt_names = 8; * @param index The index of the value to return. * @return The bytes of the subjectAltNames at the given index. */ public com.google.protobuf.ByteString getSubjectAltNamesBytes(int index) { return subjectAltNames_.getByteString(index); } 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 { for (int i = 0; i < hosts_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, hosts_.getRaw(i)); } for (int i = 0; i < addresses_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, addresses_.getRaw(i)); } for (int i = 0; i < ports_.size(); i++) { output.writeMessage(3, ports_.get(i)); } if (location_ != com.alibaba.nacos.istio.model.naming.ServiceEntry.Location.MESH_EXTERNAL.getNumber()) { output.writeEnum(4, location_); } if (resolution_ != com.alibaba.nacos.istio.model.naming.ServiceEntry.Resolution.NONE.getNumber()) { output.writeEnum(5, resolution_); } for (int i = 0; i < endpoints_.size(); i++) { output.writeMessage(6, endpoints_.get(i)); } for (int i = 0; i < exportTo_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, exportTo_.getRaw(i)); } for (int i = 0; i < subjectAltNames_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, subjectAltNames_.getRaw(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < hosts_.size(); i++) { dataSize += computeStringSizeNoTag(hosts_.getRaw(i)); } size += dataSize; size += 1 * getHostsList().size(); } { int dataSize = 0; for (int i = 0; i < addresses_.size(); i++) { dataSize += computeStringSizeNoTag(addresses_.getRaw(i)); } size += dataSize; size += 1 * getAddressesList().size(); } for (int i = 0; i < ports_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, ports_.get(i)); } if (location_ != com.alibaba.nacos.istio.model.naming.ServiceEntry.Location.MESH_EXTERNAL.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(4, location_); } if (resolution_ != com.alibaba.nacos.istio.model.naming.ServiceEntry.Resolution.NONE.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(5, resolution_); } for (int i = 0; i < endpoints_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, endpoints_.get(i)); } { int dataSize = 0; for (int i = 0; i < exportTo_.size(); i++) { dataSize += computeStringSizeNoTag(exportTo_.getRaw(i)); } size += dataSize; size += 1 * getExportToList().size(); } { int dataSize = 0; for (int i = 0; i < subjectAltNames_.size(); i++) { dataSize += computeStringSizeNoTag(subjectAltNames_.getRaw(i)); } size += dataSize; size += 1 * getSubjectAltNamesList().size(); } 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.alibaba.nacos.istio.model.naming.ServiceEntry)) { return super.equals(obj); } com.alibaba.nacos.istio.model.naming.ServiceEntry other = (com.alibaba.nacos.istio.model.naming.ServiceEntry) obj; if (!getHostsList() .equals(other.getHostsList())) return false; if (!getAddressesList() .equals(other.getAddressesList())) return false; if (!getPortsList() .equals(other.getPortsList())) return false; if (location_ != other.location_) return false; if (resolution_ != other.resolution_) return false; if (!getEndpointsList() .equals(other.getEndpointsList())) return false; if (!getExportToList() .equals(other.getExportToList())) return false; if (!getSubjectAltNamesList() .equals(other.getSubjectAltNamesList())) 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(); if (getHostsCount() > 0) { hash = (37 * hash) + HOSTS_FIELD_NUMBER; hash = (53 * hash) + getHostsList().hashCode(); } if (getAddressesCount() > 0) { hash = (37 * hash) + ADDRESSES_FIELD_NUMBER; hash = (53 * hash) + getAddressesList().hashCode(); } if (getPortsCount() > 0) { hash = (37 * hash) + PORTS_FIELD_NUMBER; hash = (53 * hash) + getPortsList().hashCode(); } hash = (37 * hash) + LOCATION_FIELD_NUMBER; hash = (53 * hash) + location_; hash = (37 * hash) + RESOLUTION_FIELD_NUMBER; hash = (53 * hash) + resolution_; if (getEndpointsCount() > 0) { hash = (37 * hash) + ENDPOINTS_FIELD_NUMBER; hash = (53 * hash) + getEndpointsList().hashCode(); } if (getExportToCount() > 0) { hash = (37 * hash) + EXPORT_TO_FIELD_NUMBER; hash = (53 * hash) + getExportToList().hashCode(); } if (getSubjectAltNamesCount() > 0) { hash = (37 * hash) + SUBJECT_ALT_NAMES_FIELD_NUMBER; hash = (53 * hash) + getSubjectAltNamesList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.alibaba.nacos.istio.model.naming.ServiceEntry parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.alibaba.nacos.istio.model.naming.ServiceEntry parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.nacos.istio.model.naming.ServiceEntry parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.alibaba.nacos.istio.model.naming.ServiceEntry parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.nacos.istio.model.naming.ServiceEntry parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.alibaba.nacos.istio.model.naming.ServiceEntry parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.alibaba.nacos.istio.model.naming.ServiceEntry parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.alibaba.nacos.istio.model.naming.ServiceEntry 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.alibaba.nacos.istio.model.naming.ServiceEntry parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.alibaba.nacos.istio.model.naming.ServiceEntry 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.alibaba.nacos.istio.model.naming.ServiceEntry parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.alibaba.nacos.istio.model.naming.ServiceEntry 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.alibaba.nacos.istio.model.naming.ServiceEntry 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; } /** *
   * ServiceEntry enables adding additional entries into Istio's internal
   * service registry.
   * <!-- go code generation tags
   * +kubetype-gen
   * +kubetype-gen:groupVersion=networking.istio.io/v1alpha3
   * +genclient
   * +k8s:deepcopy-gen=true
   * -->
   * 
* * Protobuf type {@code istio.networking.v1alpha3.ServiceEntry} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:istio.networking.v1alpha3.ServiceEntry) com.alibaba.nacos.istio.model.naming.ServiceEntryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.alibaba.nacos.istio.model.naming.ServiceEntryOuterClass.internal_static_istio_networking_v1alpha3_ServiceEntry_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.alibaba.nacos.istio.model.naming.ServiceEntryOuterClass.internal_static_istio_networking_v1alpha3_ServiceEntry_fieldAccessorTable .ensureFieldAccessorsInitialized( com.alibaba.nacos.istio.model.naming.ServiceEntry.class, com.alibaba.nacos.istio.model.naming.ServiceEntry.Builder.class); } // Construct using com.alibaba.nacos.istio.model.naming.ServiceEntry.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getPortsFieldBuilder(); getEndpointsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); hosts_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); addresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); if (portsBuilder_ == null) { ports_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); } else { portsBuilder_.clear(); } location_ = 0; resolution_ = 0; if (endpointsBuilder_ == null) { endpoints_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); } else { endpointsBuilder_.clear(); } exportTo_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000010); subjectAltNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000020); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.alibaba.nacos.istio.model.naming.ServiceEntryOuterClass.internal_static_istio_networking_v1alpha3_ServiceEntry_descriptor; } @java.lang.Override public com.alibaba.nacos.istio.model.naming.ServiceEntry getDefaultInstanceForType() { return com.alibaba.nacos.istio.model.naming.ServiceEntry.getDefaultInstance(); } @java.lang.Override public com.alibaba.nacos.istio.model.naming.ServiceEntry build() { com.alibaba.nacos.istio.model.naming.ServiceEntry result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.alibaba.nacos.istio.model.naming.ServiceEntry buildPartial() { com.alibaba.nacos.istio.model.naming.ServiceEntry result = new com.alibaba.nacos.istio.model.naming.ServiceEntry(this); int from_bitField0_ = bitField0_; if (((bitField0_ & 0x00000001) != 0)) { hosts_ = hosts_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000001); } result.hosts_ = hosts_; if (((bitField0_ & 0x00000002) != 0)) { addresses_ = addresses_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000002); } result.addresses_ = addresses_; if (portsBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0)) { ports_ = java.util.Collections.unmodifiableList(ports_); bitField0_ = (bitField0_ & ~0x00000004); } result.ports_ = ports_; } else { result.ports_ = portsBuilder_.build(); } result.location_ = location_; result.resolution_ = resolution_; if (endpointsBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0)) { endpoints_ = java.util.Collections.unmodifiableList(endpoints_); bitField0_ = (bitField0_ & ~0x00000008); } result.endpoints_ = endpoints_; } else { result.endpoints_ = endpointsBuilder_.build(); } if (((bitField0_ & 0x00000010) != 0)) { exportTo_ = exportTo_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000010); } result.exportTo_ = exportTo_; if (((bitField0_ & 0x00000020) != 0)) { subjectAltNames_ = subjectAltNames_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000020); } result.subjectAltNames_ = subjectAltNames_; 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.alibaba.nacos.istio.model.naming.ServiceEntry) { return mergeFrom((com.alibaba.nacos.istio.model.naming.ServiceEntry)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.alibaba.nacos.istio.model.naming.ServiceEntry other) { if (other == com.alibaba.nacos.istio.model.naming.ServiceEntry.getDefaultInstance()) return this; if (!other.hosts_.isEmpty()) { if (hosts_.isEmpty()) { hosts_ = other.hosts_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureHostsIsMutable(); hosts_.addAll(other.hosts_); } onChanged(); } if (!other.addresses_.isEmpty()) { if (addresses_.isEmpty()) { addresses_ = other.addresses_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureAddressesIsMutable(); addresses_.addAll(other.addresses_); } onChanged(); } if (portsBuilder_ == null) { if (!other.ports_.isEmpty()) { if (ports_.isEmpty()) { ports_ = other.ports_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensurePortsIsMutable(); ports_.addAll(other.ports_); } onChanged(); } } else { if (!other.ports_.isEmpty()) { if (portsBuilder_.isEmpty()) { portsBuilder_.dispose(); portsBuilder_ = null; ports_ = other.ports_; bitField0_ = (bitField0_ & ~0x00000004); portsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPortsFieldBuilder() : null; } else { portsBuilder_.addAllMessages(other.ports_); } } } if (other.location_ != 0) { setLocationValue(other.getLocationValue()); } if (other.resolution_ != 0) { setResolutionValue(other.getResolutionValue()); } if (endpointsBuilder_ == null) { if (!other.endpoints_.isEmpty()) { if (endpoints_.isEmpty()) { endpoints_ = other.endpoints_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureEndpointsIsMutable(); endpoints_.addAll(other.endpoints_); } onChanged(); } } else { if (!other.endpoints_.isEmpty()) { if (endpointsBuilder_.isEmpty()) { endpointsBuilder_.dispose(); endpointsBuilder_ = null; endpoints_ = other.endpoints_; bitField0_ = (bitField0_ & ~0x00000008); endpointsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEndpointsFieldBuilder() : null; } else { endpointsBuilder_.addAllMessages(other.endpoints_); } } } if (!other.exportTo_.isEmpty()) { if (exportTo_.isEmpty()) { exportTo_ = other.exportTo_; bitField0_ = (bitField0_ & ~0x00000010); } else { ensureExportToIsMutable(); exportTo_.addAll(other.exportTo_); } onChanged(); } if (!other.subjectAltNames_.isEmpty()) { if (subjectAltNames_.isEmpty()) { subjectAltNames_ = other.subjectAltNames_; bitField0_ = (bitField0_ & ~0x00000020); } else { ensureSubjectAltNamesIsMutable(); subjectAltNames_.addAll(other.subjectAltNames_); } 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.alibaba.nacos.istio.model.naming.ServiceEntry parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.alibaba.nacos.istio.model.naming.ServiceEntry) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.google.protobuf.LazyStringList hosts_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureHostsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { hosts_ = new com.google.protobuf.LazyStringArrayList(hosts_); bitField0_ |= 0x00000001; } } /** *
     * REQUIRED. The hosts associated with the ServiceEntry. Could be a DNS
     * name with wildcard prefix.
     * 1. The hosts field is used to select matching hosts in VirtualServices and DestinationRules.
     * 2. For HTTP traffic the HTTP Host/Authority header will be matched against the hosts field.
     * 3. For HTTPs or TLS traffic containing Server Name Indication (SNI), the SNI value
     * will be matched against the hosts field.
     * Note that when resolution is set to type DNS
     * and no endpoints are specified, the host field will be used as the DNS name
     * of the endpoint to route traffic to.
     * 
* * repeated string hosts = 1; * @return A list containing the hosts. */ public com.google.protobuf.ProtocolStringList getHostsList() { return hosts_.getUnmodifiableView(); } /** *
     * REQUIRED. The hosts associated with the ServiceEntry. Could be a DNS
     * name with wildcard prefix.
     * 1. The hosts field is used to select matching hosts in VirtualServices and DestinationRules.
     * 2. For HTTP traffic the HTTP Host/Authority header will be matched against the hosts field.
     * 3. For HTTPs or TLS traffic containing Server Name Indication (SNI), the SNI value
     * will be matched against the hosts field.
     * Note that when resolution is set to type DNS
     * and no endpoints are specified, the host field will be used as the DNS name
     * of the endpoint to route traffic to.
     * 
* * repeated string hosts = 1; * @return The count of hosts. */ public int getHostsCount() { return hosts_.size(); } /** *
     * REQUIRED. The hosts associated with the ServiceEntry. Could be a DNS
     * name with wildcard prefix.
     * 1. The hosts field is used to select matching hosts in VirtualServices and DestinationRules.
     * 2. For HTTP traffic the HTTP Host/Authority header will be matched against the hosts field.
     * 3. For HTTPs or TLS traffic containing Server Name Indication (SNI), the SNI value
     * will be matched against the hosts field.
     * Note that when resolution is set to type DNS
     * and no endpoints are specified, the host field will be used as the DNS name
     * of the endpoint to route traffic to.
     * 
* * repeated string hosts = 1; * @param index The index of the element to return. * @return The hosts at the given index. */ public java.lang.String getHosts(int index) { return hosts_.get(index); } /** *
     * REQUIRED. The hosts associated with the ServiceEntry. Could be a DNS
     * name with wildcard prefix.
     * 1. The hosts field is used to select matching hosts in VirtualServices and DestinationRules.
     * 2. For HTTP traffic the HTTP Host/Authority header will be matched against the hosts field.
     * 3. For HTTPs or TLS traffic containing Server Name Indication (SNI), the SNI value
     * will be matched against the hosts field.
     * Note that when resolution is set to type DNS
     * and no endpoints are specified, the host field will be used as the DNS name
     * of the endpoint to route traffic to.
     * 
* * repeated string hosts = 1; * @param index The index of the value to return. * @return The bytes of the hosts at the given index. */ public com.google.protobuf.ByteString getHostsBytes(int index) { return hosts_.getByteString(index); } /** *
     * REQUIRED. The hosts associated with the ServiceEntry. Could be a DNS
     * name with wildcard prefix.
     * 1. The hosts field is used to select matching hosts in VirtualServices and DestinationRules.
     * 2. For HTTP traffic the HTTP Host/Authority header will be matched against the hosts field.
     * 3. For HTTPs or TLS traffic containing Server Name Indication (SNI), the SNI value
     * will be matched against the hosts field.
     * Note that when resolution is set to type DNS
     * and no endpoints are specified, the host field will be used as the DNS name
     * of the endpoint to route traffic to.
     * 
* * repeated string hosts = 1; * @param index The index to set the value at. * @param value The hosts to set. * @return This builder for chaining. */ public Builder setHosts( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureHostsIsMutable(); hosts_.set(index, value); onChanged(); return this; } /** *
     * REQUIRED. The hosts associated with the ServiceEntry. Could be a DNS
     * name with wildcard prefix.
     * 1. The hosts field is used to select matching hosts in VirtualServices and DestinationRules.
     * 2. For HTTP traffic the HTTP Host/Authority header will be matched against the hosts field.
     * 3. For HTTPs or TLS traffic containing Server Name Indication (SNI), the SNI value
     * will be matched against the hosts field.
     * Note that when resolution is set to type DNS
     * and no endpoints are specified, the host field will be used as the DNS name
     * of the endpoint to route traffic to.
     * 
* * repeated string hosts = 1; * @param value The hosts to add. * @return This builder for chaining. */ public Builder addHosts( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureHostsIsMutable(); hosts_.add(value); onChanged(); return this; } /** *
     * REQUIRED. The hosts associated with the ServiceEntry. Could be a DNS
     * name with wildcard prefix.
     * 1. The hosts field is used to select matching hosts in VirtualServices and DestinationRules.
     * 2. For HTTP traffic the HTTP Host/Authority header will be matched against the hosts field.
     * 3. For HTTPs or TLS traffic containing Server Name Indication (SNI), the SNI value
     * will be matched against the hosts field.
     * Note that when resolution is set to type DNS
     * and no endpoints are specified, the host field will be used as the DNS name
     * of the endpoint to route traffic to.
     * 
* * repeated string hosts = 1; * @param values The hosts to add. * @return This builder for chaining. */ public Builder addAllHosts( java.lang.Iterable values) { ensureHostsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, hosts_); onChanged(); return this; } /** *
     * REQUIRED. The hosts associated with the ServiceEntry. Could be a DNS
     * name with wildcard prefix.
     * 1. The hosts field is used to select matching hosts in VirtualServices and DestinationRules.
     * 2. For HTTP traffic the HTTP Host/Authority header will be matched against the hosts field.
     * 3. For HTTPs or TLS traffic containing Server Name Indication (SNI), the SNI value
     * will be matched against the hosts field.
     * Note that when resolution is set to type DNS
     * and no endpoints are specified, the host field will be used as the DNS name
     * of the endpoint to route traffic to.
     * 
* * repeated string hosts = 1; * @return This builder for chaining. */ public Builder clearHosts() { hosts_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
     * REQUIRED. The hosts associated with the ServiceEntry. Could be a DNS
     * name with wildcard prefix.
     * 1. The hosts field is used to select matching hosts in VirtualServices and DestinationRules.
     * 2. For HTTP traffic the HTTP Host/Authority header will be matched against the hosts field.
     * 3. For HTTPs or TLS traffic containing Server Name Indication (SNI), the SNI value
     * will be matched against the hosts field.
     * Note that when resolution is set to type DNS
     * and no endpoints are specified, the host field will be used as the DNS name
     * of the endpoint to route traffic to.
     * 
* * repeated string hosts = 1; * @param value The bytes of the hosts to add. * @return This builder for chaining. */ public Builder addHostsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureHostsIsMutable(); hosts_.add(value); onChanged(); return this; } private com.google.protobuf.LazyStringList addresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureAddressesIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { addresses_ = new com.google.protobuf.LazyStringArrayList(addresses_); bitField0_ |= 0x00000002; } } /** *
     * The virtual IP addresses associated with the service. Could be CIDR
     * prefix. For HTTP traffic, generated route configurations will include http route
     * domains for both the `addresses` and `hosts` field values and the destination will
     * be identified based on the HTTP Host/Authority header.
     * If one or more IP addresses are specified,
     * the incoming traffic will be identified as belonging to this service
     * if the destination IP matches the IP/CIDRs specified in the addresses
     * field. If the Addresses field is empty, traffic will be identified
     * solely based on the destination port. In such scenarios, the port on
     * which the service is being accessed must not be shared by any other
     * service in the mesh. In other words, the sidecar will behave as a
     * simple TCP proxy, forwarding incoming traffic on a specified port to
     * the specified destination endpoint IP/host. Unix domain socket
     * addresses are not supported in this field.
     * 
* * repeated string addresses = 2; * @return A list containing the addresses. */ public com.google.protobuf.ProtocolStringList getAddressesList() { return addresses_.getUnmodifiableView(); } /** *
     * The virtual IP addresses associated with the service. Could be CIDR
     * prefix. For HTTP traffic, generated route configurations will include http route
     * domains for both the `addresses` and `hosts` field values and the destination will
     * be identified based on the HTTP Host/Authority header.
     * If one or more IP addresses are specified,
     * the incoming traffic will be identified as belonging to this service
     * if the destination IP matches the IP/CIDRs specified in the addresses
     * field. If the Addresses field is empty, traffic will be identified
     * solely based on the destination port. In such scenarios, the port on
     * which the service is being accessed must not be shared by any other
     * service in the mesh. In other words, the sidecar will behave as a
     * simple TCP proxy, forwarding incoming traffic on a specified port to
     * the specified destination endpoint IP/host. Unix domain socket
     * addresses are not supported in this field.
     * 
* * repeated string addresses = 2; * @return The count of addresses. */ public int getAddressesCount() { return addresses_.size(); } /** *
     * The virtual IP addresses associated with the service. Could be CIDR
     * prefix. For HTTP traffic, generated route configurations will include http route
     * domains for both the `addresses` and `hosts` field values and the destination will
     * be identified based on the HTTP Host/Authority header.
     * If one or more IP addresses are specified,
     * the incoming traffic will be identified as belonging to this service
     * if the destination IP matches the IP/CIDRs specified in the addresses
     * field. If the Addresses field is empty, traffic will be identified
     * solely based on the destination port. In such scenarios, the port on
     * which the service is being accessed must not be shared by any other
     * service in the mesh. In other words, the sidecar will behave as a
     * simple TCP proxy, forwarding incoming traffic on a specified port to
     * the specified destination endpoint IP/host. Unix domain socket
     * addresses are not supported in this field.
     * 
* * repeated string addresses = 2; * @param index The index of the element to return. * @return The addresses at the given index. */ public java.lang.String getAddresses(int index) { return addresses_.get(index); } /** *
     * The virtual IP addresses associated with the service. Could be CIDR
     * prefix. For HTTP traffic, generated route configurations will include http route
     * domains for both the `addresses` and `hosts` field values and the destination will
     * be identified based on the HTTP Host/Authority header.
     * If one or more IP addresses are specified,
     * the incoming traffic will be identified as belonging to this service
     * if the destination IP matches the IP/CIDRs specified in the addresses
     * field. If the Addresses field is empty, traffic will be identified
     * solely based on the destination port. In such scenarios, the port on
     * which the service is being accessed must not be shared by any other
     * service in the mesh. In other words, the sidecar will behave as a
     * simple TCP proxy, forwarding incoming traffic on a specified port to
     * the specified destination endpoint IP/host. Unix domain socket
     * addresses are not supported in this field.
     * 
* * repeated string addresses = 2; * @param index The index of the value to return. * @return The bytes of the addresses at the given index. */ public com.google.protobuf.ByteString getAddressesBytes(int index) { return addresses_.getByteString(index); } /** *
     * The virtual IP addresses associated with the service. Could be CIDR
     * prefix. For HTTP traffic, generated route configurations will include http route
     * domains for both the `addresses` and `hosts` field values and the destination will
     * be identified based on the HTTP Host/Authority header.
     * If one or more IP addresses are specified,
     * the incoming traffic will be identified as belonging to this service
     * if the destination IP matches the IP/CIDRs specified in the addresses
     * field. If the Addresses field is empty, traffic will be identified
     * solely based on the destination port. In such scenarios, the port on
     * which the service is being accessed must not be shared by any other
     * service in the mesh. In other words, the sidecar will behave as a
     * simple TCP proxy, forwarding incoming traffic on a specified port to
     * the specified destination endpoint IP/host. Unix domain socket
     * addresses are not supported in this field.
     * 
* * repeated string addresses = 2; * @param index The index to set the value at. * @param value The addresses to set. * @return This builder for chaining. */ public Builder setAddresses( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureAddressesIsMutable(); addresses_.set(index, value); onChanged(); return this; } /** *
     * The virtual IP addresses associated with the service. Could be CIDR
     * prefix. For HTTP traffic, generated route configurations will include http route
     * domains for both the `addresses` and `hosts` field values and the destination will
     * be identified based on the HTTP Host/Authority header.
     * If one or more IP addresses are specified,
     * the incoming traffic will be identified as belonging to this service
     * if the destination IP matches the IP/CIDRs specified in the addresses
     * field. If the Addresses field is empty, traffic will be identified
     * solely based on the destination port. In such scenarios, the port on
     * which the service is being accessed must not be shared by any other
     * service in the mesh. In other words, the sidecar will behave as a
     * simple TCP proxy, forwarding incoming traffic on a specified port to
     * the specified destination endpoint IP/host. Unix domain socket
     * addresses are not supported in this field.
     * 
* * repeated string addresses = 2; * @param value The addresses to add. * @return This builder for chaining. */ public Builder addAddresses( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureAddressesIsMutable(); addresses_.add(value); onChanged(); return this; } /** *
     * The virtual IP addresses associated with the service. Could be CIDR
     * prefix. For HTTP traffic, generated route configurations will include http route
     * domains for both the `addresses` and `hosts` field values and the destination will
     * be identified based on the HTTP Host/Authority header.
     * If one or more IP addresses are specified,
     * the incoming traffic will be identified as belonging to this service
     * if the destination IP matches the IP/CIDRs specified in the addresses
     * field. If the Addresses field is empty, traffic will be identified
     * solely based on the destination port. In such scenarios, the port on
     * which the service is being accessed must not be shared by any other
     * service in the mesh. In other words, the sidecar will behave as a
     * simple TCP proxy, forwarding incoming traffic on a specified port to
     * the specified destination endpoint IP/host. Unix domain socket
     * addresses are not supported in this field.
     * 
* * repeated string addresses = 2; * @param values The addresses to add. * @return This builder for chaining. */ public Builder addAllAddresses( java.lang.Iterable values) { ensureAddressesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, addresses_); onChanged(); return this; } /** *
     * The virtual IP addresses associated with the service. Could be CIDR
     * prefix. For HTTP traffic, generated route configurations will include http route
     * domains for both the `addresses` and `hosts` field values and the destination will
     * be identified based on the HTTP Host/Authority header.
     * If one or more IP addresses are specified,
     * the incoming traffic will be identified as belonging to this service
     * if the destination IP matches the IP/CIDRs specified in the addresses
     * field. If the Addresses field is empty, traffic will be identified
     * solely based on the destination port. In such scenarios, the port on
     * which the service is being accessed must not be shared by any other
     * service in the mesh. In other words, the sidecar will behave as a
     * simple TCP proxy, forwarding incoming traffic on a specified port to
     * the specified destination endpoint IP/host. Unix domain socket
     * addresses are not supported in this field.
     * 
* * repeated string addresses = 2; * @return This builder for chaining. */ public Builder clearAddresses() { addresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
     * The virtual IP addresses associated with the service. Could be CIDR
     * prefix. For HTTP traffic, generated route configurations will include http route
     * domains for both the `addresses` and `hosts` field values and the destination will
     * be identified based on the HTTP Host/Authority header.
     * If one or more IP addresses are specified,
     * the incoming traffic will be identified as belonging to this service
     * if the destination IP matches the IP/CIDRs specified in the addresses
     * field. If the Addresses field is empty, traffic will be identified
     * solely based on the destination port. In such scenarios, the port on
     * which the service is being accessed must not be shared by any other
     * service in the mesh. In other words, the sidecar will behave as a
     * simple TCP proxy, forwarding incoming traffic on a specified port to
     * the specified destination endpoint IP/host. Unix domain socket
     * addresses are not supported in this field.
     * 
* * repeated string addresses = 2; * @param value The bytes of the addresses to add. * @return This builder for chaining. */ public Builder addAddressesBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureAddressesIsMutable(); addresses_.add(value); onChanged(); return this; } private java.util.List ports_ = java.util.Collections.emptyList(); private void ensurePortsIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { ports_ = new java.util.ArrayList(ports_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.alibaba.nacos.istio.model.Port, com.alibaba.nacos.istio.model.Port.Builder, com.alibaba.nacos.istio.model.PortOrBuilder> portsBuilder_; /** *
     * REQUIRED. The ports associated with the external service. If the
     * Endpoints are Unix domain socket addresses, there must be exactly one
     * port.
     * 
* * repeated .istio.networking.v1alpha3.Port ports = 3; */ public java.util.List getPortsList() { if (portsBuilder_ == null) { return java.util.Collections.unmodifiableList(ports_); } else { return portsBuilder_.getMessageList(); } } /** *
     * REQUIRED. The ports associated with the external service. If the
     * Endpoints are Unix domain socket addresses, there must be exactly one
     * port.
     * 
* * repeated .istio.networking.v1alpha3.Port ports = 3; */ public int getPortsCount() { if (portsBuilder_ == null) { return ports_.size(); } else { return portsBuilder_.getCount(); } } /** *
     * REQUIRED. The ports associated with the external service. If the
     * Endpoints are Unix domain socket addresses, there must be exactly one
     * port.
     * 
* * repeated .istio.networking.v1alpha3.Port ports = 3; */ public com.alibaba.nacos.istio.model.Port getPorts(int index) { if (portsBuilder_ == null) { return ports_.get(index); } else { return portsBuilder_.getMessage(index); } } /** *
     * REQUIRED. The ports associated with the external service. If the
     * Endpoints are Unix domain socket addresses, there must be exactly one
     * port.
     * 
* * repeated .istio.networking.v1alpha3.Port ports = 3; */ public Builder setPorts( int index, com.alibaba.nacos.istio.model.Port value) { if (portsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePortsIsMutable(); ports_.set(index, value); onChanged(); } else { portsBuilder_.setMessage(index, value); } return this; } /** *
     * REQUIRED. The ports associated with the external service. If the
     * Endpoints are Unix domain socket addresses, there must be exactly one
     * port.
     * 
* * repeated .istio.networking.v1alpha3.Port ports = 3; */ public Builder setPorts( int index, com.alibaba.nacos.istio.model.Port.Builder builderForValue) { if (portsBuilder_ == null) { ensurePortsIsMutable(); ports_.set(index, builderForValue.build()); onChanged(); } else { portsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * REQUIRED. The ports associated with the external service. If the
     * Endpoints are Unix domain socket addresses, there must be exactly one
     * port.
     * 
* * repeated .istio.networking.v1alpha3.Port ports = 3; */ public Builder addPorts(com.alibaba.nacos.istio.model.Port value) { if (portsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePortsIsMutable(); ports_.add(value); onChanged(); } else { portsBuilder_.addMessage(value); } return this; } /** *
     * REQUIRED. The ports associated with the external service. If the
     * Endpoints are Unix domain socket addresses, there must be exactly one
     * port.
     * 
* * repeated .istio.networking.v1alpha3.Port ports = 3; */ public Builder addPorts( int index, com.alibaba.nacos.istio.model.Port value) { if (portsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePortsIsMutable(); ports_.add(index, value); onChanged(); } else { portsBuilder_.addMessage(index, value); } return this; } /** *
     * REQUIRED. The ports associated with the external service. If the
     * Endpoints are Unix domain socket addresses, there must be exactly one
     * port.
     * 
* * repeated .istio.networking.v1alpha3.Port ports = 3; */ public Builder addPorts( com.alibaba.nacos.istio.model.Port.Builder builderForValue) { if (portsBuilder_ == null) { ensurePortsIsMutable(); ports_.add(builderForValue.build()); onChanged(); } else { portsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * REQUIRED. The ports associated with the external service. If the
     * Endpoints are Unix domain socket addresses, there must be exactly one
     * port.
     * 
* * repeated .istio.networking.v1alpha3.Port ports = 3; */ public Builder addPorts( int index, com.alibaba.nacos.istio.model.Port.Builder builderForValue) { if (portsBuilder_ == null) { ensurePortsIsMutable(); ports_.add(index, builderForValue.build()); onChanged(); } else { portsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * REQUIRED. The ports associated with the external service. If the
     * Endpoints are Unix domain socket addresses, there must be exactly one
     * port.
     * 
* * repeated .istio.networking.v1alpha3.Port ports = 3; */ public Builder addAllPorts( java.lang.Iterable values) { if (portsBuilder_ == null) { ensurePortsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, ports_); onChanged(); } else { portsBuilder_.addAllMessages(values); } return this; } /** *
     * REQUIRED. The ports associated with the external service. If the
     * Endpoints are Unix domain socket addresses, there must be exactly one
     * port.
     * 
* * repeated .istio.networking.v1alpha3.Port ports = 3; */ public Builder clearPorts() { if (portsBuilder_ == null) { ports_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { portsBuilder_.clear(); } return this; } /** *
     * REQUIRED. The ports associated with the external service. If the
     * Endpoints are Unix domain socket addresses, there must be exactly one
     * port.
     * 
* * repeated .istio.networking.v1alpha3.Port ports = 3; */ public Builder removePorts(int index) { if (portsBuilder_ == null) { ensurePortsIsMutable(); ports_.remove(index); onChanged(); } else { portsBuilder_.remove(index); } return this; } /** *
     * REQUIRED. The ports associated with the external service. If the
     * Endpoints are Unix domain socket addresses, there must be exactly one
     * port.
     * 
* * repeated .istio.networking.v1alpha3.Port ports = 3; */ public com.alibaba.nacos.istio.model.Port.Builder getPortsBuilder( int index) { return getPortsFieldBuilder().getBuilder(index); } /** *
     * REQUIRED. The ports associated with the external service. If the
     * Endpoints are Unix domain socket addresses, there must be exactly one
     * port.
     * 
* * repeated .istio.networking.v1alpha3.Port ports = 3; */ public com.alibaba.nacos.istio.model.PortOrBuilder getPortsOrBuilder( int index) { if (portsBuilder_ == null) { return ports_.get(index); } else { return portsBuilder_.getMessageOrBuilder(index); } } /** *
     * REQUIRED. The ports associated with the external service. If the
     * Endpoints are Unix domain socket addresses, there must be exactly one
     * port.
     * 
* * repeated .istio.networking.v1alpha3.Port ports = 3; */ public java.util.List getPortsOrBuilderList() { if (portsBuilder_ != null) { return portsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(ports_); } } /** *
     * REQUIRED. The ports associated with the external service. If the
     * Endpoints are Unix domain socket addresses, there must be exactly one
     * port.
     * 
* * repeated .istio.networking.v1alpha3.Port ports = 3; */ public com.alibaba.nacos.istio.model.Port.Builder addPortsBuilder() { return getPortsFieldBuilder().addBuilder( com.alibaba.nacos.istio.model.Port.getDefaultInstance()); } /** *
     * REQUIRED. The ports associated with the external service. If the
     * Endpoints are Unix domain socket addresses, there must be exactly one
     * port.
     * 
* * repeated .istio.networking.v1alpha3.Port ports = 3; */ public com.alibaba.nacos.istio.model.Port.Builder addPortsBuilder( int index) { return getPortsFieldBuilder().addBuilder( index, com.alibaba.nacos.istio.model.Port.getDefaultInstance()); } /** *
     * REQUIRED. The ports associated with the external service. If the
     * Endpoints are Unix domain socket addresses, there must be exactly one
     * port.
     * 
* * repeated .istio.networking.v1alpha3.Port ports = 3; */ public java.util.List getPortsBuilderList() { return getPortsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.alibaba.nacos.istio.model.Port, com.alibaba.nacos.istio.model.Port.Builder, com.alibaba.nacos.istio.model.PortOrBuilder> getPortsFieldBuilder() { if (portsBuilder_ == null) { portsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.alibaba.nacos.istio.model.Port, com.alibaba.nacos.istio.model.Port.Builder, com.alibaba.nacos.istio.model.PortOrBuilder>( ports_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); ports_ = null; } return portsBuilder_; } private int location_ = 0; /** *
     * Specify whether the service should be considered external to the mesh
     * or part of the mesh.
     * 
* * .istio.networking.v1alpha3.ServiceEntry.Location location = 4; * @return The enum numeric value on the wire for location. */ public int getLocationValue() { return location_; } /** *
     * Specify whether the service should be considered external to the mesh
     * or part of the mesh.
     * 
* * .istio.networking.v1alpha3.ServiceEntry.Location location = 4; * @param value The enum numeric value on the wire for location to set. * @return This builder for chaining. */ public Builder setLocationValue(int value) { location_ = value; onChanged(); return this; } /** *
     * Specify whether the service should be considered external to the mesh
     * or part of the mesh.
     * 
* * .istio.networking.v1alpha3.ServiceEntry.Location location = 4; * @return The location. */ public com.alibaba.nacos.istio.model.naming.ServiceEntry.Location getLocation() { @SuppressWarnings("deprecation") com.alibaba.nacos.istio.model.naming.ServiceEntry.Location result = com.alibaba.nacos.istio.model.naming.ServiceEntry.Location.valueOf(location_); return result == null ? com.alibaba.nacos.istio.model.naming.ServiceEntry.Location.UNRECOGNIZED : result; } /** *
     * Specify whether the service should be considered external to the mesh
     * or part of the mesh.
     * 
* * .istio.networking.v1alpha3.ServiceEntry.Location location = 4; * @param value The location to set. * @return This builder for chaining. */ public Builder setLocation(com.alibaba.nacos.istio.model.naming.ServiceEntry.Location value) { if (value == null) { throw new NullPointerException(); } location_ = value.getNumber(); onChanged(); return this; } /** *
     * Specify whether the service should be considered external to the mesh
     * or part of the mesh.
     * 
* * .istio.networking.v1alpha3.ServiceEntry.Location location = 4; * @return This builder for chaining. */ public Builder clearLocation() { location_ = 0; onChanged(); return this; } private int resolution_ = 0; /** *
     * REQUIRED: Service discovery mode for the hosts. Care must be taken
     * when setting the resolution mode to NONE for a TCP port without
     * accompanying IP addresses. In such cases, traffic to any IP on
     * said port will be allowed (i.e. 0.0.0.0:<port>).
     * 
* * .istio.networking.v1alpha3.ServiceEntry.Resolution resolution = 5; * @return The enum numeric value on the wire for resolution. */ public int getResolutionValue() { return resolution_; } /** *
     * REQUIRED: Service discovery mode for the hosts. Care must be taken
     * when setting the resolution mode to NONE for a TCP port without
     * accompanying IP addresses. In such cases, traffic to any IP on
     * said port will be allowed (i.e. 0.0.0.0:<port>).
     * 
* * .istio.networking.v1alpha3.ServiceEntry.Resolution resolution = 5; * @param value The enum numeric value on the wire for resolution to set. * @return This builder for chaining. */ public Builder setResolutionValue(int value) { resolution_ = value; onChanged(); return this; } /** *
     * REQUIRED: Service discovery mode for the hosts. Care must be taken
     * when setting the resolution mode to NONE for a TCP port without
     * accompanying IP addresses. In such cases, traffic to any IP on
     * said port will be allowed (i.e. 0.0.0.0:<port>).
     * 
* * .istio.networking.v1alpha3.ServiceEntry.Resolution resolution = 5; * @return The resolution. */ public com.alibaba.nacos.istio.model.naming.ServiceEntry.Resolution getResolution() { @SuppressWarnings("deprecation") com.alibaba.nacos.istio.model.naming.ServiceEntry.Resolution result = com.alibaba.nacos.istio.model.naming.ServiceEntry.Resolution.valueOf(resolution_); return result == null ? com.alibaba.nacos.istio.model.naming.ServiceEntry.Resolution.UNRECOGNIZED : result; } /** *
     * REQUIRED: Service discovery mode for the hosts. Care must be taken
     * when setting the resolution mode to NONE for a TCP port without
     * accompanying IP addresses. In such cases, traffic to any IP on
     * said port will be allowed (i.e. 0.0.0.0:<port>).
     * 
* * .istio.networking.v1alpha3.ServiceEntry.Resolution resolution = 5; * @param value The resolution to set. * @return This builder for chaining. */ public Builder setResolution(com.alibaba.nacos.istio.model.naming.ServiceEntry.Resolution value) { if (value == null) { throw new NullPointerException(); } resolution_ = value.getNumber(); onChanged(); return this; } /** *
     * REQUIRED: Service discovery mode for the hosts. Care must be taken
     * when setting the resolution mode to NONE for a TCP port without
     * accompanying IP addresses. In such cases, traffic to any IP on
     * said port will be allowed (i.e. 0.0.0.0:<port>).
     * 
* * .istio.networking.v1alpha3.ServiceEntry.Resolution resolution = 5; * @return This builder for chaining. */ public Builder clearResolution() { resolution_ = 0; onChanged(); return this; } private java.util.List endpoints_ = java.util.Collections.emptyList(); private void ensureEndpointsIsMutable() { if (!((bitField0_ & 0x00000008) != 0)) { endpoints_ = new java.util.ArrayList(endpoints_); bitField0_ |= 0x00000008; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint, com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint.Builder, com.alibaba.nacos.istio.model.naming.ServiceEntry.EndpointOrBuilder> endpointsBuilder_; /** *
     * One or more endpoints associated with the service.
     * 
* * repeated .istio.networking.v1alpha3.ServiceEntry.Endpoint endpoints = 6; */ public java.util.List getEndpointsList() { if (endpointsBuilder_ == null) { return java.util.Collections.unmodifiableList(endpoints_); } else { return endpointsBuilder_.getMessageList(); } } /** *
     * One or more endpoints associated with the service.
     * 
* * repeated .istio.networking.v1alpha3.ServiceEntry.Endpoint endpoints = 6; */ public int getEndpointsCount() { if (endpointsBuilder_ == null) { return endpoints_.size(); } else { return endpointsBuilder_.getCount(); } } /** *
     * One or more endpoints associated with the service.
     * 
* * repeated .istio.networking.v1alpha3.ServiceEntry.Endpoint endpoints = 6; */ public com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint getEndpoints(int index) { if (endpointsBuilder_ == null) { return endpoints_.get(index); } else { return endpointsBuilder_.getMessage(index); } } /** *
     * One or more endpoints associated with the service.
     * 
* * repeated .istio.networking.v1alpha3.ServiceEntry.Endpoint endpoints = 6; */ public Builder setEndpoints( int index, com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint value) { if (endpointsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEndpointsIsMutable(); endpoints_.set(index, value); onChanged(); } else { endpointsBuilder_.setMessage(index, value); } return this; } /** *
     * One or more endpoints associated with the service.
     * 
* * repeated .istio.networking.v1alpha3.ServiceEntry.Endpoint endpoints = 6; */ public Builder setEndpoints( int index, com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint.Builder builderForValue) { if (endpointsBuilder_ == null) { ensureEndpointsIsMutable(); endpoints_.set(index, builderForValue.build()); onChanged(); } else { endpointsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * One or more endpoints associated with the service.
     * 
* * repeated .istio.networking.v1alpha3.ServiceEntry.Endpoint endpoints = 6; */ public Builder addEndpoints(com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint value) { if (endpointsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEndpointsIsMutable(); endpoints_.add(value); onChanged(); } else { endpointsBuilder_.addMessage(value); } return this; } /** *
     * One or more endpoints associated with the service.
     * 
* * repeated .istio.networking.v1alpha3.ServiceEntry.Endpoint endpoints = 6; */ public Builder addEndpoints( int index, com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint value) { if (endpointsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEndpointsIsMutable(); endpoints_.add(index, value); onChanged(); } else { endpointsBuilder_.addMessage(index, value); } return this; } /** *
     * One or more endpoints associated with the service.
     * 
* * repeated .istio.networking.v1alpha3.ServiceEntry.Endpoint endpoints = 6; */ public Builder addEndpoints( com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint.Builder builderForValue) { if (endpointsBuilder_ == null) { ensureEndpointsIsMutable(); endpoints_.add(builderForValue.build()); onChanged(); } else { endpointsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * One or more endpoints associated with the service.
     * 
* * repeated .istio.networking.v1alpha3.ServiceEntry.Endpoint endpoints = 6; */ public Builder addEndpoints( int index, com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint.Builder builderForValue) { if (endpointsBuilder_ == null) { ensureEndpointsIsMutable(); endpoints_.add(index, builderForValue.build()); onChanged(); } else { endpointsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * One or more endpoints associated with the service.
     * 
* * repeated .istio.networking.v1alpha3.ServiceEntry.Endpoint endpoints = 6; */ public Builder addAllEndpoints( java.lang.Iterable values) { if (endpointsBuilder_ == null) { ensureEndpointsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, endpoints_); onChanged(); } else { endpointsBuilder_.addAllMessages(values); } return this; } /** *
     * One or more endpoints associated with the service.
     * 
* * repeated .istio.networking.v1alpha3.ServiceEntry.Endpoint endpoints = 6; */ public Builder clearEndpoints() { if (endpointsBuilder_ == null) { endpoints_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { endpointsBuilder_.clear(); } return this; } /** *
     * One or more endpoints associated with the service.
     * 
* * repeated .istio.networking.v1alpha3.ServiceEntry.Endpoint endpoints = 6; */ public Builder removeEndpoints(int index) { if (endpointsBuilder_ == null) { ensureEndpointsIsMutable(); endpoints_.remove(index); onChanged(); } else { endpointsBuilder_.remove(index); } return this; } /** *
     * One or more endpoints associated with the service.
     * 
* * repeated .istio.networking.v1alpha3.ServiceEntry.Endpoint endpoints = 6; */ public com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint.Builder getEndpointsBuilder( int index) { return getEndpointsFieldBuilder().getBuilder(index); } /** *
     * One or more endpoints associated with the service.
     * 
* * repeated .istio.networking.v1alpha3.ServiceEntry.Endpoint endpoints = 6; */ public com.alibaba.nacos.istio.model.naming.ServiceEntry.EndpointOrBuilder getEndpointsOrBuilder( int index) { if (endpointsBuilder_ == null) { return endpoints_.get(index); } else { return endpointsBuilder_.getMessageOrBuilder(index); } } /** *
     * One or more endpoints associated with the service.
     * 
* * repeated .istio.networking.v1alpha3.ServiceEntry.Endpoint endpoints = 6; */ public java.util.List getEndpointsOrBuilderList() { if (endpointsBuilder_ != null) { return endpointsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(endpoints_); } } /** *
     * One or more endpoints associated with the service.
     * 
* * repeated .istio.networking.v1alpha3.ServiceEntry.Endpoint endpoints = 6; */ public com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint.Builder addEndpointsBuilder() { return getEndpointsFieldBuilder().addBuilder( com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint.getDefaultInstance()); } /** *
     * One or more endpoints associated with the service.
     * 
* * repeated .istio.networking.v1alpha3.ServiceEntry.Endpoint endpoints = 6; */ public com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint.Builder addEndpointsBuilder( int index) { return getEndpointsFieldBuilder().addBuilder( index, com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint.getDefaultInstance()); } /** *
     * One or more endpoints associated with the service.
     * 
* * repeated .istio.networking.v1alpha3.ServiceEntry.Endpoint endpoints = 6; */ public java.util.List getEndpointsBuilderList() { return getEndpointsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint, com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint.Builder, com.alibaba.nacos.istio.model.naming.ServiceEntry.EndpointOrBuilder> getEndpointsFieldBuilder() { if (endpointsBuilder_ == null) { endpointsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint, com.alibaba.nacos.istio.model.naming.ServiceEntry.Endpoint.Builder, com.alibaba.nacos.istio.model.naming.ServiceEntry.EndpointOrBuilder>( endpoints_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); endpoints_ = null; } return endpointsBuilder_; } private com.google.protobuf.LazyStringList exportTo_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureExportToIsMutable() { if (!((bitField0_ & 0x00000010) != 0)) { exportTo_ = new com.google.protobuf.LazyStringArrayList(exportTo_); bitField0_ |= 0x00000010; } } /** *
     * A list of namespaces to which this service is exported. Exporting a service
     * allows it to be used by sidecars, gateways and virtual services defined in
     * other namespaces. This feature provides a mechanism for service owners
     * and mesh administrators to control the visibility of services across
     * namespace boundaries.
     * If no namespaces are specified then the service is exported to all
     * namespaces by default.
     * The value "." is reserved and defines an export to the same namespace that
     * the service is declared in. Similarly the value "*" is reserved and
     * defines an export to all namespaces.
     * For a Kubernetes Service, the equivalent effect can be achieved by setting
     * the annotation "networking.istio.io/exportTo" to a comma-separated list
     * of namespace names.
     * NOTE: in the current release, the `exportTo` value is restricted to
     * "." or "*" (i.e., the current namespace or all namespaces).
     * 
* * repeated string export_to = 7; * @return A list containing the exportTo. */ public com.google.protobuf.ProtocolStringList getExportToList() { return exportTo_.getUnmodifiableView(); } /** *
     * A list of namespaces to which this service is exported. Exporting a service
     * allows it to be used by sidecars, gateways and virtual services defined in
     * other namespaces. This feature provides a mechanism for service owners
     * and mesh administrators to control the visibility of services across
     * namespace boundaries.
     * If no namespaces are specified then the service is exported to all
     * namespaces by default.
     * The value "." is reserved and defines an export to the same namespace that
     * the service is declared in. Similarly the value "*" is reserved and
     * defines an export to all namespaces.
     * For a Kubernetes Service, the equivalent effect can be achieved by setting
     * the annotation "networking.istio.io/exportTo" to a comma-separated list
     * of namespace names.
     * NOTE: in the current release, the `exportTo` value is restricted to
     * "." or "*" (i.e., the current namespace or all namespaces).
     * 
* * repeated string export_to = 7; * @return The count of exportTo. */ public int getExportToCount() { return exportTo_.size(); } /** *
     * A list of namespaces to which this service is exported. Exporting a service
     * allows it to be used by sidecars, gateways and virtual services defined in
     * other namespaces. This feature provides a mechanism for service owners
     * and mesh administrators to control the visibility of services across
     * namespace boundaries.
     * If no namespaces are specified then the service is exported to all
     * namespaces by default.
     * The value "." is reserved and defines an export to the same namespace that
     * the service is declared in. Similarly the value "*" is reserved and
     * defines an export to all namespaces.
     * For a Kubernetes Service, the equivalent effect can be achieved by setting
     * the annotation "networking.istio.io/exportTo" to a comma-separated list
     * of namespace names.
     * NOTE: in the current release, the `exportTo` value is restricted to
     * "." or "*" (i.e., the current namespace or all namespaces).
     * 
* * repeated string export_to = 7; * @param index The index of the element to return. * @return The exportTo at the given index. */ public java.lang.String getExportTo(int index) { return exportTo_.get(index); } /** *
     * A list of namespaces to which this service is exported. Exporting a service
     * allows it to be used by sidecars, gateways and virtual services defined in
     * other namespaces. This feature provides a mechanism for service owners
     * and mesh administrators to control the visibility of services across
     * namespace boundaries.
     * If no namespaces are specified then the service is exported to all
     * namespaces by default.
     * The value "." is reserved and defines an export to the same namespace that
     * the service is declared in. Similarly the value "*" is reserved and
     * defines an export to all namespaces.
     * For a Kubernetes Service, the equivalent effect can be achieved by setting
     * the annotation "networking.istio.io/exportTo" to a comma-separated list
     * of namespace names.
     * NOTE: in the current release, the `exportTo` value is restricted to
     * "." or "*" (i.e., the current namespace or all namespaces).
     * 
* * repeated string export_to = 7; * @param index The index of the value to return. * @return The bytes of the exportTo at the given index. */ public com.google.protobuf.ByteString getExportToBytes(int index) { return exportTo_.getByteString(index); } /** *
     * A list of namespaces to which this service is exported. Exporting a service
     * allows it to be used by sidecars, gateways and virtual services defined in
     * other namespaces. This feature provides a mechanism for service owners
     * and mesh administrators to control the visibility of services across
     * namespace boundaries.
     * If no namespaces are specified then the service is exported to all
     * namespaces by default.
     * The value "." is reserved and defines an export to the same namespace that
     * the service is declared in. Similarly the value "*" is reserved and
     * defines an export to all namespaces.
     * For a Kubernetes Service, the equivalent effect can be achieved by setting
     * the annotation "networking.istio.io/exportTo" to a comma-separated list
     * of namespace names.
     * NOTE: in the current release, the `exportTo` value is restricted to
     * "." or "*" (i.e., the current namespace or all namespaces).
     * 
* * repeated string export_to = 7; * @param index The index to set the value at. * @param value The exportTo to set. * @return This builder for chaining. */ public Builder setExportTo( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureExportToIsMutable(); exportTo_.set(index, value); onChanged(); return this; } /** *
     * A list of namespaces to which this service is exported. Exporting a service
     * allows it to be used by sidecars, gateways and virtual services defined in
     * other namespaces. This feature provides a mechanism for service owners
     * and mesh administrators to control the visibility of services across
     * namespace boundaries.
     * If no namespaces are specified then the service is exported to all
     * namespaces by default.
     * The value "." is reserved and defines an export to the same namespace that
     * the service is declared in. Similarly the value "*" is reserved and
     * defines an export to all namespaces.
     * For a Kubernetes Service, the equivalent effect can be achieved by setting
     * the annotation "networking.istio.io/exportTo" to a comma-separated list
     * of namespace names.
     * NOTE: in the current release, the `exportTo` value is restricted to
     * "." or "*" (i.e., the current namespace or all namespaces).
     * 
* * repeated string export_to = 7; * @param value The exportTo to add. * @return This builder for chaining. */ public Builder addExportTo( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureExportToIsMutable(); exportTo_.add(value); onChanged(); return this; } /** *
     * A list of namespaces to which this service is exported. Exporting a service
     * allows it to be used by sidecars, gateways and virtual services defined in
     * other namespaces. This feature provides a mechanism for service owners
     * and mesh administrators to control the visibility of services across
     * namespace boundaries.
     * If no namespaces are specified then the service is exported to all
     * namespaces by default.
     * The value "." is reserved and defines an export to the same namespace that
     * the service is declared in. Similarly the value "*" is reserved and
     * defines an export to all namespaces.
     * For a Kubernetes Service, the equivalent effect can be achieved by setting
     * the annotation "networking.istio.io/exportTo" to a comma-separated list
     * of namespace names.
     * NOTE: in the current release, the `exportTo` value is restricted to
     * "." or "*" (i.e., the current namespace or all namespaces).
     * 
* * repeated string export_to = 7; * @param values The exportTo to add. * @return This builder for chaining. */ public Builder addAllExportTo( java.lang.Iterable values) { ensureExportToIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, exportTo_); onChanged(); return this; } /** *
     * A list of namespaces to which this service is exported. Exporting a service
     * allows it to be used by sidecars, gateways and virtual services defined in
     * other namespaces. This feature provides a mechanism for service owners
     * and mesh administrators to control the visibility of services across
     * namespace boundaries.
     * If no namespaces are specified then the service is exported to all
     * namespaces by default.
     * The value "." is reserved and defines an export to the same namespace that
     * the service is declared in. Similarly the value "*" is reserved and
     * defines an export to all namespaces.
     * For a Kubernetes Service, the equivalent effect can be achieved by setting
     * the annotation "networking.istio.io/exportTo" to a comma-separated list
     * of namespace names.
     * NOTE: in the current release, the `exportTo` value is restricted to
     * "." or "*" (i.e., the current namespace or all namespaces).
     * 
* * repeated string export_to = 7; * @return This builder for chaining. */ public Builder clearExportTo() { exportTo_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** *
     * A list of namespaces to which this service is exported. Exporting a service
     * allows it to be used by sidecars, gateways and virtual services defined in
     * other namespaces. This feature provides a mechanism for service owners
     * and mesh administrators to control the visibility of services across
     * namespace boundaries.
     * If no namespaces are specified then the service is exported to all
     * namespaces by default.
     * The value "." is reserved and defines an export to the same namespace that
     * the service is declared in. Similarly the value "*" is reserved and
     * defines an export to all namespaces.
     * For a Kubernetes Service, the equivalent effect can be achieved by setting
     * the annotation "networking.istio.io/exportTo" to a comma-separated list
     * of namespace names.
     * NOTE: in the current release, the `exportTo` value is restricted to
     * "." or "*" (i.e., the current namespace or all namespaces).
     * 
* * repeated string export_to = 7; * @param value The bytes of the exportTo to add. * @return This builder for chaining. */ public Builder addExportToBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureExportToIsMutable(); exportTo_.add(value); onChanged(); return this; } private com.google.protobuf.LazyStringList subjectAltNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureSubjectAltNamesIsMutable() { if (!((bitField0_ & 0x00000020) != 0)) { subjectAltNames_ = new com.google.protobuf.LazyStringArrayList(subjectAltNames_); bitField0_ |= 0x00000020; } } /** *
     * The list of subject alternate names allowed for workload instances that
     * implement this service. This information is used to enforce
     * [secure-naming](https://istio.io/docs/concepts/security/#secure-naming).
     * If specified, the proxy will verify that the server
     * certificate's subject alternate name matches one of the specified values.
     * 
* * repeated string subject_alt_names = 8; * @return A list containing the subjectAltNames. */ public com.google.protobuf.ProtocolStringList getSubjectAltNamesList() { return subjectAltNames_.getUnmodifiableView(); } /** *
     * The list of subject alternate names allowed for workload instances that
     * implement this service. This information is used to enforce
     * [secure-naming](https://istio.io/docs/concepts/security/#secure-naming).
     * If specified, the proxy will verify that the server
     * certificate's subject alternate name matches one of the specified values.
     * 
* * repeated string subject_alt_names = 8; * @return The count of subjectAltNames. */ public int getSubjectAltNamesCount() { return subjectAltNames_.size(); } /** *
     * The list of subject alternate names allowed for workload instances that
     * implement this service. This information is used to enforce
     * [secure-naming](https://istio.io/docs/concepts/security/#secure-naming).
     * If specified, the proxy will verify that the server
     * certificate's subject alternate name matches one of the specified values.
     * 
* * repeated string subject_alt_names = 8; * @param index The index of the element to return. * @return The subjectAltNames at the given index. */ public java.lang.String getSubjectAltNames(int index) { return subjectAltNames_.get(index); } /** *
     * The list of subject alternate names allowed for workload instances that
     * implement this service. This information is used to enforce
     * [secure-naming](https://istio.io/docs/concepts/security/#secure-naming).
     * If specified, the proxy will verify that the server
     * certificate's subject alternate name matches one of the specified values.
     * 
* * repeated string subject_alt_names = 8; * @param index The index of the value to return. * @return The bytes of the subjectAltNames at the given index. */ public com.google.protobuf.ByteString getSubjectAltNamesBytes(int index) { return subjectAltNames_.getByteString(index); } /** *
     * The list of subject alternate names allowed for workload instances that
     * implement this service. This information is used to enforce
     * [secure-naming](https://istio.io/docs/concepts/security/#secure-naming).
     * If specified, the proxy will verify that the server
     * certificate's subject alternate name matches one of the specified values.
     * 
* * repeated string subject_alt_names = 8; * @param index The index to set the value at. * @param value The subjectAltNames to set. * @return This builder for chaining. */ public Builder setSubjectAltNames( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureSubjectAltNamesIsMutable(); subjectAltNames_.set(index, value); onChanged(); return this; } /** *
     * The list of subject alternate names allowed for workload instances that
     * implement this service. This information is used to enforce
     * [secure-naming](https://istio.io/docs/concepts/security/#secure-naming).
     * If specified, the proxy will verify that the server
     * certificate's subject alternate name matches one of the specified values.
     * 
* * repeated string subject_alt_names = 8; * @param value The subjectAltNames to add. * @return This builder for chaining. */ public Builder addSubjectAltNames( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureSubjectAltNamesIsMutable(); subjectAltNames_.add(value); onChanged(); return this; } /** *
     * The list of subject alternate names allowed for workload instances that
     * implement this service. This information is used to enforce
     * [secure-naming](https://istio.io/docs/concepts/security/#secure-naming).
     * If specified, the proxy will verify that the server
     * certificate's subject alternate name matches one of the specified values.
     * 
* * repeated string subject_alt_names = 8; * @param values The subjectAltNames to add. * @return This builder for chaining. */ public Builder addAllSubjectAltNames( java.lang.Iterable values) { ensureSubjectAltNamesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, subjectAltNames_); onChanged(); return this; } /** *
     * The list of subject alternate names allowed for workload instances that
     * implement this service. This information is used to enforce
     * [secure-naming](https://istio.io/docs/concepts/security/#secure-naming).
     * If specified, the proxy will verify that the server
     * certificate's subject alternate name matches one of the specified values.
     * 
* * repeated string subject_alt_names = 8; * @return This builder for chaining. */ public Builder clearSubjectAltNames() { subjectAltNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } /** *
     * The list of subject alternate names allowed for workload instances that
     * implement this service. This information is used to enforce
     * [secure-naming](https://istio.io/docs/concepts/security/#secure-naming).
     * If specified, the proxy will verify that the server
     * certificate's subject alternate name matches one of the specified values.
     * 
* * repeated string subject_alt_names = 8; * @param value The bytes of the subjectAltNames to add. * @return This builder for chaining. */ public Builder addSubjectAltNamesBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureSubjectAltNamesIsMutable(); subjectAltNames_.add(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:istio.networking.v1alpha3.ServiceEntry) } // @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.ServiceEntry) private static final com.alibaba.nacos.istio.model.naming.ServiceEntry DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.alibaba.nacos.istio.model.naming.ServiceEntry(); } public static com.alibaba.nacos.istio.model.naming.ServiceEntry getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ServiceEntry parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ServiceEntry(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.alibaba.nacos.istio.model.naming.ServiceEntry getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy