Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// 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.
*
* 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).
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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
* -->
*
* 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.
*
* 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.
*
* 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.
*
* 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>).
*
* 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).
*
* 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.
*
* 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;
}
}