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: networking/v1alpha3/workload_entry.proto
package istio.networking.v1alpha3;
public final class WorkloadEntryOuterClass {
private WorkloadEntryOuterClass() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface WorkloadEntryOrBuilder extends
// @@protoc_insertion_point(interface_extends:istio.networking.v1alpha3.WorkloadEntry)
com.google.protobuf.MessageOrBuilder {
/**
*
* 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.
*
* 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 [(.google.api.field_behavior) = REQUIRED];
* @return The bytes for address.
*/
com.google.protobuf.ByteString
getAddressBytes();
/**
*
* Set of ports associated with the endpoint. If the port map is
* specified, it must be a map of servicePortName to this endpoint's
* port, such that traffic to the service port will be forwarded to
* the endpoint port that maps to the service's portName. If
* omitted, and the targetPort is specified as part of the service's
* port specification, traffic to the service port will be forwarded
* to one of the endpoints on the specified `targetPort`. If both
* the targetPort and endpoint's port map are not specified, traffic
* to a service port will be forwarded to one of the endpoints on
* the same port.
* **NOTE 1:** Do not use for `unix://` addresses.
* **NOTE 2:** endpoint port map takes precedence over targetPort.
*
* Set of ports associated with the endpoint. If the port map is
* specified, it must be a map of servicePortName to this endpoint's
* port, such that traffic to the service port will be forwarded to
* the endpoint port that maps to the service's portName. If
* omitted, and the targetPort is specified as part of the service's
* port specification, traffic to the service port will be forwarded
* to one of the endpoints on the specified `targetPort`. If both
* the targetPort and endpoint's port map are not specified, traffic
* to a service port will be forwarded to one of the endpoints on
* the same port.
* **NOTE 1:** Do not use for `unix://` addresses.
* **NOTE 2:** endpoint port map takes precedence over targetPort.
*
* Set of ports associated with the endpoint. If the port map is
* specified, it must be a map of servicePortName to this endpoint's
* port, such that traffic to the service port will be forwarded to
* the endpoint port that maps to the service's portName. If
* omitted, and the targetPort is specified as part of the service's
* port specification, traffic to the service port will be forwarded
* to one of the endpoints on the specified `targetPort`. If both
* the targetPort and endpoint's port map are not specified, traffic
* to a service port will be forwarded to one of the endpoints on
* the same port.
* **NOTE 1:** Do not use for `unix://` addresses.
* **NOTE 2:** endpoint port map takes precedence over targetPort.
*
* Set of ports associated with the endpoint. If the port map is
* specified, it must be a map of servicePortName to this endpoint's
* port, such that traffic to the service port will be forwarded to
* the endpoint port that maps to the service's portName. If
* omitted, and the targetPort is specified as part of the service's
* port specification, traffic to the service port will be forwarded
* to one of the endpoints on the specified `targetPort`. If both
* the targetPort and endpoint's port map are not specified, traffic
* to a service port will be forwarded to one of the endpoints on
* the same port.
* **NOTE 1:** Do not use for `unix://` addresses.
* **NOTE 2:** endpoint port map takes precedence over targetPort.
*
*
* map<string, uint32> ports = 2;
*/
int getPortsOrDefault(
java.lang.String key,
int defaultValue);
/**
*
* Set of ports associated with the endpoint. If the port map is
* specified, it must be a map of servicePortName to this endpoint's
* port, such that traffic to the service port will be forwarded to
* the endpoint port that maps to the service's portName. If
* omitted, and the targetPort is specified as part of the service's
* port specification, traffic to the service port will be forwarded
* to one of the endpoints on the specified `targetPort`. If both
* the targetPort and endpoint's port map are not specified, traffic
* to a service port will be forwarded to one of the endpoints on
* the same port.
* **NOTE 1:** Do not use for `unix://` addresses.
* **NOTE 2:** endpoint port map takes precedence over targetPort.
*
* 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();
/**
*
* The service account associated with the workload if a sidecar
* is present in the workload. The service account must be present
* in the same namespace as the configuration ( WorkloadEntry or a
* ServiceEntry)
*
* The service account associated with the workload if a sidecar
* is present in the workload. The service account must be present
* in the same namespace as the configuration ( WorkloadEntry or a
* ServiceEntry)
*
*
* string service_account = 7;
* @return The bytes for serviceAccount.
*/
com.google.protobuf.ByteString
getServiceAccountBytes();
}
/**
*
* WorkloadEntry enables specifying the properties of a single non-Kubernetes workload such a VM or a bare metal services that can be referred to by service entries.
* <!-- crd generation tags
* +cue-gen:WorkloadEntry:groupName:networking.istio.io
* +cue-gen:WorkloadEntry:version:v1alpha3
* +cue-gen:WorkloadEntry:storageVersion
* +cue-gen:WorkloadEntry:annotations:helm.sh/resource-policy=keep
* +cue-gen:WorkloadEntry:labels:app=istio-pilot,chart=istio,heritage=Tiller,release=istio
* +cue-gen:WorkloadEntry:subresource:status
* +cue-gen:WorkloadEntry:scope:Namespaced
* +cue-gen:WorkloadEntry:resource:categories=istio-io,networking-istio-io,shortNames=we,plural=workloadentries
* +cue-gen:WorkloadEntry:printerColumn:name=Age,type=date,JSONPath=.metadata.creationTimestamp,description="CreationTimestamp is a timestamp
* representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations.
* Clients may not set this value. It is represented in RFC3339 form and is in UTC.
* Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata"
* +cue-gen:WorkloadEntry:printerColumn:name=Address,type=string,JSONPath=.spec.address,description="Address associated with the network endpoint."
* +cue-gen:WorkloadEntry:preserveUnknownFields:false
* -->
* <!-- go code generation tags
* +kubetype-gen
* +kubetype-gen:groupVersion=networking.istio.io/v1alpha3
* +genclient
* +k8s:deepcopy-gen=true
* -->
*
*
* Protobuf type {@code istio.networking.v1alpha3.WorkloadEntry}
*/
public static final class WorkloadEntry extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:istio.networking.v1alpha3.WorkloadEntry)
WorkloadEntryOrBuilder {
private static final long serialVersionUID = 0L;
// Use WorkloadEntry.newBuilder() to construct.
private WorkloadEntry(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private WorkloadEntry() {
address_ = "";
network_ = "";
locality_ = "";
serviceAccount_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new WorkloadEntry();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private WorkloadEntry(
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;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
serviceAccount_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return istio.networking.v1alpha3.WorkloadEntryOuterClass.internal_static_istio_networking_v1alpha3_WorkloadEntry_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 istio.networking.v1alpha3.WorkloadEntryOuterClass.internal_static_istio_networking_v1alpha3_WorkloadEntry_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.WorkloadEntryOuterClass.WorkloadEntry.class, istio.networking.v1alpha3.WorkloadEntryOuterClass.WorkloadEntry.Builder.class);
}
public static final int ADDRESS_FIELD_NUMBER = 1;
private volatile java.lang.Object address_;
/**
*
* 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.
*
* 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 [(.google.api.field_behavior) = REQUIRED];
* @return The bytes for address.
*/
@java.lang.Override
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(
istio.networking.v1alpha3.WorkloadEntryOuterClass.internal_static_istio_networking_v1alpha3_WorkloadEntry_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. If the port map is
* specified, it must be a map of servicePortName to this endpoint's
* port, such that traffic to the service port will be forwarded to
* the endpoint port that maps to the service's portName. If
* omitted, and the targetPort is specified as part of the service's
* port specification, traffic to the service port will be forwarded
* to one of the endpoints on the specified `targetPort`. If both
* the targetPort and endpoint's port map are not specified, traffic
* to a service port will be forwarded to one of the endpoints on
* the same port.
* **NOTE 1:** Do not use for `unix://` addresses.
* **NOTE 2:** endpoint port map takes precedence over targetPort.
*
*
* map<string, uint32> ports = 2;
*/
@java.lang.Override
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.Override
@java.lang.Deprecated
public java.util.Map getPorts() {
return getPortsMap();
}
/**
*
* Set of ports associated with the endpoint. If the port map is
* specified, it must be a map of servicePortName to this endpoint's
* port, such that traffic to the service port will be forwarded to
* the endpoint port that maps to the service's portName. If
* omitted, and the targetPort is specified as part of the service's
* port specification, traffic to the service port will be forwarded
* to one of the endpoints on the specified `targetPort`. If both
* the targetPort and endpoint's port map are not specified, traffic
* to a service port will be forwarded to one of the endpoints on
* the same port.
* **NOTE 1:** Do not use for `unix://` addresses.
* **NOTE 2:** endpoint port map takes precedence over targetPort.
*
* Set of ports associated with the endpoint. If the port map is
* specified, it must be a map of servicePortName to this endpoint's
* port, such that traffic to the service port will be forwarded to
* the endpoint port that maps to the service's portName. If
* omitted, and the targetPort is specified as part of the service's
* port specification, traffic to the service port will be forwarded
* to one of the endpoints on the specified `targetPort`. If both
* the targetPort and endpoint's port map are not specified, traffic
* to a service port will be forwarded to one of the endpoints on
* the same port.
* **NOTE 1:** Do not use for `unix://` addresses.
* **NOTE 2:** endpoint port map takes precedence over targetPort.
*
*
* map<string, uint32> ports = 2;
*/
@java.lang.Override
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. If the port map is
* specified, it must be a map of servicePortName to this endpoint's
* port, such that traffic to the service port will be forwarded to
* the endpoint port that maps to the service's portName. If
* omitted, and the targetPort is specified as part of the service's
* port specification, traffic to the service port will be forwarded
* to one of the endpoints on the specified `targetPort`. If both
* the targetPort and endpoint's port map are not specified, traffic
* to a service port will be forwarded to one of the endpoints on
* the same port.
* **NOTE 1:** Do not use for `unix://` addresses.
* **NOTE 2:** endpoint port map takes precedence over targetPort.
*
*
* map<string, uint32> ports = 2;
*/
@java.lang.Override
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(
istio.networking.v1alpha3.WorkloadEntryOuterClass.internal_static_istio_networking_v1alpha3_WorkloadEntry_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;
*/
@java.lang.Override
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.Override
@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;
*/
@java.lang.Override
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.
*/
@java.lang.Override
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.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getLocalityBytes() {
java.lang.Object ref = locality_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
locality_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int WEIGHT_FIELD_NUMBER = 6;
private int weight_;
/**
*
* The load balancing weight associated with the endpoint. Endpoints
* with higher weights will receive proportionally higher traffic.
*
*
* uint32 weight = 6;
* @return The weight.
*/
@java.lang.Override
public int getWeight() {
return weight_;
}
public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 7;
private volatile java.lang.Object serviceAccount_;
/**
*
* The service account associated with the workload if a sidecar
* is present in the workload. The service account must be present
* in the same namespace as the configuration ( WorkloadEntry or a
* ServiceEntry)
*
* The service account associated with the workload if a sidecar
* is present in the workload. The service account must be present
* in the same namespace as the configuration ( WorkloadEntry or a
* ServiceEntry)
*
* WorkloadEntry enables specifying the properties of a single non-Kubernetes workload such a VM or a bare metal services that can be referred to by service entries.
* <!-- crd generation tags
* +cue-gen:WorkloadEntry:groupName:networking.istio.io
* +cue-gen:WorkloadEntry:version:v1alpha3
* +cue-gen:WorkloadEntry:storageVersion
* +cue-gen:WorkloadEntry:annotations:helm.sh/resource-policy=keep
* +cue-gen:WorkloadEntry:labels:app=istio-pilot,chart=istio,heritage=Tiller,release=istio
* +cue-gen:WorkloadEntry:subresource:status
* +cue-gen:WorkloadEntry:scope:Namespaced
* +cue-gen:WorkloadEntry:resource:categories=istio-io,networking-istio-io,shortNames=we,plural=workloadentries
* +cue-gen:WorkloadEntry:printerColumn:name=Age,type=date,JSONPath=.metadata.creationTimestamp,description="CreationTimestamp is a timestamp
* representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations.
* Clients may not set this value. It is represented in RFC3339 form and is in UTC.
* Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata"
* +cue-gen:WorkloadEntry:printerColumn:name=Address,type=string,JSONPath=.spec.address,description="Address associated with the network endpoint."
* +cue-gen:WorkloadEntry:preserveUnknownFields:false
* -->
* <!-- go code generation tags
* +kubetype-gen
* +kubetype-gen:groupVersion=networking.istio.io/v1alpha3
* +genclient
* +k8s:deepcopy-gen=true
* -->
*
*
* Protobuf type {@code istio.networking.v1alpha3.WorkloadEntry}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:istio.networking.v1alpha3.WorkloadEntry)
istio.networking.v1alpha3.WorkloadEntryOuterClass.WorkloadEntryOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return istio.networking.v1alpha3.WorkloadEntryOuterClass.internal_static_istio_networking_v1alpha3_WorkloadEntry_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 istio.networking.v1alpha3.WorkloadEntryOuterClass.internal_static_istio_networking_v1alpha3_WorkloadEntry_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.WorkloadEntryOuterClass.WorkloadEntry.class, istio.networking.v1alpha3.WorkloadEntryOuterClass.WorkloadEntry.Builder.class);
}
// Construct using istio.networking.v1alpha3.WorkloadEntryOuterClass.WorkloadEntry.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;
serviceAccount_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return istio.networking.v1alpha3.WorkloadEntryOuterClass.internal_static_istio_networking_v1alpha3_WorkloadEntry_descriptor;
}
@java.lang.Override
public istio.networking.v1alpha3.WorkloadEntryOuterClass.WorkloadEntry getDefaultInstanceForType() {
return istio.networking.v1alpha3.WorkloadEntryOuterClass.WorkloadEntry.getDefaultInstance();
}
@java.lang.Override
public istio.networking.v1alpha3.WorkloadEntryOuterClass.WorkloadEntry build() {
istio.networking.v1alpha3.WorkloadEntryOuterClass.WorkloadEntry result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public istio.networking.v1alpha3.WorkloadEntryOuterClass.WorkloadEntry buildPartial() {
istio.networking.v1alpha3.WorkloadEntryOuterClass.WorkloadEntry result = new istio.networking.v1alpha3.WorkloadEntryOuterClass.WorkloadEntry(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_;
result.serviceAccount_ = serviceAccount_;
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 istio.networking.v1alpha3.WorkloadEntryOuterClass.WorkloadEntry) {
return mergeFrom((istio.networking.v1alpha3.WorkloadEntryOuterClass.WorkloadEntry)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(istio.networking.v1alpha3.WorkloadEntryOuterClass.WorkloadEntry other) {
if (other == istio.networking.v1alpha3.WorkloadEntryOuterClass.WorkloadEntry.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());
}
if (!other.getServiceAccount().isEmpty()) {
serviceAccount_ = other.serviceAccount_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
istio.networking.v1alpha3.WorkloadEntryOuterClass.WorkloadEntry parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (istio.networking.v1alpha3.WorkloadEntryOuterClass.WorkloadEntry) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object address_ = "";
/**
*
* 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.
*
* 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 [(.google.api.field_behavior) = REQUIRED];
* @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;
}
}
/**
*
* 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 [(.google.api.field_behavior) = REQUIRED];
* @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;
}
/**
*
* 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 [(.google.api.field_behavior) = REQUIRED];
* @return This builder for chaining.
*/
public Builder clearAddress() {
address_ = getDefaultInstance().getAddress();
onChanged();
return this;
}
/**
*
* 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 [(.google.api.field_behavior) = REQUIRED];
* @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. If the port map is
* specified, it must be a map of servicePortName to this endpoint's
* port, such that traffic to the service port will be forwarded to
* the endpoint port that maps to the service's portName. If
* omitted, and the targetPort is specified as part of the service's
* port specification, traffic to the service port will be forwarded
* to one of the endpoints on the specified `targetPort`. If both
* the targetPort and endpoint's port map are not specified, traffic
* to a service port will be forwarded to one of the endpoints on
* the same port.
* **NOTE 1:** Do not use for `unix://` addresses.
* **NOTE 2:** endpoint port map takes precedence over targetPort.
*
*
* map<string, uint32> ports = 2;
*/
@java.lang.Override
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.Override
@java.lang.Deprecated
public java.util.Map getPorts() {
return getPortsMap();
}
/**
*
* Set of ports associated with the endpoint. If the port map is
* specified, it must be a map of servicePortName to this endpoint's
* port, such that traffic to the service port will be forwarded to
* the endpoint port that maps to the service's portName. If
* omitted, and the targetPort is specified as part of the service's
* port specification, traffic to the service port will be forwarded
* to one of the endpoints on the specified `targetPort`. If both
* the targetPort and endpoint's port map are not specified, traffic
* to a service port will be forwarded to one of the endpoints on
* the same port.
* **NOTE 1:** Do not use for `unix://` addresses.
* **NOTE 2:** endpoint port map takes precedence over targetPort.
*
* Set of ports associated with the endpoint. If the port map is
* specified, it must be a map of servicePortName to this endpoint's
* port, such that traffic to the service port will be forwarded to
* the endpoint port that maps to the service's portName. If
* omitted, and the targetPort is specified as part of the service's
* port specification, traffic to the service port will be forwarded
* to one of the endpoints on the specified `targetPort`. If both
* the targetPort and endpoint's port map are not specified, traffic
* to a service port will be forwarded to one of the endpoints on
* the same port.
* **NOTE 1:** Do not use for `unix://` addresses.
* **NOTE 2:** endpoint port map takes precedence over targetPort.
*
*
* map<string, uint32> ports = 2;
*/
@java.lang.Override
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. If the port map is
* specified, it must be a map of servicePortName to this endpoint's
* port, such that traffic to the service port will be forwarded to
* the endpoint port that maps to the service's portName. If
* omitted, and the targetPort is specified as part of the service's
* port specification, traffic to the service port will be forwarded
* to one of the endpoints on the specified `targetPort`. If both
* the targetPort and endpoint's port map are not specified, traffic
* to a service port will be forwarded to one of the endpoints on
* the same port.
* **NOTE 1:** Do not use for `unix://` addresses.
* **NOTE 2:** endpoint port map takes precedence over targetPort.
*
*
* map<string, uint32> ports = 2;
*/
@java.lang.Override
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. If the port map is
* specified, it must be a map of servicePortName to this endpoint's
* port, such that traffic to the service port will be forwarded to
* the endpoint port that maps to the service's portName. If
* omitted, and the targetPort is specified as part of the service's
* port specification, traffic to the service port will be forwarded
* to one of the endpoints on the specified `targetPort`. If both
* the targetPort and endpoint's port map are not specified, traffic
* to a service port will be forwarded to one of the endpoints on
* the same port.
* **NOTE 1:** Do not use for `unix://` addresses.
* **NOTE 2:** endpoint port map takes precedence over targetPort.
*
*
* 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. If the port map is
* specified, it must be a map of servicePortName to this endpoint's
* port, such that traffic to the service port will be forwarded to
* the endpoint port that maps to the service's portName. If
* omitted, and the targetPort is specified as part of the service's
* port specification, traffic to the service port will be forwarded
* to one of the endpoints on the specified `targetPort`. If both
* the targetPort and endpoint's port map are not specified, traffic
* to a service port will be forwarded to one of the endpoints on
* the same port.
* **NOTE 1:** Do not use for `unix://` addresses.
* **NOTE 2:** endpoint port map takes precedence over targetPort.
*
*
* 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. If the port map is
* specified, it must be a map of servicePortName to this endpoint's
* port, such that traffic to the service port will be forwarded to
* the endpoint port that maps to the service's portName. If
* omitted, and the targetPort is specified as part of the service's
* port specification, traffic to the service port will be forwarded
* to one of the endpoints on the specified `targetPort`. If both
* the targetPort and endpoint's port map are not specified, traffic
* to a service port will be forwarded to one of the endpoints on
* the same port.
* **NOTE 1:** Do not use for `unix://` addresses.
* **NOTE 2:** endpoint port map takes precedence over targetPort.
*
* 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.
*/
@java.lang.Override
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.
*
* The service account associated with the workload if a sidecar
* is present in the workload. The service account must be present
* in the same namespace as the configuration ( WorkloadEntry or a
* ServiceEntry)
*
* The service account associated with the workload if a sidecar
* is present in the workload. The service account must be present
* in the same namespace as the configuration ( WorkloadEntry or a
* ServiceEntry)
*
*
* string service_account = 7;
* @return The bytes for serviceAccount.
*/
public com.google.protobuf.ByteString
getServiceAccountBytes() {
java.lang.Object ref = serviceAccount_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
serviceAccount_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The service account associated with the workload if a sidecar
* is present in the workload. The service account must be present
* in the same namespace as the configuration ( WorkloadEntry or a
* ServiceEntry)
*
*
* string service_account = 7;
* @param value The serviceAccount to set.
* @return This builder for chaining.
*/
public Builder setServiceAccount(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
serviceAccount_ = value;
onChanged();
return this;
}
/**
*
* The service account associated with the workload if a sidecar
* is present in the workload. The service account must be present
* in the same namespace as the configuration ( WorkloadEntry or a
* ServiceEntry)
*
*
* string service_account = 7;
* @return This builder for chaining.
*/
public Builder clearServiceAccount() {
serviceAccount_ = getDefaultInstance().getServiceAccount();
onChanged();
return this;
}
/**
*
* The service account associated with the workload if a sidecar
* is present in the workload. The service account must be present
* in the same namespace as the configuration ( WorkloadEntry or a
* ServiceEntry)
*
*
* string service_account = 7;
* @param value The bytes for serviceAccount to set.
* @return This builder for chaining.
*/
public Builder setServiceAccountBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
serviceAccount_ = 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.WorkloadEntry)
}
// @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.WorkloadEntry)
private static final istio.networking.v1alpha3.WorkloadEntryOuterClass.WorkloadEntry DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new istio.networking.v1alpha3.WorkloadEntryOuterClass.WorkloadEntry();
}
public static istio.networking.v1alpha3.WorkloadEntryOuterClass.WorkloadEntry getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public WorkloadEntry parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new WorkloadEntry(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 istio.networking.v1alpha3.WorkloadEntryOuterClass.WorkloadEntry getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_istio_networking_v1alpha3_WorkloadEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_istio_networking_v1alpha3_WorkloadEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_istio_networking_v1alpha3_WorkloadEntry_PortsEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_istio_networking_v1alpha3_WorkloadEntry_PortsEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_istio_networking_v1alpha3_WorkloadEntry_LabelsEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_istio_networking_v1alpha3_WorkloadEntry_LabelsEntry_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n(networking/v1alpha3/workload_entry.pro" +
"to\022\031istio.networking.v1alpha3\032\037google/ap" +
"i/field_behavior.proto\"\330\002\n\rWorkloadEntry" +
"\022\024\n\007address\030\001 \001(\tB\003\340A\002\022B\n\005ports\030\002 \003(\01323." +
"istio.networking.v1alpha3.WorkloadEntry." +
"PortsEntry\022D\n\006labels\030\003 \003(\01324.istio.netwo" +
"rking.v1alpha3.WorkloadEntry.LabelsEntry" +
"\022\017\n\007network\030\004 \001(\t\022\020\n\010locality\030\005 \001(\t\022\016\n\006w" +
"eight\030\006 \001(\r\022\027\n\017service_account\030\007 \001(\t\032,\n\n" +
"PortsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\r:\002" +
"8\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" +
"\002 \001(\t:\0028\001B\"Z istio.io/api/networking/v1a" +
"lpha3b\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.api.FieldBehaviorProto.getDescriptor(),
});
internal_static_istio_networking_v1alpha3_WorkloadEntry_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_istio_networking_v1alpha3_WorkloadEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_istio_networking_v1alpha3_WorkloadEntry_descriptor,
new java.lang.String[] { "Address", "Ports", "Labels", "Network", "Locality", "Weight", "ServiceAccount", });
internal_static_istio_networking_v1alpha3_WorkloadEntry_PortsEntry_descriptor =
internal_static_istio_networking_v1alpha3_WorkloadEntry_descriptor.getNestedTypes().get(0);
internal_static_istio_networking_v1alpha3_WorkloadEntry_PortsEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_istio_networking_v1alpha3_WorkloadEntry_PortsEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_istio_networking_v1alpha3_WorkloadEntry_LabelsEntry_descriptor =
internal_static_istio_networking_v1alpha3_WorkloadEntry_descriptor.getNestedTypes().get(1);
internal_static_istio_networking_v1alpha3_WorkloadEntry_LabelsEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_istio_networking_v1alpha3_WorkloadEntry_LabelsEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
com.google.protobuf.ExtensionRegistry registry =
com.google.protobuf.ExtensionRegistry.newInstance();
registry.add(com.google.api.FieldBehaviorProto.fieldBehavior);
com.google.protobuf.Descriptors.FileDescriptor
.internalUpdateFileDescriptor(descriptor, registry);
com.google.api.FieldBehaviorProto.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}