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/destination_rule.proto
package istio.networking.v1alpha3;
public final class DestinationRuleOuterClass {
private DestinationRuleOuterClass() {}
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 DestinationRuleOrBuilder extends
// @@protoc_insertion_point(interface_extends:istio.networking.v1alpha3.DestinationRule)
com.google.protobuf.MessageOrBuilder {
/**
*
* The name of a service from the service registry. Service
* names are looked up from the platform's service registry (e.g.,
* Kubernetes services, Consul services, etc.) and from the hosts
* declared by [ServiceEntries](https://istio.io/docs/reference/config/networking/service-entry/#ServiceEntry). Rules defined for
* services that do not exist in the service registry will be ignored.
* *Note for Kubernetes users*: When short names are used (e.g. "reviews"
* instead of "reviews.default.svc.cluster.local"), Istio will interpret
* the short name based on the namespace of the rule, not the service. A
* rule in the "default" namespace containing a host "reviews" will be
* interpreted as "reviews.default.svc.cluster.local", irrespective of
* the actual namespace associated with the reviews service. _To avoid
* potential misconfigurations, it is recommended to always use fully
* qualified domain names over short names._
* Note that the host field applies to both HTTP and TCP services.
*
* The name of a service from the service registry. Service
* names are looked up from the platform's service registry (e.g.,
* Kubernetes services, Consul services, etc.) and from the hosts
* declared by [ServiceEntries](https://istio.io/docs/reference/config/networking/service-entry/#ServiceEntry). Rules defined for
* services that do not exist in the service registry will be ignored.
* *Note for Kubernetes users*: When short names are used (e.g. "reviews"
* instead of "reviews.default.svc.cluster.local"), Istio will interpret
* the short name based on the namespace of the rule, not the service. A
* rule in the "default" namespace containing a host "reviews" will be
* interpreted as "reviews.default.svc.cluster.local", irrespective of
* the actual namespace associated with the reviews service. _To avoid
* potential misconfigurations, it is recommended to always use fully
* qualified domain names over short names._
* Note that the host field applies to both HTTP and TCP services.
*
* A list of namespaces to which this destination rule is exported.
* The resolution of a destination rule to apply to a service occurs in the
* context of a hierarchy of namespaces. Exporting a destination rule allows
* it to be included in the resolution hierarchy for services in
* other namespaces. This feature provides a mechanism for service owners
* and mesh administrators to control the visibility of destination rules
* across namespace boundaries.
* If no namespaces are specified then the destination rule is exported to all
* namespaces by default.
* The value "." is reserved and defines an export to the same namespace that
* the destination rule is declared in. Similarly, the value "*" is reserved and
* defines an export to all namespaces.
* 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 destination rule is exported.
* The resolution of a destination rule to apply to a service occurs in the
* context of a hierarchy of namespaces. Exporting a destination rule allows
* it to be included in the resolution hierarchy for services in
* other namespaces. This feature provides a mechanism for service owners
* and mesh administrators to control the visibility of destination rules
* across namespace boundaries.
* If no namespaces are specified then the destination rule is exported to all
* namespaces by default.
* The value "." is reserved and defines an export to the same namespace that
* the destination rule is declared in. Similarly, the value "*" is reserved and
* defines an export to all namespaces.
* 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 destination rule is exported.
* The resolution of a destination rule to apply to a service occurs in the
* context of a hierarchy of namespaces. Exporting a destination rule allows
* it to be included in the resolution hierarchy for services in
* other namespaces. This feature provides a mechanism for service owners
* and mesh administrators to control the visibility of destination rules
* across namespace boundaries.
* If no namespaces are specified then the destination rule is exported to all
* namespaces by default.
* The value "." is reserved and defines an export to the same namespace that
* the destination rule is declared in. Similarly, the value "*" is reserved and
* defines an export to all namespaces.
* 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 destination rule is exported.
* The resolution of a destination rule to apply to a service occurs in the
* context of a hierarchy of namespaces. Exporting a destination rule allows
* it to be included in the resolution hierarchy for services in
* other namespaces. This feature provides a mechanism for service owners
* and mesh administrators to control the visibility of destination rules
* across namespace boundaries.
* If no namespaces are specified then the destination rule is exported to all
* namespaces by default.
* The value "." is reserved and defines an export to the same namespace that
* the destination rule is declared in. Similarly, the value "*" is reserved and
* defines an export to all namespaces.
* NOTE: in the current release, the `exportTo` value is restricted to
* "." or "*" (i.e., the current namespace or all namespaces).
*
* DestinationRule defines policies that apply to traffic intended for a service
* after routing has occurred.
* <!-- crd generation tags
* +cue-gen:DestinationRule:groupName:networking.istio.io
* +cue-gen:DestinationRule:version:v1alpha3
* +cue-gen:DestinationRule:storageVersion
* +cue-gen:DestinationRule:annotations:helm.sh/resource-policy=keep
* +cue-gen:DestinationRule:labels:app=istio-pilot,chart=istio,heritage=Tiller,release=istio
* +cue-gen:DestinationRule:subresource:status
* +cue-gen:DestinationRule:scope:Namespaced
* +cue-gen:DestinationRule:resource:categories=istio-io,networking-istio-io,shortNames=dr
* +cue-gen:DestinationRule:printerColumn:name=Host,type=string,JSONPath=.spec.host,description="The name of a service from the service registry"
* +cue-gen:DestinationRule: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:DestinationRule: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.DestinationRule}
*/
public static final class DestinationRule extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:istio.networking.v1alpha3.DestinationRule)
DestinationRuleOrBuilder {
private static final long serialVersionUID = 0L;
// Use DestinationRule.newBuilder() to construct.
private DestinationRule(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DestinationRule() {
host_ = "";
subsets_ = java.util.Collections.emptyList();
exportTo_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DestinationRule();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DestinationRule(
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();
host_ = s;
break;
}
case 18: {
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.Builder subBuilder = null;
if (trafficPolicy_ != null) {
subBuilder = trafficPolicy_.toBuilder();
}
trafficPolicy_ = input.readMessage(istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(trafficPolicy_);
trafficPolicy_ = subBuilder.buildPartial();
}
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
subsets_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
subsets_.add(
input.readMessage(istio.networking.v1alpha3.DestinationRuleOuterClass.Subset.parser(), extensionRegistry));
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
exportTo_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
exportTo_.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)) {
subsets_ = java.util.Collections.unmodifiableList(subsets_);
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
exportTo_ = exportTo_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_DestinationRule_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_DestinationRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule.class, istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule.Builder.class);
}
public static final int HOST_FIELD_NUMBER = 1;
private volatile java.lang.Object host_;
/**
*
* The name of a service from the service registry. Service
* names are looked up from the platform's service registry (e.g.,
* Kubernetes services, Consul services, etc.) and from the hosts
* declared by [ServiceEntries](https://istio.io/docs/reference/config/networking/service-entry/#ServiceEntry). Rules defined for
* services that do not exist in the service registry will be ignored.
* *Note for Kubernetes users*: When short names are used (e.g. "reviews"
* instead of "reviews.default.svc.cluster.local"), Istio will interpret
* the short name based on the namespace of the rule, not the service. A
* rule in the "default" namespace containing a host "reviews" will be
* interpreted as "reviews.default.svc.cluster.local", irrespective of
* the actual namespace associated with the reviews service. _To avoid
* potential misconfigurations, it is recommended to always use fully
* qualified domain names over short names._
* Note that the host field applies to both HTTP and TCP services.
*
* The name of a service from the service registry. Service
* names are looked up from the platform's service registry (e.g.,
* Kubernetes services, Consul services, etc.) and from the hosts
* declared by [ServiceEntries](https://istio.io/docs/reference/config/networking/service-entry/#ServiceEntry). Rules defined for
* services that do not exist in the service registry will be ignored.
* *Note for Kubernetes users*: When short names are used (e.g. "reviews"
* instead of "reviews.default.svc.cluster.local"), Istio will interpret
* the short name based on the namespace of the rule, not the service. A
* rule in the "default" namespace containing a host "reviews" will be
* interpreted as "reviews.default.svc.cluster.local", irrespective of
* the actual namespace associated with the reviews service. _To avoid
* potential misconfigurations, it is recommended to always use fully
* qualified domain names over short names._
* Note that the host field applies to both HTTP and TCP services.
*
*
* string host = 1 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.protobuf.ByteString
getHostBytes() {
java.lang.Object ref = host_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
host_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TRAFFIC_POLICY_FIELD_NUMBER = 2;
private istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy trafficPolicy_;
/**
*
* Traffic policies to apply (load balancing policy, connection pool
* sizes, outlier detection).
*
* One or more named sets that represent individual versions of a
* service. Traffic policies can be overridden at subset level.
*
*
* repeated .istio.networking.v1alpha3.Subset subsets = 3;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.SubsetOrBuilder getSubsetsOrBuilder(
int index) {
return subsets_.get(index);
}
public static final int EXPORT_TO_FIELD_NUMBER = 4;
private com.google.protobuf.LazyStringList exportTo_;
/**
*
* A list of namespaces to which this destination rule is exported.
* The resolution of a destination rule to apply to a service occurs in the
* context of a hierarchy of namespaces. Exporting a destination rule allows
* it to be included in the resolution hierarchy for services in
* other namespaces. This feature provides a mechanism for service owners
* and mesh administrators to control the visibility of destination rules
* across namespace boundaries.
* If no namespaces are specified then the destination rule is exported to all
* namespaces by default.
* The value "." is reserved and defines an export to the same namespace that
* the destination rule is declared in. Similarly, the value "*" is reserved and
* defines an export to all namespaces.
* 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 destination rule is exported.
* The resolution of a destination rule to apply to a service occurs in the
* context of a hierarchy of namespaces. Exporting a destination rule allows
* it to be included in the resolution hierarchy for services in
* other namespaces. This feature provides a mechanism for service owners
* and mesh administrators to control the visibility of destination rules
* across namespace boundaries.
* If no namespaces are specified then the destination rule is exported to all
* namespaces by default.
* The value "." is reserved and defines an export to the same namespace that
* the destination rule is declared in. Similarly, the value "*" is reserved and
* defines an export to all namespaces.
* NOTE: in the current release, the `exportTo` value is restricted to
* "." or "*" (i.e., the current namespace or all namespaces).
*
*
* repeated string export_to = 4;
*/
public int getExportToCount() {
return exportTo_.size();
}
/**
*
* A list of namespaces to which this destination rule is exported.
* The resolution of a destination rule to apply to a service occurs in the
* context of a hierarchy of namespaces. Exporting a destination rule allows
* it to be included in the resolution hierarchy for services in
* other namespaces. This feature provides a mechanism for service owners
* and mesh administrators to control the visibility of destination rules
* across namespace boundaries.
* If no namespaces are specified then the destination rule is exported to all
* namespaces by default.
* The value "." is reserved and defines an export to the same namespace that
* the destination rule is declared in. Similarly, the value "*" is reserved and
* defines an export to all namespaces.
* 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 destination rule is exported.
* The resolution of a destination rule to apply to a service occurs in the
* context of a hierarchy of namespaces. Exporting a destination rule allows
* it to be included in the resolution hierarchy for services in
* other namespaces. This feature provides a mechanism for service owners
* and mesh administrators to control the visibility of destination rules
* across namespace boundaries.
* If no namespaces are specified then the destination rule is exported to all
* namespaces by default.
* The value "." is reserved and defines an export to the same namespace that
* the destination rule is declared in. Similarly, the value "*" is reserved and
* defines an export to all namespaces.
* NOTE: in the current release, the `exportTo` value is restricted to
* "." or "*" (i.e., the current namespace or all namespaces).
*
*
* repeated string export_to = 4;
*/
public com.google.protobuf.ByteString
getExportToBytes(int index) {
return exportTo_.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 {
if (!getHostBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, host_);
}
if (trafficPolicy_ != null) {
output.writeMessage(2, getTrafficPolicy());
}
for (int i = 0; i < subsets_.size(); i++) {
output.writeMessage(3, subsets_.get(i));
}
for (int i = 0; i < exportTo_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, exportTo_.getRaw(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getHostBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, host_);
}
if (trafficPolicy_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getTrafficPolicy());
}
for (int i = 0; i < subsets_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, subsets_.get(i));
}
{
int dataSize = 0;
for (int i = 0; i < exportTo_.size(); i++) {
dataSize += computeStringSizeNoTag(exportTo_.getRaw(i));
}
size += dataSize;
size += 1 * getExportToList().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 istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule)) {
return super.equals(obj);
}
istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule other = (istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule) obj;
if (!getHost()
.equals(other.getHost())) return false;
if (hasTrafficPolicy() != other.hasTrafficPolicy()) return false;
if (hasTrafficPolicy()) {
if (!getTrafficPolicy()
.equals(other.getTrafficPolicy())) return false;
}
if (!getSubsetsList()
.equals(other.getSubsetsList())) return false;
if (!getExportToList()
.equals(other.getExportToList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + HOST_FIELD_NUMBER;
hash = (53 * hash) + getHost().hashCode();
if (hasTrafficPolicy()) {
hash = (37 * hash) + TRAFFIC_POLICY_FIELD_NUMBER;
hash = (53 * hash) + getTrafficPolicy().hashCode();
}
if (getSubsetsCount() > 0) {
hash = (37 * hash) + SUBSETS_FIELD_NUMBER;
hash = (53 * hash) + getSubsetsList().hashCode();
}
if (getExportToCount() > 0) {
hash = (37 * hash) + EXPORT_TO_FIELD_NUMBER;
hash = (53 * hash) + getExportToList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule 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 istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule 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 istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule 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(istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule 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;
}
/**
*
* DestinationRule defines policies that apply to traffic intended for a service
* after routing has occurred.
* <!-- crd generation tags
* +cue-gen:DestinationRule:groupName:networking.istio.io
* +cue-gen:DestinationRule:version:v1alpha3
* +cue-gen:DestinationRule:storageVersion
* +cue-gen:DestinationRule:annotations:helm.sh/resource-policy=keep
* +cue-gen:DestinationRule:labels:app=istio-pilot,chart=istio,heritage=Tiller,release=istio
* +cue-gen:DestinationRule:subresource:status
* +cue-gen:DestinationRule:scope:Namespaced
* +cue-gen:DestinationRule:resource:categories=istio-io,networking-istio-io,shortNames=dr
* +cue-gen:DestinationRule:printerColumn:name=Host,type=string,JSONPath=.spec.host,description="The name of a service from the service registry"
* +cue-gen:DestinationRule: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:DestinationRule:preserveUnknownFields:false
* -->
* <!-- go code generation tags
* +kubetype-gen
* +kubetype-gen:groupVersion=networking.istio.io/v1alpha3
* +genclient
* +k8s:deepcopy-gen=true
* -->
*
* The name of a service from the service registry. Service
* names are looked up from the platform's service registry (e.g.,
* Kubernetes services, Consul services, etc.) and from the hosts
* declared by [ServiceEntries](https://istio.io/docs/reference/config/networking/service-entry/#ServiceEntry). Rules defined for
* services that do not exist in the service registry will be ignored.
* *Note for Kubernetes users*: When short names are used (e.g. "reviews"
* instead of "reviews.default.svc.cluster.local"), Istio will interpret
* the short name based on the namespace of the rule, not the service. A
* rule in the "default" namespace containing a host "reviews" will be
* interpreted as "reviews.default.svc.cluster.local", irrespective of
* the actual namespace associated with the reviews service. _To avoid
* potential misconfigurations, it is recommended to always use fully
* qualified domain names over short names._
* Note that the host field applies to both HTTP and TCP services.
*
* The name of a service from the service registry. Service
* names are looked up from the platform's service registry (e.g.,
* Kubernetes services, Consul services, etc.) and from the hosts
* declared by [ServiceEntries](https://istio.io/docs/reference/config/networking/service-entry/#ServiceEntry). Rules defined for
* services that do not exist in the service registry will be ignored.
* *Note for Kubernetes users*: When short names are used (e.g. "reviews"
* instead of "reviews.default.svc.cluster.local"), Istio will interpret
* the short name based on the namespace of the rule, not the service. A
* rule in the "default" namespace containing a host "reviews" will be
* interpreted as "reviews.default.svc.cluster.local", irrespective of
* the actual namespace associated with the reviews service. _To avoid
* potential misconfigurations, it is recommended to always use fully
* qualified domain names over short names._
* Note that the host field applies to both HTTP and TCP services.
*
* The name of a service from the service registry. Service
* names are looked up from the platform's service registry (e.g.,
* Kubernetes services, Consul services, etc.) and from the hosts
* declared by [ServiceEntries](https://istio.io/docs/reference/config/networking/service-entry/#ServiceEntry). Rules defined for
* services that do not exist in the service registry will be ignored.
* *Note for Kubernetes users*: When short names are used (e.g. "reviews"
* instead of "reviews.default.svc.cluster.local"), Istio will interpret
* the short name based on the namespace of the rule, not the service. A
* rule in the "default" namespace containing a host "reviews" will be
* interpreted as "reviews.default.svc.cluster.local", irrespective of
* the actual namespace associated with the reviews service. _To avoid
* potential misconfigurations, it is recommended to always use fully
* qualified domain names over short names._
* Note that the host field applies to both HTTP and TCP services.
*
* The name of a service from the service registry. Service
* names are looked up from the platform's service registry (e.g.,
* Kubernetes services, Consul services, etc.) and from the hosts
* declared by [ServiceEntries](https://istio.io/docs/reference/config/networking/service-entry/#ServiceEntry). Rules defined for
* services that do not exist in the service registry will be ignored.
* *Note for Kubernetes users*: When short names are used (e.g. "reviews"
* instead of "reviews.default.svc.cluster.local"), Istio will interpret
* the short name based on the namespace of the rule, not the service. A
* rule in the "default" namespace containing a host "reviews" will be
* interpreted as "reviews.default.svc.cluster.local", irrespective of
* the actual namespace associated with the reviews service. _To avoid
* potential misconfigurations, it is recommended to always use fully
* qualified domain names over short names._
* Note that the host field applies to both HTTP and TCP services.
*
* The name of a service from the service registry. Service
* names are looked up from the platform's service registry (e.g.,
* Kubernetes services, Consul services, etc.) and from the hosts
* declared by [ServiceEntries](https://istio.io/docs/reference/config/networking/service-entry/#ServiceEntry). Rules defined for
* services that do not exist in the service registry will be ignored.
* *Note for Kubernetes users*: When short names are used (e.g. "reviews"
* instead of "reviews.default.svc.cluster.local"), Istio will interpret
* the short name based on the namespace of the rule, not the service. A
* rule in the "default" namespace containing a host "reviews" will be
* interpreted as "reviews.default.svc.cluster.local", irrespective of
* the actual namespace associated with the reviews service. _To avoid
* potential misconfigurations, it is recommended to always use fully
* qualified domain names over short names._
* Note that the host field applies to both HTTP and TCP services.
*
* A list of namespaces to which this destination rule is exported.
* The resolution of a destination rule to apply to a service occurs in the
* context of a hierarchy of namespaces. Exporting a destination rule allows
* it to be included in the resolution hierarchy for services in
* other namespaces. This feature provides a mechanism for service owners
* and mesh administrators to control the visibility of destination rules
* across namespace boundaries.
* If no namespaces are specified then the destination rule is exported to all
* namespaces by default.
* The value "." is reserved and defines an export to the same namespace that
* the destination rule is declared in. Similarly, the value "*" is reserved and
* defines an export to all namespaces.
* 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 destination rule is exported.
* The resolution of a destination rule to apply to a service occurs in the
* context of a hierarchy of namespaces. Exporting a destination rule allows
* it to be included in the resolution hierarchy for services in
* other namespaces. This feature provides a mechanism for service owners
* and mesh administrators to control the visibility of destination rules
* across namespace boundaries.
* If no namespaces are specified then the destination rule is exported to all
* namespaces by default.
* The value "." is reserved and defines an export to the same namespace that
* the destination rule is declared in. Similarly, the value "*" is reserved and
* defines an export to all namespaces.
* NOTE: in the current release, the `exportTo` value is restricted to
* "." or "*" (i.e., the current namespace or all namespaces).
*
*
* repeated string export_to = 4;
*/
public int getExportToCount() {
return exportTo_.size();
}
/**
*
* A list of namespaces to which this destination rule is exported.
* The resolution of a destination rule to apply to a service occurs in the
* context of a hierarchy of namespaces. Exporting a destination rule allows
* it to be included in the resolution hierarchy for services in
* other namespaces. This feature provides a mechanism for service owners
* and mesh administrators to control the visibility of destination rules
* across namespace boundaries.
* If no namespaces are specified then the destination rule is exported to all
* namespaces by default.
* The value "." is reserved and defines an export to the same namespace that
* the destination rule is declared in. Similarly, the value "*" is reserved and
* defines an export to all namespaces.
* 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 destination rule is exported.
* The resolution of a destination rule to apply to a service occurs in the
* context of a hierarchy of namespaces. Exporting a destination rule allows
* it to be included in the resolution hierarchy for services in
* other namespaces. This feature provides a mechanism for service owners
* and mesh administrators to control the visibility of destination rules
* across namespace boundaries.
* If no namespaces are specified then the destination rule is exported to all
* namespaces by default.
* The value "." is reserved and defines an export to the same namespace that
* the destination rule is declared in. Similarly, the value "*" is reserved and
* defines an export to all namespaces.
* 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 destination rule is exported.
* The resolution of a destination rule to apply to a service occurs in the
* context of a hierarchy of namespaces. Exporting a destination rule allows
* it to be included in the resolution hierarchy for services in
* other namespaces. This feature provides a mechanism for service owners
* and mesh administrators to control the visibility of destination rules
* across namespace boundaries.
* If no namespaces are specified then the destination rule is exported to all
* namespaces by default.
* The value "." is reserved and defines an export to the same namespace that
* the destination rule is declared in. Similarly, the value "*" is reserved and
* defines an export to all namespaces.
* NOTE: in the current release, the `exportTo` value is restricted to
* "." or "*" (i.e., the current namespace or all namespaces).
*
*
* repeated string export_to = 4;
*/
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 destination rule is exported.
* The resolution of a destination rule to apply to a service occurs in the
* context of a hierarchy of namespaces. Exporting a destination rule allows
* it to be included in the resolution hierarchy for services in
* other namespaces. This feature provides a mechanism for service owners
* and mesh administrators to control the visibility of destination rules
* across namespace boundaries.
* If no namespaces are specified then the destination rule is exported to all
* namespaces by default.
* The value "." is reserved and defines an export to the same namespace that
* the destination rule is declared in. Similarly, the value "*" is reserved and
* defines an export to all namespaces.
* 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 destination rule is exported.
* The resolution of a destination rule to apply to a service occurs in the
* context of a hierarchy of namespaces. Exporting a destination rule allows
* it to be included in the resolution hierarchy for services in
* other namespaces. This feature provides a mechanism for service owners
* and mesh administrators to control the visibility of destination rules
* across namespace boundaries.
* If no namespaces are specified then the destination rule is exported to all
* namespaces by default.
* The value "." is reserved and defines an export to the same namespace that
* the destination rule is declared in. Similarly, the value "*" is reserved and
* defines an export to all namespaces.
* 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 destination rule is exported.
* The resolution of a destination rule to apply to a service occurs in the
* context of a hierarchy of namespaces. Exporting a destination rule allows
* it to be included in the resolution hierarchy for services in
* other namespaces. This feature provides a mechanism for service owners
* and mesh administrators to control the visibility of destination rules
* across namespace boundaries.
* If no namespaces are specified then the destination rule is exported to all
* namespaces by default.
* The value "." is reserved and defines an export to the same namespace that
* the destination rule is declared in. Similarly, the value "*" is reserved and
* defines an export to all namespaces.
* 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 destination rule is exported.
* The resolution of a destination rule to apply to a service occurs in the
* context of a hierarchy of namespaces. Exporting a destination rule allows
* it to be included in the resolution hierarchy for services in
* other namespaces. This feature provides a mechanism for service owners
* and mesh administrators to control the visibility of destination rules
* across namespace boundaries.
* If no namespaces are specified then the destination rule is exported to all
* namespaces by default.
* The value "." is reserved and defines an export to the same namespace that
* the destination rule is declared in. Similarly, the value "*" is reserved and
* defines an export to all namespaces.
* NOTE: in the current release, the `exportTo` value is restricted to
* "." or "*" (i.e., the current namespace or all namespaces).
*
*
* repeated string export_to = 4;
*/
public Builder addExportToBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureExportToIsMutable();
exportTo_.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.DestinationRule)
}
// @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.DestinationRule)
private static final istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule();
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DestinationRule parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DestinationRule(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.DestinationRuleOuterClass.DestinationRule getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TrafficPolicyOrBuilder extends
// @@protoc_insertion_point(interface_extends:istio.networking.v1alpha3.TrafficPolicy)
com.google.protobuf.MessageOrBuilder {
/**
*
* Settings controlling the load balancer algorithms.
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 4;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettingsOrBuilder getTlsOrBuilder() {
return getTls();
}
public static final int PORT_LEVEL_SETTINGS_FIELD_NUMBER = 5;
private java.util.List portLevelSettings_;
/**
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
*
* repeated .istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy port_level_settings = 5;
*/
public int getPortLevelSettingsCount() {
return portLevelSettings_.size();
}
/**
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
*
* repeated .istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy port_level_settings = 5;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicyOrBuilder getPortLevelSettingsOrBuilder(
int index) {
return portLevelSettings_.get(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 {
if (loadBalancer_ != null) {
output.writeMessage(1, getLoadBalancer());
}
if (connectionPool_ != null) {
output.writeMessage(2, getConnectionPool());
}
if (outlierDetection_ != null) {
output.writeMessage(3, getOutlierDetection());
}
if (tls_ != null) {
output.writeMessage(4, getTls());
}
for (int i = 0; i < portLevelSettings_.size(); i++) {
output.writeMessage(5, portLevelSettings_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (loadBalancer_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getLoadBalancer());
}
if (connectionPool_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getConnectionPool());
}
if (outlierDetection_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getOutlierDetection());
}
if (tls_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getTls());
}
for (int i = 0; i < portLevelSettings_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, portLevelSettings_.get(i));
}
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 istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy)) {
return super.equals(obj);
}
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy other = (istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy) obj;
if (hasLoadBalancer() != other.hasLoadBalancer()) return false;
if (hasLoadBalancer()) {
if (!getLoadBalancer()
.equals(other.getLoadBalancer())) return false;
}
if (hasConnectionPool() != other.hasConnectionPool()) return false;
if (hasConnectionPool()) {
if (!getConnectionPool()
.equals(other.getConnectionPool())) return false;
}
if (hasOutlierDetection() != other.hasOutlierDetection()) return false;
if (hasOutlierDetection()) {
if (!getOutlierDetection()
.equals(other.getOutlierDetection())) return false;
}
if (hasTls() != other.hasTls()) return false;
if (hasTls()) {
if (!getTls()
.equals(other.getTls())) return false;
}
if (!getPortLevelSettingsList()
.equals(other.getPortLevelSettingsList())) 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 (hasLoadBalancer()) {
hash = (37 * hash) + LOAD_BALANCER_FIELD_NUMBER;
hash = (53 * hash) + getLoadBalancer().hashCode();
}
if (hasConnectionPool()) {
hash = (37 * hash) + CONNECTION_POOL_FIELD_NUMBER;
hash = (53 * hash) + getConnectionPool().hashCode();
}
if (hasOutlierDetection()) {
hash = (37 * hash) + OUTLIER_DETECTION_FIELD_NUMBER;
hash = (53 * hash) + getOutlierDetection().hashCode();
}
if (hasTls()) {
hash = (37 * hash) + TLS_FIELD_NUMBER;
hash = (53 * hash) + getTls().hashCode();
}
if (getPortLevelSettingsCount() > 0) {
hash = (37 * hash) + PORT_LEVEL_SETTINGS_FIELD_NUMBER;
hash = (53 * hash) + getPortLevelSettingsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy 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 istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy 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 istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy 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(istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy 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;
}
/**
*
* Traffic policies to apply for a specific destination, across all
* destination ports. See DestinationRule for examples.
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
*
* repeated .istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy port_level_settings = 5;
*/
public int getPortLevelSettingsCount() {
if (portLevelSettingsBuilder_ == null) {
return portLevelSettings_.size();
} else {
return portLevelSettingsBuilder_.getCount();
}
}
/**
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
*
* repeated .istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy port_level_settings = 5;
*/
public Builder setPortLevelSettings(
int index, istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy value) {
if (portLevelSettingsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePortLevelSettingsIsMutable();
portLevelSettings_.set(index, value);
onChanged();
} else {
portLevelSettingsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
*
* repeated .istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy port_level_settings = 5;
*/
public Builder addPortLevelSettings(istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy value) {
if (portLevelSettingsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePortLevelSettingsIsMutable();
portLevelSettings_.add(value);
onChanged();
} else {
portLevelSettingsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
*
* repeated .istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy port_level_settings = 5;
*/
public Builder addPortLevelSettings(
int index, istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy value) {
if (portLevelSettingsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePortLevelSettingsIsMutable();
portLevelSettings_.add(index, value);
onChanged();
} else {
portLevelSettingsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
*
* repeated .istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy port_level_settings = 5;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy.Builder getPortLevelSettingsBuilder(
int index) {
return getPortLevelSettingsFieldBuilder().getBuilder(index);
}
/**
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
*
* repeated .istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy port_level_settings = 5;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicyOrBuilder getPortLevelSettingsOrBuilder(
int index) {
if (portLevelSettingsBuilder_ == null) {
return portLevelSettings_.get(index); } else {
return portLevelSettingsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
* Traffic policies specific to individual ports. Note that port level
* settings will override the destination-level settings. Traffic
* settings specified at the destination-level will not be inherited when
* overridden by port-level settings, i.e. default values will be applied
* to fields omitted in port-level traffic policies.
*
*
* repeated .istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy port_level_settings = 5;
*/
public java.util.List
getPortLevelSettingsBuilderList() {
return getPortLevelSettingsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy, istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicyOrBuilder>
getPortLevelSettingsFieldBuilder() {
if (portLevelSettingsBuilder_ == null) {
portLevelSettingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy, istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicyOrBuilder>(
portLevelSettings_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
portLevelSettings_ = null;
}
return portLevelSettingsBuilder_;
}
@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.TrafficPolicy)
}
// @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.TrafficPolicy)
private static final istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy();
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TrafficPolicy parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new TrafficPolicy(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.DestinationRuleOuterClass.TrafficPolicy getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SubsetOrBuilder extends
// @@protoc_insertion_point(interface_extends:istio.networking.v1alpha3.Subset)
com.google.protobuf.MessageOrBuilder {
/**
*
* Name of the subset. The service name and the subset name can
* be used for traffic splitting in a route rule.
*
* Traffic policies that apply to this subset. Subsets inherit the
* traffic policies specified at the DestinationRule level. Settings
* specified at the subset level will override the corresponding settings
* specified at the DestinationRule level.
*
* Traffic policies that apply to this subset. Subsets inherit the
* traffic policies specified at the DestinationRule level. Settings
* specified at the subset level will override the corresponding settings
* specified at the DestinationRule level.
*
* Traffic policies that apply to this subset. Subsets inherit the
* traffic policies specified at the DestinationRule level. Settings
* specified at the subset level will override the corresponding settings
* specified at the DestinationRule level.
*
* A subset of endpoints of a service. Subsets can be used for scenarios
* like A/B testing, or routing to a specific version of a service. Refer
* to [VirtualService](https://istio.io/docs/reference/config/networking/virtual-service/#VirtualService) documentation for examples of using
* subsets in these scenarios. In addition, traffic policies defined at the
* service-level can be overridden at a subset-level. The following rule
* uses a round robin load balancing policy for all traffic going to a
* subset named testversion that is composed of endpoints (e.g., pods) with
* labels (version:v3).
* {{<tabset category-name="example">}}
* {{<tab name="v1alpha3" category-value="v1alpha3">}}
* ```yaml
* apiVersion: networking.istio.io/v1alpha3
* kind: DestinationRule
* metadata:
* name: bookinfo-ratings
* spec:
* host: ratings.prod.svc.cluster.local
* trafficPolicy:
* loadBalancer:
* simple: LEAST_CONN
* subsets:
* - name: testversion
* labels:
* version: v3
* trafficPolicy:
* loadBalancer:
* simple: ROUND_ROBIN
* ```
* {{</tab>}}
* {{<tab name="v1beta1" category-value="v1beta1">}}
* ```yaml
* apiVersion: networking.istio.io/v1beta1
* kind: DestinationRule
* metadata:
* name: bookinfo-ratings
* spec:
* host: ratings.prod.svc.cluster.local
* trafficPolicy:
* loadBalancer:
* simple: LEAST_CONN
* subsets:
* - name: testversion
* labels:
* version: v3
* trafficPolicy:
* loadBalancer:
* simple: ROUND_ROBIN
* ```
* {{</tab>}}
* {{</tabset>}}
* **Note:** Policies specified for subsets will not take effect until
* a route rule explicitly sends traffic to this subset.
* One or more labels are typically required to identify the subset destination,
* however, when the corresponding DestinationRule represents a host that
* supports multiple SNI hosts (e.g., an egress gateway), a subset without labels
* may be meaningful. In this case a traffic policy with [ClientTLSSettings](#ClientTLSSettings)
* can be used to identify a specific SNI host corresponding to the named subset.
*
*
* Protobuf type {@code istio.networking.v1alpha3.Subset}
*/
public static final class Subset extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:istio.networking.v1alpha3.Subset)
SubsetOrBuilder {
private static final long serialVersionUID = 0L;
// Use Subset.newBuilder() to construct.
private Subset(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Subset() {
name_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Subset();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Subset(
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();
name_ = s;
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
labels_ = com.google.protobuf.MapField.newMapField(
LabelsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
labels__ = input.readMessage(
LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
labels_.getMutableMap().put(
labels__.getKey(), labels__.getValue());
break;
}
case 26: {
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.Builder subBuilder = null;
if (trafficPolicy_ != null) {
subBuilder = trafficPolicy_.toBuilder();
}
trafficPolicy_ = input.readMessage(istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(trafficPolicy_);
trafficPolicy_ = subBuilder.buildPartial();
}
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.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_Subset_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
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.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_Subset_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.Subset.class, istio.networking.v1alpha3.DestinationRuleOuterClass.Subset.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* Name of the subset. The service name and the subset name can
* be used for traffic splitting in a route rule.
*
* Labels apply a filter over the endpoints of a service in the
* service registry. See route rules for examples of usage.
*
*
* map<string, string> labels = 2;
*/
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 TRAFFIC_POLICY_FIELD_NUMBER = 3;
private istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy trafficPolicy_;
/**
*
* Traffic policies that apply to this subset. Subsets inherit the
* traffic policies specified at the DestinationRule level. Settings
* specified at the subset level will override the corresponding settings
* specified at the DestinationRule level.
*
* Traffic policies that apply to this subset. Subsets inherit the
* traffic policies specified at the DestinationRule level. Settings
* specified at the subset level will override the corresponding settings
* specified at the DestinationRule level.
*
* Traffic policies that apply to this subset. Subsets inherit the
* traffic policies specified at the DestinationRule level. Settings
* specified at the subset level will override the corresponding settings
* specified at the DestinationRule level.
*
* A subset of endpoints of a service. Subsets can be used for scenarios
* like A/B testing, or routing to a specific version of a service. Refer
* to [VirtualService](https://istio.io/docs/reference/config/networking/virtual-service/#VirtualService) documentation for examples of using
* subsets in these scenarios. In addition, traffic policies defined at the
* service-level can be overridden at a subset-level. The following rule
* uses a round robin load balancing policy for all traffic going to a
* subset named testversion that is composed of endpoints (e.g., pods) with
* labels (version:v3).
* {{<tabset category-name="example">}}
* {{<tab name="v1alpha3" category-value="v1alpha3">}}
* ```yaml
* apiVersion: networking.istio.io/v1alpha3
* kind: DestinationRule
* metadata:
* name: bookinfo-ratings
* spec:
* host: ratings.prod.svc.cluster.local
* trafficPolicy:
* loadBalancer:
* simple: LEAST_CONN
* subsets:
* - name: testversion
* labels:
* version: v3
* trafficPolicy:
* loadBalancer:
* simple: ROUND_ROBIN
* ```
* {{</tab>}}
* {{<tab name="v1beta1" category-value="v1beta1">}}
* ```yaml
* apiVersion: networking.istio.io/v1beta1
* kind: DestinationRule
* metadata:
* name: bookinfo-ratings
* spec:
* host: ratings.prod.svc.cluster.local
* trafficPolicy:
* loadBalancer:
* simple: LEAST_CONN
* subsets:
* - name: testversion
* labels:
* version: v3
* trafficPolicy:
* loadBalancer:
* simple: ROUND_ROBIN
* ```
* {{</tab>}}
* {{</tabset>}}
* **Note:** Policies specified for subsets will not take effect until
* a route rule explicitly sends traffic to this subset.
* One or more labels are typically required to identify the subset destination,
* however, when the corresponding DestinationRule represents a host that
* supports multiple SNI hosts (e.g., an egress gateway), a subset without labels
* may be meaningful. In this case a traffic policy with [ClientTLSSettings](#ClientTLSSettings)
* can be used to identify a specific SNI host corresponding to the named subset.
*
*
* Protobuf type {@code istio.networking.v1alpha3.Subset}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:istio.networking.v1alpha3.Subset)
istio.networking.v1alpha3.DestinationRuleOuterClass.SubsetOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_Subset_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
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 internalGetMutableLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_Subset_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.Subset.class, istio.networking.v1alpha3.DestinationRuleOuterClass.Subset.Builder.class);
}
// Construct using istio.networking.v1alpha3.DestinationRuleOuterClass.Subset.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();
name_ = "";
internalGetMutableLabels().clear();
if (trafficPolicyBuilder_ == null) {
trafficPolicy_ = null;
} else {
trafficPolicy_ = null;
trafficPolicyBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_Subset_descriptor;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.Subset getDefaultInstanceForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.Subset.getDefaultInstance();
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.Subset build() {
istio.networking.v1alpha3.DestinationRuleOuterClass.Subset result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.Subset buildPartial() {
istio.networking.v1alpha3.DestinationRuleOuterClass.Subset result = new istio.networking.v1alpha3.DestinationRuleOuterClass.Subset(this);
int from_bitField0_ = bitField0_;
result.name_ = name_;
result.labels_ = internalGetLabels();
result.labels_.makeImmutable();
if (trafficPolicyBuilder_ == null) {
result.trafficPolicy_ = trafficPolicy_;
} else {
result.trafficPolicy_ = trafficPolicyBuilder_.build();
}
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.DestinationRuleOuterClass.Subset) {
return mergeFrom((istio.networking.v1alpha3.DestinationRuleOuterClass.Subset)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(istio.networking.v1alpha3.DestinationRuleOuterClass.Subset other) {
if (other == istio.networking.v1alpha3.DestinationRuleOuterClass.Subset.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
internalGetMutableLabels().mergeFrom(
other.internalGetLabels());
if (other.hasTrafficPolicy()) {
mergeTrafficPolicy(other.getTrafficPolicy());
}
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.DestinationRuleOuterClass.Subset parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (istio.networking.v1alpha3.DestinationRuleOuterClass.Subset) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
* Name of the subset. The service name and the subset name can
* be used for traffic splitting in a route rule.
*
* Traffic policies that apply to this subset. Subsets inherit the
* traffic policies specified at the DestinationRule level. Settings
* specified at the subset level will override the corresponding settings
* specified at the DestinationRule level.
*
* Traffic policies that apply to this subset. Subsets inherit the
* traffic policies specified at the DestinationRule level. Settings
* specified at the subset level will override the corresponding settings
* specified at the DestinationRule level.
*
* Traffic policies that apply to this subset. Subsets inherit the
* traffic policies specified at the DestinationRule level. Settings
* specified at the subset level will override the corresponding settings
* specified at the DestinationRule level.
*
*
* .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 3;
*/
public Builder setTrafficPolicy(istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy value) {
if (trafficPolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
trafficPolicy_ = value;
onChanged();
} else {
trafficPolicyBuilder_.setMessage(value);
}
return this;
}
/**
*
* Traffic policies that apply to this subset. Subsets inherit the
* traffic policies specified at the DestinationRule level. Settings
* specified at the subset level will override the corresponding settings
* specified at the DestinationRule level.
*
* Traffic policies that apply to this subset. Subsets inherit the
* traffic policies specified at the DestinationRule level. Settings
* specified at the subset level will override the corresponding settings
* specified at the DestinationRule level.
*
* Traffic policies that apply to this subset. Subsets inherit the
* traffic policies specified at the DestinationRule level. Settings
* specified at the subset level will override the corresponding settings
* specified at the DestinationRule level.
*
* Traffic policies that apply to this subset. Subsets inherit the
* traffic policies specified at the DestinationRule level. Settings
* specified at the subset level will override the corresponding settings
* specified at the DestinationRule level.
*
* Traffic policies that apply to this subset. Subsets inherit the
* traffic policies specified at the DestinationRule level. Settings
* specified at the subset level will override the corresponding settings
* specified at the DestinationRule level.
*
* Traffic policies that apply to this subset. Subsets inherit the
* traffic policies specified at the DestinationRule level. Settings
* specified at the subset level will override the corresponding settings
* specified at the DestinationRule level.
*
*
* .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy, istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicyOrBuilder>
getTrafficPolicyFieldBuilder() {
if (trafficPolicyBuilder_ == null) {
trafficPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy, istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicyOrBuilder>(
getTrafficPolicy(),
getParentForChildren(),
isClean());
trafficPolicy_ = null;
}
return trafficPolicyBuilder_;
}
@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.Subset)
}
// @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.Subset)
private static final istio.networking.v1alpha3.DestinationRuleOuterClass.Subset DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new istio.networking.v1alpha3.DestinationRuleOuterClass.Subset();
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.Subset getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Subset parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Subset(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.DestinationRuleOuterClass.Subset getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface LoadBalancerSettingsOrBuilder extends
// @@protoc_insertion_point(interface_extends:istio.networking.v1alpha3.LoadBalancerSettings)
com.google.protobuf.MessageOrBuilder {
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB simple = 1;
*/
int getSimpleValue();
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB simple = 1;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.SimpleLB getSimple();
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB consistent_hash = 2;
*/
boolean hasConsistentHash();
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB consistent_hash = 2;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB getConsistentHash();
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB consistent_hash = 2;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLBOrBuilder getConsistentHashOrBuilder();
/**
*
* Locality load balancer settings, this will override mesh wide settings in entirety, meaning no merging would be performed
* between this object and the object one in MeshConfig
*
* Locality load balancer settings, this will override mesh wide settings in entirety, meaning no merging would be performed
* between this object and the object one in MeshConfig
*
* Locality load balancer settings, this will override mesh wide settings in entirety, meaning no merging would be performed
* between this object and the object one in MeshConfig
*
* The least request load balancer uses an O(1) algorithm which selects
* two random healthy hosts and picks the host which has fewer active
* requests.
*
*
* LEAST_CONN = 1;
*/
LEAST_CONN(1),
/**
*
* The random load balancer selects a random healthy host. The random
* load balancer generally performs better than round robin if no health
* checking policy is configured.
*
*
* RANDOM = 2;
*/
RANDOM(2),
/**
*
* This option will forward the connection to the original IP address
* requested by the caller without doing any form of load
* balancing. This option must be used with care. It is meant for
* advanced use cases. Refer to Original Destination load balancer in
* Envoy for further details.
*
*
* ROUND_ROBIN = 0;
*/
public static final int ROUND_ROBIN_VALUE = 0;
/**
*
* The least request load balancer uses an O(1) algorithm which selects
* two random healthy hosts and picks the host which has fewer active
* requests.
*
*
* LEAST_CONN = 1;
*/
public static final int LEAST_CONN_VALUE = 1;
/**
*
* The random load balancer selects a random healthy host. The random
* load balancer generally performs better than round robin if no health
* checking policy is configured.
*
*
* RANDOM = 2;
*/
public static final int RANDOM_VALUE = 2;
/**
*
* This option will forward the connection to the original IP address
* requested by the caller without doing any form of load
* balancing. This option must be used with care. It is meant for
* advanced use cases. Refer to Original Destination load balancer in
* Envoy for further details.
*
*
* PASSTHROUGH = 3;
*/
public static final int PASSTHROUGH_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static SimpleLB valueOf(int value) {
return forNumber(value);
}
public static SimpleLB forNumber(int value) {
switch (value) {
case 0: return ROUND_ROBIN;
case 1: return LEAST_CONN;
case 2: return RANDOM;
case 3: return PASSTHROUGH;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
SimpleLB> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public SimpleLB findValueByNumber(int number) {
return SimpleLB.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 istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.getDescriptor().getEnumTypes().get(0);
}
private static final SimpleLB[] VALUES = values();
public static SimpleLB 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 SimpleLB(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB)
}
public interface ConsistentHashLBOrBuilder extends
// @@protoc_insertion_point(interface_extends:istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB)
com.google.protobuf.MessageOrBuilder {
/**
*
* The minimum number of virtual nodes to use for the hash
* ring. Defaults to 1024. Larger ring sizes result in more granular
* load distributions. If the number of hosts in the load balancing
* pool is larger than the ring size, each host will be assigned a
* single virtual node.
*
*
* uint64 minimum_ring_size = 4;
*/
long getMinimumRingSize();
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HashKeyCase getHashKeyCase();
}
/**
*
* Consistent Hash-based load balancing can be used to provide soft
* session affinity based on HTTP headers, cookies or other
* properties. This load balancing policy is applicable only for HTTP
* connections. The affinity to a particular destination host will be
* lost when one or more hosts are added/removed from the destination
* service.
*
*
* Protobuf type {@code istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB}
*/
public static final class ConsistentHashLB extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB)
ConsistentHashLBOrBuilder {
private static final long serialVersionUID = 0L;
// Use ConsistentHashLB.newBuilder() to construct.
private ConsistentHashLB(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ConsistentHashLB() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ConsistentHashLB();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ConsistentHashLB(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
hashKeyCase_ = 1;
hashKey_ = s;
break;
}
case 18: {
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.Builder subBuilder = null;
if (hashKeyCase_ == 2) {
subBuilder = ((istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie) hashKey_).toBuilder();
}
hashKey_ =
input.readMessage(istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie) hashKey_);
hashKey_ = subBuilder.buildPartial();
}
hashKeyCase_ = 2;
break;
}
case 24: {
hashKeyCase_ = 3;
hashKey_ = input.readBool();
break;
}
case 32: {
minimumRingSize_ = input.readUInt64();
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
hashKeyCase_ = 5;
hashKey_ = 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.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.class, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.Builder.class);
}
public interface HTTPCookieOrBuilder extends
// @@protoc_insertion_point(interface_extends:istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie)
com.google.protobuf.MessageOrBuilder {
/**
*
* Describes a HTTP cookie that will be used as the hash key for the
* Consistent Hash load balancer. If the cookie is not present, it will
* be generated.
*
*
* Protobuf type {@code istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie}
*/
public static final class HTTPCookie extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie)
HTTPCookieOrBuilder {
private static final long serialVersionUID = 0L;
// Use HTTPCookie.newBuilder() to construct.
private HTTPCookie(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private HTTPCookie() {
name_ = "";
path_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new HTTPCookie();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private HTTPCookie(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
path_ = s;
break;
}
case 26: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (ttl_ != null) {
subBuilder = ttl_.toBuilder();
}
ttl_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(ttl_);
ttl_ = subBuilder.buildPartial();
}
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.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_HTTPCookie_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_HTTPCookie_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.class, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
*
* .google.protobuf.Duration ttl = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() {
return getTtl();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!getPathBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, path_);
}
if (ttl_ != null) {
output.writeMessage(3, getTtl());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!getPathBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, path_);
}
if (ttl_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getTtl());
}
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 istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie)) {
return super.equals(obj);
}
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie other = (istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie) obj;
if (!getName()
.equals(other.getName())) return false;
if (!getPath()
.equals(other.getPath())) return false;
if (hasTtl() != other.hasTtl()) return false;
if (hasTtl()) {
if (!getTtl()
.equals(other.getTtl())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + PATH_FIELD_NUMBER;
hash = (53 * hash) + getPath().hashCode();
if (hasTtl()) {
hash = (37 * hash) + TTL_FIELD_NUMBER;
hash = (53 * hash) + getTtl().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie 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 istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie 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 istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie 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(istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie 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;
}
/**
*
* Describes a HTTP cookie that will be used as the hash key for the
* Consistent Hash load balancer. If the cookie is not present, it will
* be generated.
*
*
* Protobuf type {@code istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie)
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookieOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_HTTPCookie_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_HTTPCookie_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.class, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.Builder.class);
}
// Construct using istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.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();
name_ = "";
path_ = "";
if (ttlBuilder_ == null) {
ttl_ = null;
} else {
ttl_ = null;
ttlBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_HTTPCookie_descriptor;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie getDefaultInstanceForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.getDefaultInstance();
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie build() {
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie buildPartial() {
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie result = new istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie(this);
result.name_ = name_;
result.path_ = path_;
if (ttlBuilder_ == null) {
result.ttl_ = ttl_;
} else {
result.ttl_ = ttlBuilder_.build();
}
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.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie) {
return mergeFrom((istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie other) {
if (other == istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getPath().isEmpty()) {
path_ = other.path_;
onChanged();
}
if (other.hasTtl()) {
mergeTtl(other.getTtl());
}
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.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object name_ = "";
/**
*
* Hash based on a specific HTTP query parameter.
*
*
* string http_query_parameter_name = 5;
*/
public com.google.protobuf.ByteString
getHttpQueryParameterNameBytes() {
java.lang.Object ref = "";
if (hashKeyCase_ == 5) {
ref = hashKey_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (hashKeyCase_ == 5) {
hashKey_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MINIMUM_RING_SIZE_FIELD_NUMBER = 4;
private long minimumRingSize_;
/**
*
* The minimum number of virtual nodes to use for the hash
* ring. Defaults to 1024. Larger ring sizes result in more granular
* load distributions. If the number of hosts in the load balancing
* pool is larger than the ring size, each host will be assigned a
* single virtual node.
*
*
* uint64 minimum_ring_size = 4;
*/
public long getMinimumRingSize() {
return minimumRingSize_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (hashKeyCase_ == 1) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, hashKey_);
}
if (hashKeyCase_ == 2) {
output.writeMessage(2, (istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie) hashKey_);
}
if (hashKeyCase_ == 3) {
output.writeBool(
3, (boolean)((java.lang.Boolean) hashKey_));
}
if (minimumRingSize_ != 0L) {
output.writeUInt64(4, minimumRingSize_);
}
if (hashKeyCase_ == 5) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, hashKey_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (hashKeyCase_ == 1) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, hashKey_);
}
if (hashKeyCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie) hashKey_);
}
if (hashKeyCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(
3, (boolean)((java.lang.Boolean) hashKey_));
}
if (minimumRingSize_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(4, minimumRingSize_);
}
if (hashKeyCase_ == 5) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, hashKey_);
}
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 istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB)) {
return super.equals(obj);
}
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB other = (istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB) obj;
if (getMinimumRingSize()
!= other.getMinimumRingSize()) return false;
if (!getHashKeyCase().equals(other.getHashKeyCase())) return false;
switch (hashKeyCase_) {
case 1:
if (!getHttpHeaderName()
.equals(other.getHttpHeaderName())) return false;
break;
case 2:
if (!getHttpCookie()
.equals(other.getHttpCookie())) return false;
break;
case 3:
if (getUseSourceIp()
!= other.getUseSourceIp()) return false;
break;
case 5:
if (!getHttpQueryParameterName()
.equals(other.getHttpQueryParameterName())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + MINIMUM_RING_SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMinimumRingSize());
switch (hashKeyCase_) {
case 1:
hash = (37 * hash) + HTTP_HEADER_NAME_FIELD_NUMBER;
hash = (53 * hash) + getHttpHeaderName().hashCode();
break;
case 2:
hash = (37 * hash) + HTTP_COOKIE_FIELD_NUMBER;
hash = (53 * hash) + getHttpCookie().hashCode();
break;
case 3:
hash = (37 * hash) + USE_SOURCE_IP_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getUseSourceIp());
break;
case 5:
hash = (37 * hash) + HTTP_QUERY_PARAMETER_NAME_FIELD_NUMBER;
hash = (53 * hash) + getHttpQueryParameterName().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB 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 istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB 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 istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB 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(istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB 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;
}
/**
*
* Consistent Hash-based load balancing can be used to provide soft
* session affinity based on HTTP headers, cookies or other
* properties. This load balancing policy is applicable only for HTTP
* connections. The affinity to a particular destination host will be
* lost when one or more hosts are added/removed from the destination
* service.
*
*
* Protobuf type {@code istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB)
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLBOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.class, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.Builder.class);
}
// Construct using istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.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();
minimumRingSize_ = 0L;
hashKeyCase_ = 0;
hashKey_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_descriptor;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB getDefaultInstanceForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.getDefaultInstance();
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB build() {
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB buildPartial() {
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB result = new istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB(this);
if (hashKeyCase_ == 1) {
result.hashKey_ = hashKey_;
}
if (hashKeyCase_ == 2) {
if (httpCookieBuilder_ == null) {
result.hashKey_ = hashKey_;
} else {
result.hashKey_ = httpCookieBuilder_.build();
}
}
if (hashKeyCase_ == 3) {
result.hashKey_ = hashKey_;
}
if (hashKeyCase_ == 5) {
result.hashKey_ = hashKey_;
}
result.minimumRingSize_ = minimumRingSize_;
result.hashKeyCase_ = hashKeyCase_;
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.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB) {
return mergeFrom((istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB other) {
if (other == istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.getDefaultInstance()) return this;
if (other.getMinimumRingSize() != 0L) {
setMinimumRingSize(other.getMinimumRingSize());
}
switch (other.getHashKeyCase()) {
case HTTP_HEADER_NAME: {
hashKeyCase_ = 1;
hashKey_ = other.hashKey_;
onChanged();
break;
}
case HTTP_COOKIE: {
mergeHttpCookie(other.getHttpCookie());
break;
}
case USE_SOURCE_IP: {
setUseSourceIp(other.getUseSourceIp());
break;
}
case HTTP_QUERY_PARAMETER_NAME: {
hashKeyCase_ = 5;
hashKey_ = other.hashKey_;
onChanged();
break;
}
case HASHKEY_NOT_SET: {
break;
}
}
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.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int hashKeyCase_ = 0;
private java.lang.Object hashKey_;
public HashKeyCase
getHashKeyCase() {
return HashKeyCase.forNumber(
hashKeyCase_);
}
public Builder clearHashKey() {
hashKeyCase_ = 0;
hashKey_ = null;
onChanged();
return this;
}
/**
*
* Hash based on a specific HTTP query parameter.
*
*
* string http_query_parameter_name = 5;
*/
public Builder setHttpQueryParameterNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
hashKeyCase_ = 5;
hashKey_ = value;
onChanged();
return this;
}
private long minimumRingSize_ ;
/**
*
* The minimum number of virtual nodes to use for the hash
* ring. Defaults to 1024. Larger ring sizes result in more granular
* load distributions. If the number of hosts in the load balancing
* pool is larger than the ring size, each host will be assigned a
* single virtual node.
*
*
* uint64 minimum_ring_size = 4;
*/
public long getMinimumRingSize() {
return minimumRingSize_;
}
/**
*
* The minimum number of virtual nodes to use for the hash
* ring. Defaults to 1024. Larger ring sizes result in more granular
* load distributions. If the number of hosts in the load balancing
* pool is larger than the ring size, each host will be assigned a
* single virtual node.
*
* The minimum number of virtual nodes to use for the hash
* ring. Defaults to 1024. Larger ring sizes result in more granular
* load distributions. If the number of hosts in the load balancing
* pool is larger than the ring size, each host will be assigned a
* single virtual node.
*
*
* uint64 minimum_ring_size = 4;
*/
public Builder clearMinimumRingSize() {
minimumRingSize_ = 0L;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB)
}
// @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB)
private static final istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB();
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ConsistentHashLB parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ConsistentHashLB(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.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int lbPolicyCase_ = 0;
private java.lang.Object lbPolicy_;
public enum LbPolicyCase
implements com.google.protobuf.Internal.EnumLite {
SIMPLE(1),
CONSISTENT_HASH(2),
LBPOLICY_NOT_SET(0);
private final int value;
private LbPolicyCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static LbPolicyCase valueOf(int value) {
return forNumber(value);
}
public static LbPolicyCase forNumber(int value) {
switch (value) {
case 1: return SIMPLE;
case 2: return CONSISTENT_HASH;
case 0: return LBPOLICY_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public LbPolicyCase
getLbPolicyCase() {
return LbPolicyCase.forNumber(
lbPolicyCase_);
}
public static final int SIMPLE_FIELD_NUMBER = 1;
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB simple = 1;
*/
public int getSimpleValue() {
if (lbPolicyCase_ == 1) {
return (java.lang.Integer) lbPolicy_;
}
return 0;
}
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB simple = 1;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.SimpleLB getSimple() {
if (lbPolicyCase_ == 1) {
@SuppressWarnings("deprecation")
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.SimpleLB result = istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.SimpleLB.valueOf(
(java.lang.Integer) lbPolicy_);
return result == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.SimpleLB.UNRECOGNIZED : result;
}
return istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.SimpleLB.ROUND_ROBIN;
}
public static final int CONSISTENT_HASH_FIELD_NUMBER = 2;
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB consistent_hash = 2;
*/
public boolean hasConsistentHash() {
return lbPolicyCase_ == 2;
}
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB consistent_hash = 2;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB getConsistentHash() {
if (lbPolicyCase_ == 2) {
return (istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB) lbPolicy_;
}
return istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.getDefaultInstance();
}
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB consistent_hash = 2;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLBOrBuilder getConsistentHashOrBuilder() {
if (lbPolicyCase_ == 2) {
return (istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB) lbPolicy_;
}
return istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.getDefaultInstance();
}
public static final int LOCALITY_LB_SETTING_FIELD_NUMBER = 3;
private istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting localityLbSetting_;
/**
*
* Locality load balancer settings, this will override mesh wide settings in entirety, meaning no merging would be performed
* between this object and the object one in MeshConfig
*
* Locality load balancer settings, this will override mesh wide settings in entirety, meaning no merging would be performed
* between this object and the object one in MeshConfig
*
* Locality load balancer settings, this will override mesh wide settings in entirety, meaning no merging would be performed
* between this object and the object one in MeshConfig
*
*
* .istio.networking.v1alpha3.LocalityLoadBalancerSetting locality_lb_setting = 3;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSettingOrBuilder getLocalityLbSettingOrBuilder() {
return getLocalityLbSetting();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (lbPolicyCase_ == 1) {
output.writeEnum(1, ((java.lang.Integer) lbPolicy_));
}
if (lbPolicyCase_ == 2) {
output.writeMessage(2, (istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB) lbPolicy_);
}
if (localityLbSetting_ != null) {
output.writeMessage(3, getLocalityLbSetting());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (lbPolicyCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, ((java.lang.Integer) lbPolicy_));
}
if (lbPolicyCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB) lbPolicy_);
}
if (localityLbSetting_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getLocalityLbSetting());
}
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 istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings)) {
return super.equals(obj);
}
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings other = (istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings) obj;
if (hasLocalityLbSetting() != other.hasLocalityLbSetting()) return false;
if (hasLocalityLbSetting()) {
if (!getLocalityLbSetting()
.equals(other.getLocalityLbSetting())) return false;
}
if (!getLbPolicyCase().equals(other.getLbPolicyCase())) return false;
switch (lbPolicyCase_) {
case 1:
if (getSimpleValue()
!= other.getSimpleValue()) return false;
break;
case 2:
if (!getConsistentHash()
.equals(other.getConsistentHash())) return false;
break;
case 0:
default:
}
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 (hasLocalityLbSetting()) {
hash = (37 * hash) + LOCALITY_LB_SETTING_FIELD_NUMBER;
hash = (53 * hash) + getLocalityLbSetting().hashCode();
}
switch (lbPolicyCase_) {
case 1:
hash = (37 * hash) + SIMPLE_FIELD_NUMBER;
hash = (53 * hash) + getSimpleValue();
break;
case 2:
hash = (37 * hash) + CONSISTENT_HASH_FIELD_NUMBER;
hash = (53 * hash) + getConsistentHash().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings 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 istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings 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 istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings 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(istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings 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;
}
/**
*
* Load balancing policies to apply for a specific destination. See Envoy's
* load balancing
* [documentation](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/load_balancing)
* for more details.
* For example, the following rule uses a round robin load balancing policy
* for all traffic going to the ratings service.
* {{<tabset category-name="example">}}
* {{<tab name="v1alpha3" category-value="v1alpha3">}}
* ```yaml
* apiVersion: networking.istio.io/v1alpha3
* kind: DestinationRule
* metadata:
* name: bookinfo-ratings
* spec:
* host: ratings.prod.svc.cluster.local
* trafficPolicy:
* loadBalancer:
* simple: ROUND_ROBIN
* ```
* {{</tab>}}
* {{<tab name="v1beta1" category-value="v1beta1">}}
* ```yaml
* apiVersion: networking.istio.io/v1beta1
* kind: DestinationRule
* metadata:
* name: bookinfo-ratings
* spec:
* host: ratings.prod.svc.cluster.local
* trafficPolicy:
* loadBalancer:
* simple: ROUND_ROBIN
* ```
* {{</tab>}}
* {{</tabset>}}
* The following example sets up sticky sessions for the ratings service
* hashing-based load balancer for the same ratings service using the
* the User cookie as the hash key.
* {{<tabset category-name="example">}}
* {{<tab name="v1alpha3" category-value="v1alpha3">}}
* ```yaml
* apiVersion: networking.istio.io/v1alpha3
* kind: DestinationRule
* metadata:
* name: bookinfo-ratings
* spec:
* host: ratings.prod.svc.cluster.local
* trafficPolicy:
* loadBalancer:
* consistentHash:
* httpCookie:
* name: user
* ttl: 0s
* ```
* {{</tab>}}
* {{<tab name="v1beta1" category-value="v1beta1">}}
* ```yaml
* apiVersion: networking.istio.io/v1beta1
* kind: DestinationRule
* metadata:
* name: bookinfo-ratings
* spec:
* host: ratings.prod.svc.cluster.local
* trafficPolicy:
* loadBalancer:
* consistentHash:
* httpCookie:
* name: user
* ttl: 0s
* ```
* {{</tab>}}
* {{</tabset>}}
*
* Locality load balancer settings, this will override mesh wide settings in entirety, meaning no merging would be performed
* between this object and the object one in MeshConfig
*
* Locality load balancer settings, this will override mesh wide settings in entirety, meaning no merging would be performed
* between this object and the object one in MeshConfig
*
* Locality load balancer settings, this will override mesh wide settings in entirety, meaning no merging would be performed
* between this object and the object one in MeshConfig
*
*
* .istio.networking.v1alpha3.LocalityLoadBalancerSetting locality_lb_setting = 3;
*/
public Builder setLocalityLbSetting(istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting value) {
if (localityLbSettingBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
localityLbSetting_ = value;
onChanged();
} else {
localityLbSettingBuilder_.setMessage(value);
}
return this;
}
/**
*
* Locality load balancer settings, this will override mesh wide settings in entirety, meaning no merging would be performed
* between this object and the object one in MeshConfig
*
* Locality load balancer settings, this will override mesh wide settings in entirety, meaning no merging would be performed
* between this object and the object one in MeshConfig
*
* Locality load balancer settings, this will override mesh wide settings in entirety, meaning no merging would be performed
* between this object and the object one in MeshConfig
*
* Locality load balancer settings, this will override mesh wide settings in entirety, meaning no merging would be performed
* between this object and the object one in MeshConfig
*
* Locality load balancer settings, this will override mesh wide settings in entirety, meaning no merging would be performed
* between this object and the object one in MeshConfig
*
* Locality load balancer settings, this will override mesh wide settings in entirety, meaning no merging would be performed
* between this object and the object one in MeshConfig
*
*
* .istio.networking.v1alpha3.LocalityLoadBalancerSetting locality_lb_setting = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSettingOrBuilder>
getLocalityLbSettingFieldBuilder() {
if (localityLbSettingBuilder_ == null) {
localityLbSettingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSettingOrBuilder>(
getLocalityLbSetting(),
getParentForChildren(),
isClean());
localityLbSetting_ = null;
}
return localityLbSettingBuilder_;
}
@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.LoadBalancerSettings)
}
// @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.LoadBalancerSettings)
private static final istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings();
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LoadBalancerSettings parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LoadBalancerSettings(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.DestinationRuleOuterClass.LoadBalancerSettings getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ConnectionPoolSettingsOrBuilder extends
// @@protoc_insertion_point(interface_extends:istio.networking.v1alpha3.ConnectionPoolSettings)
com.google.protobuf.MessageOrBuilder {
/**
*
* Settings common to both HTTP and TCP upstream connections.
*
* Settings common to both HTTP and TCP upstream connections.
*
*
* Protobuf type {@code istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings}
*/
public static final class TCPSettings extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings)
TCPSettingsOrBuilder {
private static final long serialVersionUID = 0L;
// Use TCPSettings.newBuilder() to construct.
private TCPSettings(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TCPSettings() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TCPSettings();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TCPSettings(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
maxConnections_ = input.readInt32();
break;
}
case 18: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (connectTimeout_ != null) {
subBuilder = connectTimeout_.toBuilder();
}
connectTimeout_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(connectTimeout_);
connectTimeout_ = subBuilder.buildPartial();
}
break;
}
case 26: {
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive.Builder subBuilder = null;
if (tcpKeepalive_ != null) {
subBuilder = tcpKeepalive_.toBuilder();
}
tcpKeepalive_ = input.readMessage(istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(tcpKeepalive_);
tcpKeepalive_ = subBuilder.buildPartial();
}
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.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_TCPSettings_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_TCPSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.class, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.Builder.class);
}
public interface TcpKeepaliveOrBuilder extends
// @@protoc_insertion_point(interface_extends:istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive)
com.google.protobuf.MessageOrBuilder {
/**
*
* Maximum number of keepalive probes to send without response before
* deciding the connection is dead. Default is to use the OS level configuration
* (unless overridden, Linux defaults to 9.)
*
*
* uint32 probes = 1;
*/
int getProbes();
/**
*
* The time duration a connection needs to be idle before keep-alive
* probes start being sent. Default is to use the OS level configuration
* (unless overridden, Linux defaults to 7200s (ie 2 hours.)
*
* The time duration a connection needs to be idle before keep-alive
* probes start being sent. Default is to use the OS level configuration
* (unless overridden, Linux defaults to 7200s (ie 2 hours.)
*
* The time duration a connection needs to be idle before keep-alive
* probes start being sent. Default is to use the OS level configuration
* (unless overridden, Linux defaults to 7200s (ie 2 hours.)
*
*
* Protobuf type {@code istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive}
*/
public static final class TcpKeepalive extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive)
TcpKeepaliveOrBuilder {
private static final long serialVersionUID = 0L;
// Use TcpKeepalive.newBuilder() to construct.
private TcpKeepalive(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TcpKeepalive() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TcpKeepalive();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TcpKeepalive(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
probes_ = input.readUInt32();
break;
}
case 18: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (time_ != null) {
subBuilder = time_.toBuilder();
}
time_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(time_);
time_ = subBuilder.buildPartial();
}
break;
}
case 26: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (interval_ != null) {
subBuilder = interval_.toBuilder();
}
interval_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(interval_);
interval_ = subBuilder.buildPartial();
}
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.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_TCPSettings_TcpKeepalive_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_TCPSettings_TcpKeepalive_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive.class, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive.Builder.class);
}
public static final int PROBES_FIELD_NUMBER = 1;
private int probes_;
/**
*
* Maximum number of keepalive probes to send without response before
* deciding the connection is dead. Default is to use the OS level configuration
* (unless overridden, Linux defaults to 9.)
*
*
* uint32 probes = 1;
*/
public int getProbes() {
return probes_;
}
public static final int TIME_FIELD_NUMBER = 2;
private com.google.protobuf.Duration time_;
/**
*
* The time duration a connection needs to be idle before keep-alive
* probes start being sent. Default is to use the OS level configuration
* (unless overridden, Linux defaults to 7200s (ie 2 hours.)
*
*
* .google.protobuf.Duration time = 2;
*/
public boolean hasTime() {
return time_ != null;
}
/**
*
* The time duration a connection needs to be idle before keep-alive
* probes start being sent. Default is to use the OS level configuration
* (unless overridden, Linux defaults to 7200s (ie 2 hours.)
*
* The time duration a connection needs to be idle before keep-alive
* probes start being sent. Default is to use the OS level configuration
* (unless overridden, Linux defaults to 7200s (ie 2 hours.)
*
*
* .google.protobuf.Duration time = 2;
*/
public com.google.protobuf.DurationOrBuilder getTimeOrBuilder() {
return getTime();
}
public static final int INTERVAL_FIELD_NUMBER = 3;
private com.google.protobuf.Duration interval_;
/**
*
* The time duration between keep-alive probes.
* Default is to use the OS level configuration
* (unless overridden, Linux defaults to 75s.)
*
* The time duration between keep-alive probes.
* Default is to use the OS level configuration
* (unless overridden, Linux defaults to 75s.)
*
*
* .google.protobuf.Duration interval = 3;
*/
public com.google.protobuf.DurationOrBuilder getIntervalOrBuilder() {
return getInterval();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (probes_ != 0) {
output.writeUInt32(1, probes_);
}
if (time_ != null) {
output.writeMessage(2, getTime());
}
if (interval_ != null) {
output.writeMessage(3, getInterval());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (probes_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(1, probes_);
}
if (time_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getTime());
}
if (interval_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getInterval());
}
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 istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive)) {
return super.equals(obj);
}
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive other = (istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive) obj;
if (getProbes()
!= other.getProbes()) return false;
if (hasTime() != other.hasTime()) return false;
if (hasTime()) {
if (!getTime()
.equals(other.getTime())) return false;
}
if (hasInterval() != other.hasInterval()) return false;
if (hasInterval()) {
if (!getInterval()
.equals(other.getInterval())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + PROBES_FIELD_NUMBER;
hash = (53 * hash) + getProbes();
if (hasTime()) {
hash = (37 * hash) + TIME_FIELD_NUMBER;
hash = (53 * hash) + getTime().hashCode();
}
if (hasInterval()) {
hash = (37 * hash) + INTERVAL_FIELD_NUMBER;
hash = (53 * hash) + getInterval().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive 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 istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive 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 istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive 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(istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive 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;
}
/**
*
* TCP keepalive.
*
*
* Protobuf type {@code istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive)
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepaliveOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_TCPSettings_TcpKeepalive_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_TCPSettings_TcpKeepalive_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive.class, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive.Builder.class);
}
// Construct using istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive.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();
probes_ = 0;
if (timeBuilder_ == null) {
time_ = null;
} else {
time_ = null;
timeBuilder_ = null;
}
if (intervalBuilder_ == null) {
interval_ = null;
} else {
interval_ = null;
intervalBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_TCPSettings_TcpKeepalive_descriptor;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive getDefaultInstanceForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive.getDefaultInstance();
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive build() {
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive buildPartial() {
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive result = new istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive(this);
result.probes_ = probes_;
if (timeBuilder_ == null) {
result.time_ = time_;
} else {
result.time_ = timeBuilder_.build();
}
if (intervalBuilder_ == null) {
result.interval_ = interval_;
} else {
result.interval_ = intervalBuilder_.build();
}
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.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive) {
return mergeFrom((istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive other) {
if (other == istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive.getDefaultInstance()) return this;
if (other.getProbes() != 0) {
setProbes(other.getProbes());
}
if (other.hasTime()) {
mergeTime(other.getTime());
}
if (other.hasInterval()) {
mergeInterval(other.getInterval());
}
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.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int probes_ ;
/**
*
* Maximum number of keepalive probes to send without response before
* deciding the connection is dead. Default is to use the OS level configuration
* (unless overridden, Linux defaults to 9.)
*
*
* uint32 probes = 1;
*/
public int getProbes() {
return probes_;
}
/**
*
* Maximum number of keepalive probes to send without response before
* deciding the connection is dead. Default is to use the OS level configuration
* (unless overridden, Linux defaults to 9.)
*
* Maximum number of keepalive probes to send without response before
* deciding the connection is dead. Default is to use the OS level configuration
* (unless overridden, Linux defaults to 9.)
*
* The time duration a connection needs to be idle before keep-alive
* probes start being sent. Default is to use the OS level configuration
* (unless overridden, Linux defaults to 7200s (ie 2 hours.)
*
* The time duration a connection needs to be idle before keep-alive
* probes start being sent. Default is to use the OS level configuration
* (unless overridden, Linux defaults to 7200s (ie 2 hours.)
*
* The time duration a connection needs to be idle before keep-alive
* probes start being sent. Default is to use the OS level configuration
* (unless overridden, Linux defaults to 7200s (ie 2 hours.)
*
*
* .google.protobuf.Duration time = 2;
*/
public Builder setTime(com.google.protobuf.Duration value) {
if (timeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
time_ = value;
onChanged();
} else {
timeBuilder_.setMessage(value);
}
return this;
}
/**
*
* The time duration a connection needs to be idle before keep-alive
* probes start being sent. Default is to use the OS level configuration
* (unless overridden, Linux defaults to 7200s (ie 2 hours.)
*
* The time duration a connection needs to be idle before keep-alive
* probes start being sent. Default is to use the OS level configuration
* (unless overridden, Linux defaults to 7200s (ie 2 hours.)
*
* The time duration a connection needs to be idle before keep-alive
* probes start being sent. Default is to use the OS level configuration
* (unless overridden, Linux defaults to 7200s (ie 2 hours.)
*
* The time duration a connection needs to be idle before keep-alive
* probes start being sent. Default is to use the OS level configuration
* (unless overridden, Linux defaults to 7200s (ie 2 hours.)
*
*
* .google.protobuf.Duration time = 2;
*/
public com.google.protobuf.Duration.Builder getTimeBuilder() {
onChanged();
return getTimeFieldBuilder().getBuilder();
}
/**
*
* The time duration a connection needs to be idle before keep-alive
* probes start being sent. Default is to use the OS level configuration
* (unless overridden, Linux defaults to 7200s (ie 2 hours.)
*
* The time duration a connection needs to be idle before keep-alive
* probes start being sent. Default is to use the OS level configuration
* (unless overridden, Linux defaults to 7200s (ie 2 hours.)
*
* Maximum number of requests per connection to a backend. Setting this
* parameter to 1 disables keep alive. Default 0, meaning "unlimited",
* up to 2^29.
*
* The idle timeout for upstream connection pool connections. The idle timeout
* is defined as the period in which there are no active requests.
* If not set, the default is 1 hour. When the idle timeout is reached,
* the connection will be closed. If the connection is an HTTP/2
* connection a drain sequence will occur prior to closing the connection.
* Note that request based timeouts mean that HTTP/2 PINGs will not
* keep the connection alive. Applies to both HTTP1.1 and HTTP2 connections.
*
* The idle timeout for upstream connection pool connections. The idle timeout
* is defined as the period in which there are no active requests.
* If not set, the default is 1 hour. When the idle timeout is reached,
* the connection will be closed. If the connection is an HTTP/2
* connection a drain sequence will occur prior to closing the connection.
* Note that request based timeouts mean that HTTP/2 PINGs will not
* keep the connection alive. Applies to both HTTP1.1 and HTTP2 connections.
*
* The idle timeout for upstream connection pool connections. The idle timeout
* is defined as the period in which there are no active requests.
* If not set, the default is 1 hour. When the idle timeout is reached,
* the connection will be closed. If the connection is an HTTP/2
* connection a drain sequence will occur prior to closing the connection.
* Note that request based timeouts mean that HTTP/2 PINGs will not
* keep the connection alive. Applies to both HTTP1.1 and HTTP2 connections.
*
* If set to true, client protocol will be preserved while initiating connection to backend.
* Note that when this is set to true, h2_upgrade_policy will be ineffective i.e. the client
* connections will not be upgraded to http2.
*
*
* DEFAULT = 0;
*/
public static final int DEFAULT_VALUE = 0;
/**
*
* Do not upgrade the connection to http2.
* This opt-out option overrides the default.
*
*
* DO_NOT_UPGRADE = 1;
*/
public static final int DO_NOT_UPGRADE_VALUE = 1;
/**
*
* Upgrade the connection to http2.
* This opt-in option overrides the default.
*
*
* UPGRADE = 2;
*/
public static final int UPGRADE_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;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static H2UpgradePolicy valueOf(int value) {
return forNumber(value);
}
public static H2UpgradePolicy forNumber(int value) {
switch (value) {
case 0: return DEFAULT;
case 1: return DO_NOT_UPGRADE;
case 2: return UPGRADE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
H2UpgradePolicy> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public H2UpgradePolicy findValueByNumber(int number) {
return H2UpgradePolicy.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 istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.getDescriptor().getEnumTypes().get(0);
}
private static final H2UpgradePolicy[] VALUES = values();
public static H2UpgradePolicy 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 H2UpgradePolicy(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy)
}
public static final int HTTP1_MAX_PENDING_REQUESTS_FIELD_NUMBER = 1;
private int http1MaxPendingRequests_;
/**
*
* Maximum number of pending HTTP requests to a destination. Default 2^32-1.
*
*
* int32 http1_max_pending_requests = 1;
*/
public int getHttp1MaxPendingRequests() {
return http1MaxPendingRequests_;
}
public static final int HTTP2_MAX_REQUESTS_FIELD_NUMBER = 2;
private int http2MaxRequests_;
/**
*
* Maximum number of requests to a backend. Default 2^32-1.
*
*
* int32 http2_max_requests = 2;
*/
public int getHttp2MaxRequests() {
return http2MaxRequests_;
}
public static final int MAX_REQUESTS_PER_CONNECTION_FIELD_NUMBER = 3;
private int maxRequestsPerConnection_;
/**
*
* Maximum number of requests per connection to a backend. Setting this
* parameter to 1 disables keep alive. Default 0, meaning "unlimited",
* up to 2^29.
*
*
* int32 max_requests_per_connection = 3;
*/
public int getMaxRequestsPerConnection() {
return maxRequestsPerConnection_;
}
public static final int MAX_RETRIES_FIELD_NUMBER = 4;
private int maxRetries_;
/**
*
* Maximum number of retries that can be outstanding to all hosts in a
* cluster at a given time. Defaults to 2^32-1.
*
*
* int32 max_retries = 4;
*/
public int getMaxRetries() {
return maxRetries_;
}
public static final int IDLE_TIMEOUT_FIELD_NUMBER = 5;
private com.google.protobuf.Duration idleTimeout_;
/**
*
* The idle timeout for upstream connection pool connections. The idle timeout
* is defined as the period in which there are no active requests.
* If not set, the default is 1 hour. When the idle timeout is reached,
* the connection will be closed. If the connection is an HTTP/2
* connection a drain sequence will occur prior to closing the connection.
* Note that request based timeouts mean that HTTP/2 PINGs will not
* keep the connection alive. Applies to both HTTP1.1 and HTTP2 connections.
*
* The idle timeout for upstream connection pool connections. The idle timeout
* is defined as the period in which there are no active requests.
* If not set, the default is 1 hour. When the idle timeout is reached,
* the connection will be closed. If the connection is an HTTP/2
* connection a drain sequence will occur prior to closing the connection.
* Note that request based timeouts mean that HTTP/2 PINGs will not
* keep the connection alive. Applies to both HTTP1.1 and HTTP2 connections.
*
* The idle timeout for upstream connection pool connections. The idle timeout
* is defined as the period in which there are no active requests.
* If not set, the default is 1 hour. When the idle timeout is reached,
* the connection will be closed. If the connection is an HTTP/2
* connection a drain sequence will occur prior to closing the connection.
* Note that request based timeouts mean that HTTP/2 PINGs will not
* keep the connection alive. Applies to both HTTP1.1 and HTTP2 connections.
*
*
* .google.protobuf.Duration idle_timeout = 5;
*/
public com.google.protobuf.DurationOrBuilder getIdleTimeoutOrBuilder() {
return getIdleTimeout();
}
public static final int H2_UPGRADE_POLICY_FIELD_NUMBER = 6;
private int h2UpgradePolicy_;
/**
*
* Specify if http1.1 connection should be upgraded to http2 for the associated destination.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy h2_upgrade_policy = 6;
*/
public int getH2UpgradePolicyValue() {
return h2UpgradePolicy_;
}
/**
*
* Specify if http1.1 connection should be upgraded to http2 for the associated destination.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy h2_upgrade_policy = 6;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy getH2UpgradePolicy() {
@SuppressWarnings("deprecation")
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy result = istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy.valueOf(h2UpgradePolicy_);
return result == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy.UNRECOGNIZED : result;
}
public static final int USE_CLIENT_PROTOCOL_FIELD_NUMBER = 7;
private boolean useClientProtocol_;
/**
*
* If set to true, client protocol will be preserved while initiating connection to backend.
* Note that when this is set to true, h2_upgrade_policy will be ineffective i.e. the client
* connections will not be upgraded to http2.
*
* Maximum number of requests per connection to a backend. Setting this
* parameter to 1 disables keep alive. Default 0, meaning "unlimited",
* up to 2^29.
*
*
* int32 max_requests_per_connection = 3;
*/
public int getMaxRequestsPerConnection() {
return maxRequestsPerConnection_;
}
/**
*
* Maximum number of requests per connection to a backend. Setting this
* parameter to 1 disables keep alive. Default 0, meaning "unlimited",
* up to 2^29.
*
* Maximum number of requests per connection to a backend. Setting this
* parameter to 1 disables keep alive. Default 0, meaning "unlimited",
* up to 2^29.
*
* The idle timeout for upstream connection pool connections. The idle timeout
* is defined as the period in which there are no active requests.
* If not set, the default is 1 hour. When the idle timeout is reached,
* the connection will be closed. If the connection is an HTTP/2
* connection a drain sequence will occur prior to closing the connection.
* Note that request based timeouts mean that HTTP/2 PINGs will not
* keep the connection alive. Applies to both HTTP1.1 and HTTP2 connections.
*
* The idle timeout for upstream connection pool connections. The idle timeout
* is defined as the period in which there are no active requests.
* If not set, the default is 1 hour. When the idle timeout is reached,
* the connection will be closed. If the connection is an HTTP/2
* connection a drain sequence will occur prior to closing the connection.
* Note that request based timeouts mean that HTTP/2 PINGs will not
* keep the connection alive. Applies to both HTTP1.1 and HTTP2 connections.
*
* The idle timeout for upstream connection pool connections. The idle timeout
* is defined as the period in which there are no active requests.
* If not set, the default is 1 hour. When the idle timeout is reached,
* the connection will be closed. If the connection is an HTTP/2
* connection a drain sequence will occur prior to closing the connection.
* Note that request based timeouts mean that HTTP/2 PINGs will not
* keep the connection alive. Applies to both HTTP1.1 and HTTP2 connections.
*
*
* .google.protobuf.Duration idle_timeout = 5;
*/
public Builder setIdleTimeout(com.google.protobuf.Duration value) {
if (idleTimeoutBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
idleTimeout_ = value;
onChanged();
} else {
idleTimeoutBuilder_.setMessage(value);
}
return this;
}
/**
*
* The idle timeout for upstream connection pool connections. The idle timeout
* is defined as the period in which there are no active requests.
* If not set, the default is 1 hour. When the idle timeout is reached,
* the connection will be closed. If the connection is an HTTP/2
* connection a drain sequence will occur prior to closing the connection.
* Note that request based timeouts mean that HTTP/2 PINGs will not
* keep the connection alive. Applies to both HTTP1.1 and HTTP2 connections.
*
* The idle timeout for upstream connection pool connections. The idle timeout
* is defined as the period in which there are no active requests.
* If not set, the default is 1 hour. When the idle timeout is reached,
* the connection will be closed. If the connection is an HTTP/2
* connection a drain sequence will occur prior to closing the connection.
* Note that request based timeouts mean that HTTP/2 PINGs will not
* keep the connection alive. Applies to both HTTP1.1 and HTTP2 connections.
*
* The idle timeout for upstream connection pool connections. The idle timeout
* is defined as the period in which there are no active requests.
* If not set, the default is 1 hour. When the idle timeout is reached,
* the connection will be closed. If the connection is an HTTP/2
* connection a drain sequence will occur prior to closing the connection.
* Note that request based timeouts mean that HTTP/2 PINGs will not
* keep the connection alive. Applies to both HTTP1.1 and HTTP2 connections.
*
* The idle timeout for upstream connection pool connections. The idle timeout
* is defined as the period in which there are no active requests.
* If not set, the default is 1 hour. When the idle timeout is reached,
* the connection will be closed. If the connection is an HTTP/2
* connection a drain sequence will occur prior to closing the connection.
* Note that request based timeouts mean that HTTP/2 PINGs will not
* keep the connection alive. Applies to both HTTP1.1 and HTTP2 connections.
*
* The idle timeout for upstream connection pool connections. The idle timeout
* is defined as the period in which there are no active requests.
* If not set, the default is 1 hour. When the idle timeout is reached,
* the connection will be closed. If the connection is an HTTP/2
* connection a drain sequence will occur prior to closing the connection.
* Note that request based timeouts mean that HTTP/2 PINGs will not
* keep the connection alive. Applies to both HTTP1.1 and HTTP2 connections.
*
* The idle timeout for upstream connection pool connections. The idle timeout
* is defined as the period in which there are no active requests.
* If not set, the default is 1 hour. When the idle timeout is reached,
* the connection will be closed. If the connection is an HTTP/2
* connection a drain sequence will occur prior to closing the connection.
* Note that request based timeouts mean that HTTP/2 PINGs will not
* keep the connection alive. Applies to both HTTP1.1 and HTTP2 connections.
*
* If set to true, client protocol will be preserved while initiating connection to backend.
* Note that when this is set to true, h2_upgrade_policy will be ineffective i.e. the client
* connections will not be upgraded to http2.
*
* If set to true, client protocol will be preserved while initiating connection to backend.
* Note that when this is set to true, h2_upgrade_policy will be ineffective i.e. the client
* connections will not be upgraded to http2.
*
* If set to true, client protocol will be preserved while initiating connection to backend.
* Note that when this is set to true, h2_upgrade_policy will be ineffective i.e. the client
* connections will not be upgraded to http2.
*
*
* bool use_client_protocol = 7;
*/
public Builder clearUseClientProtocol() {
useClientProtocol_ = false;
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.ConnectionPoolSettings.HTTPSettings)
}
// @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings)
private static final istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings();
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public HTTPSettings parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HTTPSettings(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.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int TCP_FIELD_NUMBER = 1;
private istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings tcp_;
/**
*
* Settings common to both HTTP and TCP upstream connections.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings http = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettingsOrBuilder>
getHttpFieldBuilder() {
if (httpBuilder_ == null) {
httpBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettingsOrBuilder>(
getHttp(),
getParentForChildren(),
isClean());
http_ = null;
}
return httpBuilder_;
}
@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.ConnectionPoolSettings)
}
// @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.ConnectionPoolSettings)
private static final istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings();
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ConnectionPoolSettings parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ConnectionPoolSettings(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.DestinationRuleOuterClass.ConnectionPoolSettings getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface OutlierDetectionOrBuilder extends
// @@protoc_insertion_point(interface_extends:istio.networking.v1alpha3.OutlierDetection)
com.google.protobuf.MessageOrBuilder {
/**
*
* Number of errors before a host is ejected from the connection
* pool. Defaults to 5. When the upstream host is accessed over HTTP, a
* 502, 503, or 504 return code qualifies as an error. When the upstream host
* is accessed over an opaque TCP connection, connect timeouts and
* connection error/failure events qualify as an error.
* $hide_from_docs
*
* Number of gateway errors before a host is ejected from the connection pool.
* When the upstream host is accessed over HTTP, a 502, 503, or 504 return
* code qualifies as a gateway error. When the upstream host is accessed over
* an opaque TCP connection, connect timeouts and connection error/failure
* events qualify as a gateway error.
* This feature is disabled by default or when set to the value 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Number of gateway errors before a host is ejected from the connection pool.
* When the upstream host is accessed over HTTP, a 502, 503, or 504 return
* code qualifies as a gateway error. When the upstream host is accessed over
* an opaque TCP connection, connect timeouts and connection error/failure
* events qualify as a gateway error.
* This feature is disabled by default or when set to the value 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Number of gateway errors before a host is ejected from the connection pool.
* When the upstream host is accessed over HTTP, a 502, 503, or 504 return
* code qualifies as a gateway error. When the upstream host is accessed over
* an opaque TCP connection, connect timeouts and connection error/failure
* events qualify as a gateway error.
* This feature is disabled by default or when set to the value 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Number of 5xx errors before a host is ejected from the connection pool.
* When the upstream host is accessed over an opaque TCP connection, connect
* timeouts, connection error/failure and request failure events qualify as a
* 5xx error.
* This feature defaults to 5 but can be disabled by setting the value to 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Number of 5xx errors before a host is ejected from the connection pool.
* When the upstream host is accessed over an opaque TCP connection, connect
* timeouts, connection error/failure and request failure events qualify as a
* 5xx error.
* This feature defaults to 5 but can be disabled by setting the value to 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Number of 5xx errors before a host is ejected from the connection pool.
* When the upstream host is accessed over an opaque TCP connection, connect
* timeouts, connection error/failure and request failure events qualify as a
* 5xx error.
* This feature defaults to 5 but can be disabled by setting the value to 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Minimum ejection duration. A host will remain ejected for a period
* equal to the product of minimum ejection duration and the number of
* times the host has been ejected. This technique allows the system to
* automatically increase the ejection period for unhealthy upstream
* servers. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 30s.
*
* Minimum ejection duration. A host will remain ejected for a period
* equal to the product of minimum ejection duration and the number of
* times the host has been ejected. This technique allows the system to
* automatically increase the ejection period for unhealthy upstream
* servers. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 30s.
*
* Minimum ejection duration. A host will remain ejected for a period
* equal to the product of minimum ejection duration and the number of
* times the host has been ejected. This technique allows the system to
* automatically increase the ejection period for unhealthy upstream
* servers. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 30s.
*
* Outlier detection will be enabled as long as the associated load balancing
* pool has at least min_health_percent hosts in healthy mode. When the
* percentage of healthy hosts in the load balancing pool drops below this
* threshold, outlier detection will be disabled and the proxy will load balance
* across all hosts in the pool (healthy and unhealthy). The threshold can be
* disabled by setting it to 0%. The default is 0% as it's not typically
* applicable in k8s environments with few pods per service.
*
* A Circuit breaker implementation that tracks the status of each
* individual host in the upstream service. Applicable to both HTTP and
* TCP services. For HTTP services, hosts that continually return 5xx
* errors for API calls are ejected from the pool for a pre-defined period
* of time. For TCP services, connection timeouts or connection
* failures to a given host counts as an error when measuring the
* consecutive errors metric. See Envoy's [outlier
* detection](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/outlier)
* for more details.
* The following rule sets a connection pool size of 100 HTTP1 connections
* with no more than 10 req/connection to the "reviews" service. In addition,
* it sets a limit of 1000 concurrent HTTP2 requests and configures upstream
* hosts to be scanned every 5 mins so that any host that fails 7 consecutive
* times with a 502, 503, or 504 error code will be ejected for 15 minutes.
* {{<tabset category-name="example">}}
* {{<tab name="v1alpha3" category-value="v1alpha3">}}
* ```yaml
* apiVersion: networking.istio.io/v1alpha3
* kind: DestinationRule
* metadata:
* name: reviews-cb-policy
* spec:
* host: reviews.prod.svc.cluster.local
* trafficPolicy:
* connectionPool:
* tcp:
* maxConnections: 100
* http:
* http2MaxRequests: 1000
* maxRequestsPerConnection: 10
* outlierDetection:
* consecutiveErrors: 7
* interval: 5m
* baseEjectionTime: 15m
* ```
* {{</tab>}}
* {{<tab name="v1beta1" category-value="v1beta1">}}
* ```yaml
* apiVersion: networking.istio.io/v1beta1
* kind: DestinationRule
* metadata:
* name: reviews-cb-policy
* spec:
* host: reviews.prod.svc.cluster.local
* trafficPolicy:
* connectionPool:
* tcp:
* maxConnections: 100
* http:
* http2MaxRequests: 1000
* maxRequestsPerConnection: 10
* outlierDetection:
* consecutiveErrors: 7
* interval: 5m
* baseEjectionTime: 15m
* ```
* {{</tab>}}
* {{</tabset>}}
*
*
* Protobuf type {@code istio.networking.v1alpha3.OutlierDetection}
*/
public static final class OutlierDetection extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:istio.networking.v1alpha3.OutlierDetection)
OutlierDetectionOrBuilder {
private static final long serialVersionUID = 0L;
// Use OutlierDetection.newBuilder() to construct.
private OutlierDetection(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private OutlierDetection() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new OutlierDetection();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private OutlierDetection(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
consecutiveErrors_ = input.readInt32();
break;
}
case 18: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (interval_ != null) {
subBuilder = interval_.toBuilder();
}
interval_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(interval_);
interval_ = subBuilder.buildPartial();
}
break;
}
case 26: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (baseEjectionTime_ != null) {
subBuilder = baseEjectionTime_.toBuilder();
}
baseEjectionTime_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(baseEjectionTime_);
baseEjectionTime_ = subBuilder.buildPartial();
}
break;
}
case 32: {
maxEjectionPercent_ = input.readInt32();
break;
}
case 40: {
minHealthPercent_ = input.readInt32();
break;
}
case 50: {
com.google.protobuf.UInt32Value.Builder subBuilder = null;
if (consecutiveGatewayErrors_ != null) {
subBuilder = consecutiveGatewayErrors_.toBuilder();
}
consecutiveGatewayErrors_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(consecutiveGatewayErrors_);
consecutiveGatewayErrors_ = subBuilder.buildPartial();
}
break;
}
case 58: {
com.google.protobuf.UInt32Value.Builder subBuilder = null;
if (consecutive5XxErrors_ != null) {
subBuilder = consecutive5XxErrors_.toBuilder();
}
consecutive5XxErrors_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(consecutive5XxErrors_);
consecutive5XxErrors_ = subBuilder.buildPartial();
}
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.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_OutlierDetection_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_OutlierDetection_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.class, istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.Builder.class);
}
public static final int CONSECUTIVE_ERRORS_FIELD_NUMBER = 1;
private int consecutiveErrors_;
/**
*
* Number of errors before a host is ejected from the connection
* pool. Defaults to 5. When the upstream host is accessed over HTTP, a
* 502, 503, or 504 return code qualifies as an error. When the upstream host
* is accessed over an opaque TCP connection, connect timeouts and
* connection error/failure events qualify as an error.
* $hide_from_docs
*
*
* int32 consecutive_errors = 1 [deprecated = true];
*/
@java.lang.Deprecated public int getConsecutiveErrors() {
return consecutiveErrors_;
}
public static final int CONSECUTIVE_GATEWAY_ERRORS_FIELD_NUMBER = 6;
private com.google.protobuf.UInt32Value consecutiveGatewayErrors_;
/**
*
* Number of gateway errors before a host is ejected from the connection pool.
* When the upstream host is accessed over HTTP, a 502, 503, or 504 return
* code qualifies as a gateway error. When the upstream host is accessed over
* an opaque TCP connection, connect timeouts and connection error/failure
* events qualify as a gateway error.
* This feature is disabled by default or when set to the value 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Number of gateway errors before a host is ejected from the connection pool.
* When the upstream host is accessed over HTTP, a 502, 503, or 504 return
* code qualifies as a gateway error. When the upstream host is accessed over
* an opaque TCP connection, connect timeouts and connection error/failure
* events qualify as a gateway error.
* This feature is disabled by default or when set to the value 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Number of gateway errors before a host is ejected from the connection pool.
* When the upstream host is accessed over HTTP, a 502, 503, or 504 return
* code qualifies as a gateway error. When the upstream host is accessed over
* an opaque TCP connection, connect timeouts and connection error/failure
* events qualify as a gateway error.
* This feature is disabled by default or when set to the value 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
*
* .google.protobuf.UInt32Value consecutive_gateway_errors = 6;
*/
public com.google.protobuf.UInt32ValueOrBuilder getConsecutiveGatewayErrorsOrBuilder() {
return getConsecutiveGatewayErrors();
}
public static final int CONSECUTIVE_5XX_ERRORS_FIELD_NUMBER = 7;
private com.google.protobuf.UInt32Value consecutive5XxErrors_;
/**
*
* Number of 5xx errors before a host is ejected from the connection pool.
* When the upstream host is accessed over an opaque TCP connection, connect
* timeouts, connection error/failure and request failure events qualify as a
* 5xx error.
* This feature defaults to 5 but can be disabled by setting the value to 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Number of 5xx errors before a host is ejected from the connection pool.
* When the upstream host is accessed over an opaque TCP connection, connect
* timeouts, connection error/failure and request failure events qualify as a
* 5xx error.
* This feature defaults to 5 but can be disabled by setting the value to 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Number of 5xx errors before a host is ejected from the connection pool.
* When the upstream host is accessed over an opaque TCP connection, connect
* timeouts, connection error/failure and request failure events qualify as a
* 5xx error.
* This feature defaults to 5 but can be disabled by setting the value to 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
*
* .google.protobuf.UInt32Value consecutive_5xx_errors = 7;
*/
public com.google.protobuf.UInt32ValueOrBuilder getConsecutive5XxErrorsOrBuilder() {
return getConsecutive5XxErrors();
}
public static final int INTERVAL_FIELD_NUMBER = 2;
private com.google.protobuf.Duration interval_;
/**
*
* Time interval between ejection sweep analysis. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
* Time interval between ejection sweep analysis. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration interval = 2;
*/
public com.google.protobuf.DurationOrBuilder getIntervalOrBuilder() {
return getInterval();
}
public static final int BASE_EJECTION_TIME_FIELD_NUMBER = 3;
private com.google.protobuf.Duration baseEjectionTime_;
/**
*
* Minimum ejection duration. A host will remain ejected for a period
* equal to the product of minimum ejection duration and the number of
* times the host has been ejected. This technique allows the system to
* automatically increase the ejection period for unhealthy upstream
* servers. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 30s.
*
* Minimum ejection duration. A host will remain ejected for a period
* equal to the product of minimum ejection duration and the number of
* times the host has been ejected. This technique allows the system to
* automatically increase the ejection period for unhealthy upstream
* servers. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 30s.
*
* Minimum ejection duration. A host will remain ejected for a period
* equal to the product of minimum ejection duration and the number of
* times the host has been ejected. This technique allows the system to
* automatically increase the ejection period for unhealthy upstream
* servers. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 30s.
*
*
* .google.protobuf.Duration base_ejection_time = 3;
*/
public com.google.protobuf.DurationOrBuilder getBaseEjectionTimeOrBuilder() {
return getBaseEjectionTime();
}
public static final int MAX_EJECTION_PERCENT_FIELD_NUMBER = 4;
private int maxEjectionPercent_;
/**
*
* Maximum % of hosts in the load balancing pool for the upstream
* service that can be ejected. Defaults to 10%.
*
*
* int32 max_ejection_percent = 4;
*/
public int getMaxEjectionPercent() {
return maxEjectionPercent_;
}
public static final int MIN_HEALTH_PERCENT_FIELD_NUMBER = 5;
private int minHealthPercent_;
/**
*
* Outlier detection will be enabled as long as the associated load balancing
* pool has at least min_health_percent hosts in healthy mode. When the
* percentage of healthy hosts in the load balancing pool drops below this
* threshold, outlier detection will be disabled and the proxy will load balance
* across all hosts in the pool (healthy and unhealthy). The threshold can be
* disabled by setting it to 0%. The default is 0% as it's not typically
* applicable in k8s environments with few pods per service.
*
*
* int32 min_health_percent = 5;
*/
public int getMinHealthPercent() {
return minHealthPercent_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (consecutiveErrors_ != 0) {
output.writeInt32(1, consecutiveErrors_);
}
if (interval_ != null) {
output.writeMessage(2, getInterval());
}
if (baseEjectionTime_ != null) {
output.writeMessage(3, getBaseEjectionTime());
}
if (maxEjectionPercent_ != 0) {
output.writeInt32(4, maxEjectionPercent_);
}
if (minHealthPercent_ != 0) {
output.writeInt32(5, minHealthPercent_);
}
if (consecutiveGatewayErrors_ != null) {
output.writeMessage(6, getConsecutiveGatewayErrors());
}
if (consecutive5XxErrors_ != null) {
output.writeMessage(7, getConsecutive5XxErrors());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (consecutiveErrors_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, consecutiveErrors_);
}
if (interval_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getInterval());
}
if (baseEjectionTime_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getBaseEjectionTime());
}
if (maxEjectionPercent_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(4, maxEjectionPercent_);
}
if (minHealthPercent_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(5, minHealthPercent_);
}
if (consecutiveGatewayErrors_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getConsecutiveGatewayErrors());
}
if (consecutive5XxErrors_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getConsecutive5XxErrors());
}
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 istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection)) {
return super.equals(obj);
}
istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection other = (istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection) obj;
if (getConsecutiveErrors()
!= other.getConsecutiveErrors()) return false;
if (hasConsecutiveGatewayErrors() != other.hasConsecutiveGatewayErrors()) return false;
if (hasConsecutiveGatewayErrors()) {
if (!getConsecutiveGatewayErrors()
.equals(other.getConsecutiveGatewayErrors())) return false;
}
if (hasConsecutive5XxErrors() != other.hasConsecutive5XxErrors()) return false;
if (hasConsecutive5XxErrors()) {
if (!getConsecutive5XxErrors()
.equals(other.getConsecutive5XxErrors())) return false;
}
if (hasInterval() != other.hasInterval()) return false;
if (hasInterval()) {
if (!getInterval()
.equals(other.getInterval())) return false;
}
if (hasBaseEjectionTime() != other.hasBaseEjectionTime()) return false;
if (hasBaseEjectionTime()) {
if (!getBaseEjectionTime()
.equals(other.getBaseEjectionTime())) return false;
}
if (getMaxEjectionPercent()
!= other.getMaxEjectionPercent()) return false;
if (getMinHealthPercent()
!= other.getMinHealthPercent()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CONSECUTIVE_ERRORS_FIELD_NUMBER;
hash = (53 * hash) + getConsecutiveErrors();
if (hasConsecutiveGatewayErrors()) {
hash = (37 * hash) + CONSECUTIVE_GATEWAY_ERRORS_FIELD_NUMBER;
hash = (53 * hash) + getConsecutiveGatewayErrors().hashCode();
}
if (hasConsecutive5XxErrors()) {
hash = (37 * hash) + CONSECUTIVE_5XX_ERRORS_FIELD_NUMBER;
hash = (53 * hash) + getConsecutive5XxErrors().hashCode();
}
if (hasInterval()) {
hash = (37 * hash) + INTERVAL_FIELD_NUMBER;
hash = (53 * hash) + getInterval().hashCode();
}
if (hasBaseEjectionTime()) {
hash = (37 * hash) + BASE_EJECTION_TIME_FIELD_NUMBER;
hash = (53 * hash) + getBaseEjectionTime().hashCode();
}
hash = (37 * hash) + MAX_EJECTION_PERCENT_FIELD_NUMBER;
hash = (53 * hash) + getMaxEjectionPercent();
hash = (37 * hash) + MIN_HEALTH_PERCENT_FIELD_NUMBER;
hash = (53 * hash) + getMinHealthPercent();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection 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 istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection 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 istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection 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(istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection 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;
}
/**
*
* A Circuit breaker implementation that tracks the status of each
* individual host in the upstream service. Applicable to both HTTP and
* TCP services. For HTTP services, hosts that continually return 5xx
* errors for API calls are ejected from the pool for a pre-defined period
* of time. For TCP services, connection timeouts or connection
* failures to a given host counts as an error when measuring the
* consecutive errors metric. See Envoy's [outlier
* detection](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/outlier)
* for more details.
* The following rule sets a connection pool size of 100 HTTP1 connections
* with no more than 10 req/connection to the "reviews" service. In addition,
* it sets a limit of 1000 concurrent HTTP2 requests and configures upstream
* hosts to be scanned every 5 mins so that any host that fails 7 consecutive
* times with a 502, 503, or 504 error code will be ejected for 15 minutes.
* {{<tabset category-name="example">}}
* {{<tab name="v1alpha3" category-value="v1alpha3">}}
* ```yaml
* apiVersion: networking.istio.io/v1alpha3
* kind: DestinationRule
* metadata:
* name: reviews-cb-policy
* spec:
* host: reviews.prod.svc.cluster.local
* trafficPolicy:
* connectionPool:
* tcp:
* maxConnections: 100
* http:
* http2MaxRequests: 1000
* maxRequestsPerConnection: 10
* outlierDetection:
* consecutiveErrors: 7
* interval: 5m
* baseEjectionTime: 15m
* ```
* {{</tab>}}
* {{<tab name="v1beta1" category-value="v1beta1">}}
* ```yaml
* apiVersion: networking.istio.io/v1beta1
* kind: DestinationRule
* metadata:
* name: reviews-cb-policy
* spec:
* host: reviews.prod.svc.cluster.local
* trafficPolicy:
* connectionPool:
* tcp:
* maxConnections: 100
* http:
* http2MaxRequests: 1000
* maxRequestsPerConnection: 10
* outlierDetection:
* consecutiveErrors: 7
* interval: 5m
* baseEjectionTime: 15m
* ```
* {{</tab>}}
* {{</tabset>}}
*
* Number of errors before a host is ejected from the connection
* pool. Defaults to 5. When the upstream host is accessed over HTTP, a
* 502, 503, or 504 return code qualifies as an error. When the upstream host
* is accessed over an opaque TCP connection, connect timeouts and
* connection error/failure events qualify as an error.
* $hide_from_docs
*
*
* int32 consecutive_errors = 1 [deprecated = true];
*/
@java.lang.Deprecated public int getConsecutiveErrors() {
return consecutiveErrors_;
}
/**
*
* Number of errors before a host is ejected from the connection
* pool. Defaults to 5. When the upstream host is accessed over HTTP, a
* 502, 503, or 504 return code qualifies as an error. When the upstream host
* is accessed over an opaque TCP connection, connect timeouts and
* connection error/failure events qualify as an error.
* $hide_from_docs
*
* Number of errors before a host is ejected from the connection
* pool. Defaults to 5. When the upstream host is accessed over HTTP, a
* 502, 503, or 504 return code qualifies as an error. When the upstream host
* is accessed over an opaque TCP connection, connect timeouts and
* connection error/failure events qualify as an error.
* $hide_from_docs
*
* Number of gateway errors before a host is ejected from the connection pool.
* When the upstream host is accessed over HTTP, a 502, 503, or 504 return
* code qualifies as a gateway error. When the upstream host is accessed over
* an opaque TCP connection, connect timeouts and connection error/failure
* events qualify as a gateway error.
* This feature is disabled by default or when set to the value 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Number of gateway errors before a host is ejected from the connection pool.
* When the upstream host is accessed over HTTP, a 502, 503, or 504 return
* code qualifies as a gateway error. When the upstream host is accessed over
* an opaque TCP connection, connect timeouts and connection error/failure
* events qualify as a gateway error.
* This feature is disabled by default or when set to the value 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Number of gateway errors before a host is ejected from the connection pool.
* When the upstream host is accessed over HTTP, a 502, 503, or 504 return
* code qualifies as a gateway error. When the upstream host is accessed over
* an opaque TCP connection, connect timeouts and connection error/failure
* events qualify as a gateway error.
* This feature is disabled by default or when set to the value 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
*
* .google.protobuf.UInt32Value consecutive_gateway_errors = 6;
*/
public Builder setConsecutiveGatewayErrors(com.google.protobuf.UInt32Value value) {
if (consecutiveGatewayErrorsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
consecutiveGatewayErrors_ = value;
onChanged();
} else {
consecutiveGatewayErrorsBuilder_.setMessage(value);
}
return this;
}
/**
*
* Number of gateway errors before a host is ejected from the connection pool.
* When the upstream host is accessed over HTTP, a 502, 503, or 504 return
* code qualifies as a gateway error. When the upstream host is accessed over
* an opaque TCP connection, connect timeouts and connection error/failure
* events qualify as a gateway error.
* This feature is disabled by default or when set to the value 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Number of gateway errors before a host is ejected from the connection pool.
* When the upstream host is accessed over HTTP, a 502, 503, or 504 return
* code qualifies as a gateway error. When the upstream host is accessed over
* an opaque TCP connection, connect timeouts and connection error/failure
* events qualify as a gateway error.
* This feature is disabled by default or when set to the value 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Number of gateway errors before a host is ejected from the connection pool.
* When the upstream host is accessed over HTTP, a 502, 503, or 504 return
* code qualifies as a gateway error. When the upstream host is accessed over
* an opaque TCP connection, connect timeouts and connection error/failure
* events qualify as a gateway error.
* This feature is disabled by default or when set to the value 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Number of gateway errors before a host is ejected from the connection pool.
* When the upstream host is accessed over HTTP, a 502, 503, or 504 return
* code qualifies as a gateway error. When the upstream host is accessed over
* an opaque TCP connection, connect timeouts and connection error/failure
* events qualify as a gateway error.
* This feature is disabled by default or when set to the value 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Number of gateway errors before a host is ejected from the connection pool.
* When the upstream host is accessed over HTTP, a 502, 503, or 504 return
* code qualifies as a gateway error. When the upstream host is accessed over
* an opaque TCP connection, connect timeouts and connection error/failure
* events qualify as a gateway error.
* This feature is disabled by default or when set to the value 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Number of gateway errors before a host is ejected from the connection pool.
* When the upstream host is accessed over HTTP, a 502, 503, or 504 return
* code qualifies as a gateway error. When the upstream host is accessed over
* an opaque TCP connection, connect timeouts and connection error/failure
* events qualify as a gateway error.
* This feature is disabled by default or when set to the value 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Number of 5xx errors before a host is ejected from the connection pool.
* When the upstream host is accessed over an opaque TCP connection, connect
* timeouts, connection error/failure and request failure events qualify as a
* 5xx error.
* This feature defaults to 5 but can be disabled by setting the value to 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Number of 5xx errors before a host is ejected from the connection pool.
* When the upstream host is accessed over an opaque TCP connection, connect
* timeouts, connection error/failure and request failure events qualify as a
* 5xx error.
* This feature defaults to 5 but can be disabled by setting the value to 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Number of 5xx errors before a host is ejected from the connection pool.
* When the upstream host is accessed over an opaque TCP connection, connect
* timeouts, connection error/failure and request failure events qualify as a
* 5xx error.
* This feature defaults to 5 but can be disabled by setting the value to 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
*
* .google.protobuf.UInt32Value consecutive_5xx_errors = 7;
*/
public Builder setConsecutive5XxErrors(com.google.protobuf.UInt32Value value) {
if (consecutive5XxErrorsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
consecutive5XxErrors_ = value;
onChanged();
} else {
consecutive5XxErrorsBuilder_.setMessage(value);
}
return this;
}
/**
*
* Number of 5xx errors before a host is ejected from the connection pool.
* When the upstream host is accessed over an opaque TCP connection, connect
* timeouts, connection error/failure and request failure events qualify as a
* 5xx error.
* This feature defaults to 5 but can be disabled by setting the value to 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Number of 5xx errors before a host is ejected from the connection pool.
* When the upstream host is accessed over an opaque TCP connection, connect
* timeouts, connection error/failure and request failure events qualify as a
* 5xx error.
* This feature defaults to 5 but can be disabled by setting the value to 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Number of 5xx errors before a host is ejected from the connection pool.
* When the upstream host is accessed over an opaque TCP connection, connect
* timeouts, connection error/failure and request failure events qualify as a
* 5xx error.
* This feature defaults to 5 but can be disabled by setting the value to 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Number of 5xx errors before a host is ejected from the connection pool.
* When the upstream host is accessed over an opaque TCP connection, connect
* timeouts, connection error/failure and request failure events qualify as a
* 5xx error.
* This feature defaults to 5 but can be disabled by setting the value to 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Number of 5xx errors before a host is ejected from the connection pool.
* When the upstream host is accessed over an opaque TCP connection, connect
* timeouts, connection error/failure and request failure events qualify as a
* 5xx error.
* This feature defaults to 5 but can be disabled by setting the value to 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Number of 5xx errors before a host is ejected from the connection pool.
* When the upstream host is accessed over an opaque TCP connection, connect
* timeouts, connection error/failure and request failure events qualify as a
* 5xx error.
* This feature defaults to 5 but can be disabled by setting the value to 0.
* Note that consecutive_gateway_errors and consecutive_5xx_errors can be
* used separately or together. Because the errors counted by
* consecutive_gateway_errors are also included in consecutive_5xx_errors,
* if the value of consecutive_gateway_errors is greater than or equal to
* the value of consecutive_5xx_errors, consecutive_gateway_errors will have
* no effect.
*
* Minimum ejection duration. A host will remain ejected for a period
* equal to the product of minimum ejection duration and the number of
* times the host has been ejected. This technique allows the system to
* automatically increase the ejection period for unhealthy upstream
* servers. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 30s.
*
* Minimum ejection duration. A host will remain ejected for a period
* equal to the product of minimum ejection duration and the number of
* times the host has been ejected. This technique allows the system to
* automatically increase the ejection period for unhealthy upstream
* servers. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 30s.
*
* Minimum ejection duration. A host will remain ejected for a period
* equal to the product of minimum ejection duration and the number of
* times the host has been ejected. This technique allows the system to
* automatically increase the ejection period for unhealthy upstream
* servers. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 30s.
*
*
* .google.protobuf.Duration base_ejection_time = 3;
*/
public Builder setBaseEjectionTime(com.google.protobuf.Duration value) {
if (baseEjectionTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
baseEjectionTime_ = value;
onChanged();
} else {
baseEjectionTimeBuilder_.setMessage(value);
}
return this;
}
/**
*
* Minimum ejection duration. A host will remain ejected for a period
* equal to the product of minimum ejection duration and the number of
* times the host has been ejected. This technique allows the system to
* automatically increase the ejection period for unhealthy upstream
* servers. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 30s.
*
* Minimum ejection duration. A host will remain ejected for a period
* equal to the product of minimum ejection duration and the number of
* times the host has been ejected. This technique allows the system to
* automatically increase the ejection period for unhealthy upstream
* servers. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 30s.
*
* Minimum ejection duration. A host will remain ejected for a period
* equal to the product of minimum ejection duration and the number of
* times the host has been ejected. This technique allows the system to
* automatically increase the ejection period for unhealthy upstream
* servers. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 30s.
*
* Minimum ejection duration. A host will remain ejected for a period
* equal to the product of minimum ejection duration and the number of
* times the host has been ejected. This technique allows the system to
* automatically increase the ejection period for unhealthy upstream
* servers. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 30s.
*
* Minimum ejection duration. A host will remain ejected for a period
* equal to the product of minimum ejection duration and the number of
* times the host has been ejected. This technique allows the system to
* automatically increase the ejection period for unhealthy upstream
* servers. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 30s.
*
* Minimum ejection duration. A host will remain ejected for a period
* equal to the product of minimum ejection duration and the number of
* times the host has been ejected. This technique allows the system to
* automatically increase the ejection period for unhealthy upstream
* servers. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 30s.
*
* Outlier detection will be enabled as long as the associated load balancing
* pool has at least min_health_percent hosts in healthy mode. When the
* percentage of healthy hosts in the load balancing pool drops below this
* threshold, outlier detection will be disabled and the proxy will load balance
* across all hosts in the pool (healthy and unhealthy). The threshold can be
* disabled by setting it to 0%. The default is 0% as it's not typically
* applicable in k8s environments with few pods per service.
*
*
* int32 min_health_percent = 5;
*/
public int getMinHealthPercent() {
return minHealthPercent_;
}
/**
*
* Outlier detection will be enabled as long as the associated load balancing
* pool has at least min_health_percent hosts in healthy mode. When the
* percentage of healthy hosts in the load balancing pool drops below this
* threshold, outlier detection will be disabled and the proxy will load balance
* across all hosts in the pool (healthy and unhealthy). The threshold can be
* disabled by setting it to 0%. The default is 0% as it's not typically
* applicable in k8s environments with few pods per service.
*
* Outlier detection will be enabled as long as the associated load balancing
* pool has at least min_health_percent hosts in healthy mode. When the
* percentage of healthy hosts in the load balancing pool drops below this
* threshold, outlier detection will be disabled and the proxy will load balance
* across all hosts in the pool (healthy and unhealthy). The threshold can be
* disabled by setting it to 0%. The default is 0% as it's not typically
* applicable in k8s environments with few pods per service.
*
*
* int32 min_health_percent = 5;
*/
public Builder clearMinHealthPercent() {
minHealthPercent_ = 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.OutlierDetection)
}
// @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.OutlierDetection)
private static final istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection();
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public OutlierDetection parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new OutlierDetection(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.DestinationRuleOuterClass.OutlierDetection getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ClientTLSSettingsOrBuilder extends
// @@protoc_insertion_point(interface_extends:istio.networking.v1alpha3.ClientTLSSettings)
com.google.protobuf.MessageOrBuilder {
/**
*
* Indicates whether connections to this port should be secured
* using TLS. The value of this field determines how TLS is enforced.
*
* OPTIONAL: The path to the file containing certificate authority
* certificates to use in verifying a presented server certificate. If
* omitted, the proxy will not verify the server's certificate.
* Should be empty if mode is `ISTIO_MUTUAL`.
*
* OPTIONAL: The path to the file containing certificate authority
* certificates to use in verifying a presented server certificate. If
* omitted, the proxy will not verify the server's certificate.
* Should be empty if mode is `ISTIO_MUTUAL`.
*
* The name of the secret that holds the TLS certs for the
* client including the CA certificates. Secret must exist in the
* same namespace with the proxy using the certificates.
* The secret (of type `generic`)should contain the
* following keys and values: `key: <privateKey>`,
* `cert: <serverCert>`, `cacert: <CACertificate>`.
* Secret of type tls for client certificates along with
* ca.crt key for CA certificates is also supported.
* Only one of client certificates and CA certificate
* or credentialName can be specified.
* **NOTE:** This field is currently applicable only at gateways.
* Sidecars will continue to use the certificate paths.
*
* The name of the secret that holds the TLS certs for the
* client including the CA certificates. Secret must exist in the
* same namespace with the proxy using the certificates.
* The secret (of type `generic`)should contain the
* following keys and values: `key: <privateKey>`,
* `cert: <serverCert>`, `cacert: <CACertificate>`.
* Secret of type tls for client certificates along with
* ca.crt key for CA certificates is also supported.
* Only one of client certificates and CA certificate
* or credentialName can be specified.
* **NOTE:** This field is currently applicable only at gateways.
* Sidecars will continue to use the certificate paths.
*
* A list of alternate names to verify the subject identity in the
* certificate. If specified, the proxy will verify that the server
* certificate's subject alt name matches one of the specified values.
* If specified, this list overrides the value of subject_alt_names
* from the ServiceEntry.
*
* A list of alternate names to verify the subject identity in the
* certificate. If specified, the proxy will verify that the server
* certificate's subject alt name matches one of the specified values.
* If specified, this list overrides the value of subject_alt_names
* from the ServiceEntry.
*
* A list of alternate names to verify the subject identity in the
* certificate. If specified, the proxy will verify that the server
* certificate's subject alt name matches one of the specified values.
* If specified, this list overrides the value of subject_alt_names
* from the ServiceEntry.
*
* A list of alternate names to verify the subject identity in the
* certificate. If specified, the proxy will verify that the server
* certificate's subject alt name matches one of the specified values.
* If specified, this list overrides the value of subject_alt_names
* from the ServiceEntry.
*
* Do not setup a TLS connection to the upstream endpoint.
*
*
* DISABLE = 0;
*/
DISABLE(0),
/**
*
* Originate a TLS connection to the upstream endpoint.
*
*
* SIMPLE = 1;
*/
SIMPLE(1),
/**
*
* Secure connections to the upstream using mutual TLS by presenting
* client certificates for authentication.
*
*
* MUTUAL = 2;
*/
MUTUAL(2),
/**
*
* Secure connections to the upstream using mutual TLS by presenting
* client certificates for authentication.
* Compared to Mutual mode, this mode uses certificates generated
* automatically by Istio for mTLS authentication. When this mode is
* used, all other fields in `ClientTLSSettings` should be empty.
*
* Do not setup a TLS connection to the upstream endpoint.
*
*
* DISABLE = 0;
*/
public static final int DISABLE_VALUE = 0;
/**
*
* Originate a TLS connection to the upstream endpoint.
*
*
* SIMPLE = 1;
*/
public static final int SIMPLE_VALUE = 1;
/**
*
* Secure connections to the upstream using mutual TLS by presenting
* client certificates for authentication.
*
*
* MUTUAL = 2;
*/
public static final int MUTUAL_VALUE = 2;
/**
*
* Secure connections to the upstream using mutual TLS by presenting
* client certificates for authentication.
* Compared to Mutual mode, this mode uses certificates generated
* automatically by Istio for mTLS authentication. When this mode is
* used, all other fields in `ClientTLSSettings` should be empty.
*
*
* ISTIO_MUTUAL = 3;
*/
public static final int ISTIO_MUTUAL_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static TLSmode valueOf(int value) {
return forNumber(value);
}
public static TLSmode forNumber(int value) {
switch (value) {
case 0: return DISABLE;
case 1: return SIMPLE;
case 2: return MUTUAL;
case 3: return ISTIO_MUTUAL;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
TLSmode> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public TLSmode findValueByNumber(int number) {
return TLSmode.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 istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.getDescriptor().getEnumTypes().get(0);
}
private static final TLSmode[] VALUES = values();
public static TLSmode 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 TLSmode(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:istio.networking.v1alpha3.ClientTLSSettings.TLSmode)
}
public static final int MODE_FIELD_NUMBER = 1;
private int mode_;
/**
*
* Indicates whether connections to this port should be secured
* using TLS. The value of this field determines how TLS is enforced.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings.TLSmode mode = 1 [(.google.api.field_behavior) = REQUIRED];
*/
public int getModeValue() {
return mode_;
}
/**
*
* Indicates whether connections to this port should be secured
* using TLS. The value of this field determines how TLS is enforced.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings.TLSmode mode = 1 [(.google.api.field_behavior) = REQUIRED];
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.TLSmode getMode() {
@SuppressWarnings("deprecation")
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.TLSmode result = istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.TLSmode.valueOf(mode_);
return result == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.TLSmode.UNRECOGNIZED : result;
}
public static final int CLIENT_CERTIFICATE_FIELD_NUMBER = 2;
private volatile java.lang.Object clientCertificate_;
/**
*
* REQUIRED if mode is `MUTUAL`. The path to the file holding the
* client-side TLS certificate to use.
* Should be empty if mode is `ISTIO_MUTUAL`.
*
* REQUIRED if mode is `MUTUAL`. The path to the file holding the
* client's private key.
* Should be empty if mode is `ISTIO_MUTUAL`.
*
*
* string private_key = 3;
*/
public com.google.protobuf.ByteString
getPrivateKeyBytes() {
java.lang.Object ref = privateKey_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
privateKey_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CA_CERTIFICATES_FIELD_NUMBER = 4;
private volatile java.lang.Object caCertificates_;
/**
*
* OPTIONAL: The path to the file containing certificate authority
* certificates to use in verifying a presented server certificate. If
* omitted, the proxy will not verify the server's certificate.
* Should be empty if mode is `ISTIO_MUTUAL`.
*
* OPTIONAL: The path to the file containing certificate authority
* certificates to use in verifying a presented server certificate. If
* omitted, the proxy will not verify the server's certificate.
* Should be empty if mode is `ISTIO_MUTUAL`.
*
*
* string ca_certificates = 4;
*/
public com.google.protobuf.ByteString
getCaCertificatesBytes() {
java.lang.Object ref = caCertificates_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
caCertificates_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CREDENTIAL_NAME_FIELD_NUMBER = 7;
private volatile java.lang.Object credentialName_;
/**
*
* The name of the secret that holds the TLS certs for the
* client including the CA certificates. Secret must exist in the
* same namespace with the proxy using the certificates.
* The secret (of type `generic`)should contain the
* following keys and values: `key: <privateKey>`,
* `cert: <serverCert>`, `cacert: <CACertificate>`.
* Secret of type tls for client certificates along with
* ca.crt key for CA certificates is also supported.
* Only one of client certificates and CA certificate
* or credentialName can be specified.
* **NOTE:** This field is currently applicable only at gateways.
* Sidecars will continue to use the certificate paths.
*
* The name of the secret that holds the TLS certs for the
* client including the CA certificates. Secret must exist in the
* same namespace with the proxy using the certificates.
* The secret (of type `generic`)should contain the
* following keys and values: `key: <privateKey>`,
* `cert: <serverCert>`, `cacert: <CACertificate>`.
* Secret of type tls for client certificates along with
* ca.crt key for CA certificates is also supported.
* Only one of client certificates and CA certificate
* or credentialName can be specified.
* **NOTE:** This field is currently applicable only at gateways.
* Sidecars will continue to use the certificate paths.
*
*
* string credential_name = 7;
*/
public com.google.protobuf.ByteString
getCredentialNameBytes() {
java.lang.Object ref = credentialName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
credentialName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SUBJECT_ALT_NAMES_FIELD_NUMBER = 5;
private com.google.protobuf.LazyStringList subjectAltNames_;
/**
*
* A list of alternate names to verify the subject identity in the
* certificate. If specified, the proxy will verify that the server
* certificate's subject alt name matches one of the specified values.
* If specified, this list overrides the value of subject_alt_names
* from the ServiceEntry.
*
* A list of alternate names to verify the subject identity in the
* certificate. If specified, the proxy will verify that the server
* certificate's subject alt name matches one of the specified values.
* If specified, this list overrides the value of subject_alt_names
* from the ServiceEntry.
*
*
* repeated string subject_alt_names = 5;
*/
public int getSubjectAltNamesCount() {
return subjectAltNames_.size();
}
/**
*
* A list of alternate names to verify the subject identity in the
* certificate. If specified, the proxy will verify that the server
* certificate's subject alt name matches one of the specified values.
* If specified, this list overrides the value of subject_alt_names
* from the ServiceEntry.
*
* A list of alternate names to verify the subject identity in the
* certificate. If specified, the proxy will verify that the server
* certificate's subject alt name matches one of the specified values.
* If specified, this list overrides the value of subject_alt_names
* from the ServiceEntry.
*
*
* repeated string subject_alt_names = 5;
*/
public com.google.protobuf.ByteString
getSubjectAltNamesBytes(int index) {
return subjectAltNames_.getByteString(index);
}
public static final int SNI_FIELD_NUMBER = 6;
private volatile java.lang.Object sni_;
/**
*
* SNI string to present to the server during TLS handshake.
*
* OPTIONAL: The path to the file containing certificate authority
* certificates to use in verifying a presented server certificate. If
* omitted, the proxy will not verify the server's certificate.
* Should be empty if mode is `ISTIO_MUTUAL`.
*
* OPTIONAL: The path to the file containing certificate authority
* certificates to use in verifying a presented server certificate. If
* omitted, the proxy will not verify the server's certificate.
* Should be empty if mode is `ISTIO_MUTUAL`.
*
* OPTIONAL: The path to the file containing certificate authority
* certificates to use in verifying a presented server certificate. If
* omitted, the proxy will not verify the server's certificate.
* Should be empty if mode is `ISTIO_MUTUAL`.
*
* OPTIONAL: The path to the file containing certificate authority
* certificates to use in verifying a presented server certificate. If
* omitted, the proxy will not verify the server's certificate.
* Should be empty if mode is `ISTIO_MUTUAL`.
*
* OPTIONAL: The path to the file containing certificate authority
* certificates to use in verifying a presented server certificate. If
* omitted, the proxy will not verify the server's certificate.
* Should be empty if mode is `ISTIO_MUTUAL`.
*
* The name of the secret that holds the TLS certs for the
* client including the CA certificates. Secret must exist in the
* same namespace with the proxy using the certificates.
* The secret (of type `generic`)should contain the
* following keys and values: `key: <privateKey>`,
* `cert: <serverCert>`, `cacert: <CACertificate>`.
* Secret of type tls for client certificates along with
* ca.crt key for CA certificates is also supported.
* Only one of client certificates and CA certificate
* or credentialName can be specified.
* **NOTE:** This field is currently applicable only at gateways.
* Sidecars will continue to use the certificate paths.
*
* The name of the secret that holds the TLS certs for the
* client including the CA certificates. Secret must exist in the
* same namespace with the proxy using the certificates.
* The secret (of type `generic`)should contain the
* following keys and values: `key: <privateKey>`,
* `cert: <serverCert>`, `cacert: <CACertificate>`.
* Secret of type tls for client certificates along with
* ca.crt key for CA certificates is also supported.
* Only one of client certificates and CA certificate
* or credentialName can be specified.
* **NOTE:** This field is currently applicable only at gateways.
* Sidecars will continue to use the certificate paths.
*
* The name of the secret that holds the TLS certs for the
* client including the CA certificates. Secret must exist in the
* same namespace with the proxy using the certificates.
* The secret (of type `generic`)should contain the
* following keys and values: `key: <privateKey>`,
* `cert: <serverCert>`, `cacert: <CACertificate>`.
* Secret of type tls for client certificates along with
* ca.crt key for CA certificates is also supported.
* Only one of client certificates and CA certificate
* or credentialName can be specified.
* **NOTE:** This field is currently applicable only at gateways.
* Sidecars will continue to use the certificate paths.
*
* The name of the secret that holds the TLS certs for the
* client including the CA certificates. Secret must exist in the
* same namespace with the proxy using the certificates.
* The secret (of type `generic`)should contain the
* following keys and values: `key: <privateKey>`,
* `cert: <serverCert>`, `cacert: <CACertificate>`.
* Secret of type tls for client certificates along with
* ca.crt key for CA certificates is also supported.
* Only one of client certificates and CA certificate
* or credentialName can be specified.
* **NOTE:** This field is currently applicable only at gateways.
* Sidecars will continue to use the certificate paths.
*
* The name of the secret that holds the TLS certs for the
* client including the CA certificates. Secret must exist in the
* same namespace with the proxy using the certificates.
* The secret (of type `generic`)should contain the
* following keys and values: `key: <privateKey>`,
* `cert: <serverCert>`, `cacert: <CACertificate>`.
* Secret of type tls for client certificates along with
* ca.crt key for CA certificates is also supported.
* Only one of client certificates and CA certificate
* or credentialName can be specified.
* **NOTE:** This field is currently applicable only at gateways.
* Sidecars will continue to use the certificate paths.
*
* A list of alternate names to verify the subject identity in the
* certificate. If specified, the proxy will verify that the server
* certificate's subject alt name matches one of the specified values.
* If specified, this list overrides the value of subject_alt_names
* from the ServiceEntry.
*
* A list of alternate names to verify the subject identity in the
* certificate. If specified, the proxy will verify that the server
* certificate's subject alt name matches one of the specified values.
* If specified, this list overrides the value of subject_alt_names
* from the ServiceEntry.
*
*
* repeated string subject_alt_names = 5;
*/
public int getSubjectAltNamesCount() {
return subjectAltNames_.size();
}
/**
*
* A list of alternate names to verify the subject identity in the
* certificate. If specified, the proxy will verify that the server
* certificate's subject alt name matches one of the specified values.
* If specified, this list overrides the value of subject_alt_names
* from the ServiceEntry.
*
* A list of alternate names to verify the subject identity in the
* certificate. If specified, the proxy will verify that the server
* certificate's subject alt name matches one of the specified values.
* If specified, this list overrides the value of subject_alt_names
* from the ServiceEntry.
*
* A list of alternate names to verify the subject identity in the
* certificate. If specified, the proxy will verify that the server
* certificate's subject alt name matches one of the specified values.
* If specified, this list overrides the value of subject_alt_names
* from the ServiceEntry.
*
*
* repeated string subject_alt_names = 5;
*/
public Builder setSubjectAltNames(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureSubjectAltNamesIsMutable();
subjectAltNames_.set(index, value);
onChanged();
return this;
}
/**
*
* A list of alternate names to verify the subject identity in the
* certificate. If specified, the proxy will verify that the server
* certificate's subject alt name matches one of the specified values.
* If specified, this list overrides the value of subject_alt_names
* from the ServiceEntry.
*
* A list of alternate names to verify the subject identity in the
* certificate. If specified, the proxy will verify that the server
* certificate's subject alt name matches one of the specified values.
* If specified, this list overrides the value of subject_alt_names
* from the ServiceEntry.
*
* A list of alternate names to verify the subject identity in the
* certificate. If specified, the proxy will verify that the server
* certificate's subject alt name matches one of the specified values.
* If specified, this list overrides the value of subject_alt_names
* from the ServiceEntry.
*
* A list of alternate names to verify the subject identity in the
* certificate. If specified, the proxy will verify that the server
* certificate's subject alt name matches one of the specified values.
* If specified, this list overrides the value of subject_alt_names
* from the ServiceEntry.
*
* SNI string to present to the server during TLS handshake.
*
*
* string sni = 6;
*/
public Builder setSniBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
sni_ = 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.ClientTLSSettings)
}
// @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.ClientTLSSettings)
private static final istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings();
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ClientTLSSettings parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ClientTLSSettings(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.DestinationRuleOuterClass.ClientTLSSettings getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface LocalityLoadBalancerSettingOrBuilder extends
// @@protoc_insertion_point(interface_extends:istio.networking.v1alpha3.LocalityLoadBalancerSetting)
com.google.protobuf.MessageOrBuilder {
/**
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
* enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety.
* e.g. true means that turn on locality load balancing for this DestinationRule no matter what mesh wide settings is.
*
* enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety.
* e.g. true means that turn on locality load balancing for this DestinationRule no matter what mesh wide settings is.
*
* enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety.
* e.g. true means that turn on locality load balancing for this DestinationRule no matter what mesh wide settings is.
*
* Locality-weighted load balancing allows administrators to control the
* distribution of traffic to endpoints based on the localities of where the
* traffic originates and where it will terminate. These localities are
* specified using arbitrary labels that designate a hierarchy of localities in
* {region}/{zone}/{sub-zone} form. For additional detail refer to
* [Locality Weight](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* The following example shows how to setup locality weights mesh-wide.
* Given a mesh with workloads and their service deployed to "us-west/zone1/*"
* and "us-west/zone2/*". This example specifies that when traffic accessing a
* service originates from workloads in "us-west/zone1/*", 80% of the traffic
* will be sent to endpoints in "us-west/zone1/*", i.e the same zone, and the
* remaining 20% will go to endpoints in "us-west/zone2/*". This setup is
* intended to favor routing traffic to endpoints in the same locality.
* A similar setting is specified for traffic originating in "us-west/zone2/*".
* ```yaml
* distribute:
* - from: us-west/zone1/*
* to:
* "us-west/zone1/*": 80
* "us-west/zone2/*": 20
* - from: us-west/zone2/*
* to:
* "us-west/zone1/*": 20
* "us-west/zone2/*": 80
* ```
* If the goal of the operator is not to distribute load across zones and
* regions but rather to restrict the regionality of failover to meet other
* operational requirements an operator can set a 'failover' policy instead of
* a 'distribute' policy.
* The following example sets up a locality failover policy for regions.
* Assume a service resides in zones within us-east, us-west & eu-west
* this example specifies that when endpoints within us-east become unhealthy
* traffic should failover to endpoints in any zone or sub-zone within eu-west
* and similarly us-west should failover to us-east.
* ```yaml
* failover:
* - from: us-east
* to: eu-west
* - from: us-west
* to: us-east
* ```
* Locality load balancing settings.
*
*
* Protobuf type {@code istio.networking.v1alpha3.LocalityLoadBalancerSetting}
*/
public static final class LocalityLoadBalancerSetting extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:istio.networking.v1alpha3.LocalityLoadBalancerSetting)
LocalityLoadBalancerSettingOrBuilder {
private static final long serialVersionUID = 0L;
// Use LocalityLoadBalancerSetting.newBuilder() to construct.
private LocalityLoadBalancerSetting(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LocalityLoadBalancerSetting() {
distribute_ = java.util.Collections.emptyList();
failover_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new LocalityLoadBalancerSetting();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private LocalityLoadBalancerSetting(
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: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
distribute_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
distribute_.add(
input.readMessage(istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute.parser(), extensionRegistry));
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
failover_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
failover_.add(
input.readMessage(istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover.parser(), extensionRegistry));
break;
}
case 26: {
com.google.protobuf.BoolValue.Builder subBuilder = null;
if (enabled_ != null) {
subBuilder = enabled_.toBuilder();
}
enabled_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(enabled_);
enabled_ = subBuilder.buildPartial();
}
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)) {
distribute_ = java.util.Collections.unmodifiableList(distribute_);
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
failover_ = java.util.Collections.unmodifiableList(failover_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.class, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Builder.class);
}
public interface DistributeOrBuilder extends
// @@protoc_insertion_point(interface_extends:istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute)
com.google.protobuf.MessageOrBuilder {
/**
*
* Originating locality, '/' separated, e.g. 'region/zone/sub_zone'.
*
* Map of upstream localities to traffic distribution weights. The sum of
* all weights should be 100. Any locality not present will
* receive no traffic.
*
*
* map<string, uint32> to = 2;
*/
int getToCount();
/**
*
* Map of upstream localities to traffic distribution weights. The sum of
* all weights should be 100. Any locality not present will
* receive no traffic.
*
* Map of upstream localities to traffic distribution weights. The sum of
* all weights should be 100. Any locality not present will
* receive no traffic.
*
* Map of upstream localities to traffic distribution weights. The sum of
* all weights should be 100. Any locality not present will
* receive no traffic.
*
*
* map<string, uint32> to = 2;
*/
int getToOrDefault(
java.lang.String key,
int defaultValue);
/**
*
* Map of upstream localities to traffic distribution weights. The sum of
* all weights should be 100. Any locality not present will
* receive no traffic.
*
*
* map<string, uint32> to = 2;
*/
int getToOrThrow(
java.lang.String key);
}
/**
*
* Describes how traffic originating in the 'from' zone or sub-zone is
* distributed over a set of 'to' zones. Syntax for specifying a zone is
* {region}/{zone}/{sub-zone} and terminal wildcards are allowed on any
* segment of the specification. Examples:
* `*` - matches all localities
* `us-west/*` - all zones and sub-zones within the us-west region
* `us-west/zone-1/*` - all sub-zones within us-west/zone-1
*
*
* Protobuf type {@code istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute}
*/
public static final class Distribute extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute)
DistributeOrBuilder {
private static final long serialVersionUID = 0L;
// Use Distribute.newBuilder() to construct.
private Distribute(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Distribute() {
from_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Distribute();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Distribute(
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();
from_ = s;
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
to_ = com.google.protobuf.MapField.newMapField(
ToDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
to__ = input.readMessage(
ToDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
to_.getMutableMap().put(
to__.getKey(), to__.getValue());
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.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Distribute_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
return internalGetTo();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Distribute_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute.class, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute.Builder.class);
}
public static final int FROM_FIELD_NUMBER = 1;
private volatile java.lang.Object from_;
/**
*
* Originating locality, '/' separated, e.g. 'region/zone/sub_zone'.
*
* Originating locality, '/' separated, e.g. 'region/zone/sub_zone'.
*
*
* string from = 1;
*/
public com.google.protobuf.ByteString
getFromBytes() {
java.lang.Object ref = from_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
from_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TO_FIELD_NUMBER = 2;
private static final class ToDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.Integer> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Distribute_ToEntry_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> to_;
private com.google.protobuf.MapField
internalGetTo() {
if (to_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ToDefaultEntryHolder.defaultEntry);
}
return to_;
}
public int getToCount() {
return internalGetTo().getMap().size();
}
/**
*
* Map of upstream localities to traffic distribution weights. The sum of
* all weights should be 100. Any locality not present will
* receive no traffic.
*
*
* map<string, uint32> to = 2;
*/
public boolean containsTo(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetTo().getMap().containsKey(key);
}
/**
* Use {@link #getToMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getTo() {
return getToMap();
}
/**
*
* Map of upstream localities to traffic distribution weights. The sum of
* all weights should be 100. Any locality not present will
* receive no traffic.
*
*
* map<string, uint32> to = 2;
*/
public java.util.Map getToMap() {
return internalGetTo().getMap();
}
/**
*
* Map of upstream localities to traffic distribution weights. The sum of
* all weights should be 100. Any locality not present will
* receive no traffic.
*
*
* map<string, uint32> to = 2;
*/
public int getToOrDefault(
java.lang.String key,
int defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetTo().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Map of upstream localities to traffic distribution weights. The sum of
* all weights should be 100. Any locality not present will
* receive no traffic.
*
*
* map<string, uint32> to = 2;
*/
public int getToOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetTo().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getFromBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, from_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetTo(),
ToDefaultEntryHolder.defaultEntry,
2);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getFromBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, from_);
}
for (java.util.Map.Entry entry
: internalGetTo().getMap().entrySet()) {
com.google.protobuf.MapEntry
to__ = ToDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, to__);
}
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 istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute)) {
return super.equals(obj);
}
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute other = (istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute) obj;
if (!getFrom()
.equals(other.getFrom())) return false;
if (!internalGetTo().equals(
other.internalGetTo())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + FROM_FIELD_NUMBER;
hash = (53 * hash) + getFrom().hashCode();
if (!internalGetTo().getMap().isEmpty()) {
hash = (37 * hash) + TO_FIELD_NUMBER;
hash = (53 * hash) + internalGetTo().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute 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 istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute 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 istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute 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(istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute 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;
}
/**
*
* Describes how traffic originating in the 'from' zone or sub-zone is
* distributed over a set of 'to' zones. Syntax for specifying a zone is
* {region}/{zone}/{sub-zone} and terminal wildcards are allowed on any
* segment of the specification. Examples:
* `*` - matches all localities
* `us-west/*` - all zones and sub-zones within the us-west region
* `us-west/zone-1/*` - all sub-zones within us-west/zone-1
*
*
* Protobuf type {@code istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute)
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.DistributeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Distribute_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
return internalGetTo();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 2:
return internalGetMutableTo();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Distribute_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute.class, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute.Builder.class);
}
// Construct using istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute.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();
from_ = "";
internalGetMutableTo().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Distribute_descriptor;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute getDefaultInstanceForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute.getDefaultInstance();
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute build() {
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute buildPartial() {
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute result = new istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute(this);
int from_bitField0_ = bitField0_;
result.from_ = from_;
result.to_ = internalGetTo();
result.to_.makeImmutable();
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.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute) {
return mergeFrom((istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute other) {
if (other == istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute.getDefaultInstance()) return this;
if (!other.getFrom().isEmpty()) {
from_ = other.from_;
onChanged();
}
internalGetMutableTo().mergeFrom(
other.internalGetTo());
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.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object from_ = "";
/**
*
* Originating locality, '/' separated, e.g. 'region/zone/sub_zone'.
*
* Originating locality, '/' separated, e.g. 'region/zone/sub_zone'.
*
*
* string from = 1;
*/
public Builder setFrom(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
from_ = value;
onChanged();
return this;
}
/**
*
* Originating locality, '/' separated, e.g. 'region/zone/sub_zone'.
*
*
* string from = 1;
*/
public Builder clearFrom() {
from_ = getDefaultInstance().getFrom();
onChanged();
return this;
}
/**
*
* Originating locality, '/' separated, e.g. 'region/zone/sub_zone'.
*
*
* string from = 1;
*/
public Builder setFromBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
from_ = value;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.Integer> to_;
private com.google.protobuf.MapField
internalGetTo() {
if (to_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ToDefaultEntryHolder.defaultEntry);
}
return to_;
}
private com.google.protobuf.MapField
internalGetMutableTo() {
onChanged();;
if (to_ == null) {
to_ = com.google.protobuf.MapField.newMapField(
ToDefaultEntryHolder.defaultEntry);
}
if (!to_.isMutable()) {
to_ = to_.copy();
}
return to_;
}
public int getToCount() {
return internalGetTo().getMap().size();
}
/**
*
* Map of upstream localities to traffic distribution weights. The sum of
* all weights should be 100. Any locality not present will
* receive no traffic.
*
*
* map<string, uint32> to = 2;
*/
public boolean containsTo(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetTo().getMap().containsKey(key);
}
/**
* Use {@link #getToMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getTo() {
return getToMap();
}
/**
*
* Map of upstream localities to traffic distribution weights. The sum of
* all weights should be 100. Any locality not present will
* receive no traffic.
*
*
* map<string, uint32> to = 2;
*/
public java.util.Map getToMap() {
return internalGetTo().getMap();
}
/**
*
* Map of upstream localities to traffic distribution weights. The sum of
* all weights should be 100. Any locality not present will
* receive no traffic.
*
*
* map<string, uint32> to = 2;
*/
public int getToOrDefault(
java.lang.String key,
int defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetTo().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Map of upstream localities to traffic distribution weights. The sum of
* all weights should be 100. Any locality not present will
* receive no traffic.
*
*
* map<string, uint32> to = 2;
*/
public int getToOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetTo().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearTo() {
internalGetMutableTo().getMutableMap()
.clear();
return this;
}
/**
*
* Map of upstream localities to traffic distribution weights. The sum of
* all weights should be 100. Any locality not present will
* receive no traffic.
*
*
* map<string, uint32> to = 2;
*/
public Builder removeTo(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableTo().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableTo() {
return internalGetMutableTo().getMutableMap();
}
/**
*
* Map of upstream localities to traffic distribution weights. The sum of
* all weights should be 100. Any locality not present will
* receive no traffic.
*
*
* map<string, uint32> to = 2;
*/
public Builder putTo(
java.lang.String key,
int value) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableTo().getMutableMap()
.put(key, value);
return this;
}
/**
*
* Map of upstream localities to traffic distribution weights. The sum of
* all weights should be 100. Any locality not present will
* receive no traffic.
*
*
* map<string, uint32> to = 2;
*/
public Builder putAllTo(
java.util.Map values) {
internalGetMutableTo().getMutableMap()
.putAll(values);
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.LocalityLoadBalancerSetting.Distribute)
}
// @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute)
private static final istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute();
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Distribute parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Distribute(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.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface FailoverOrBuilder extends
// @@protoc_insertion_point(interface_extends:istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover)
com.google.protobuf.MessageOrBuilder {
/**
*
* Specify the traffic failover policy across regions. Since zone and sub-zone
* failover is supported by default this only needs to be specified for
* regions when the operator needs to constrain traffic failover so that
* the default behavior of failing over to any endpoint globally does not
* apply. This is useful when failing over traffic across regions would not
* improve service health or may need to be restricted for other reasons
* like regulatory controls.
*
*
* Protobuf type {@code istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover}
*/
public static final class Failover extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover)
FailoverOrBuilder {
private static final long serialVersionUID = 0L;
// Use Failover.newBuilder() to construct.
private Failover(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Failover() {
from_ = "";
to_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Failover();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Failover(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
from_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
to_ = 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.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Failover_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Failover_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover.class, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover.Builder.class);
}
public static final int FROM_FIELD_NUMBER = 1;
private volatile java.lang.Object from_;
/**
*
* Destination region the traffic will fail over to when endpoints in
* the 'from' region becomes unhealthy.
*
*
* string to = 2;
*/
public com.google.protobuf.ByteString
getToBytes() {
java.lang.Object ref = to_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
to_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getFromBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, from_);
}
if (!getToBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, to_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getFromBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, from_);
}
if (!getToBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, to_);
}
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 istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover)) {
return super.equals(obj);
}
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover other = (istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover) obj;
if (!getFrom()
.equals(other.getFrom())) return false;
if (!getTo()
.equals(other.getTo())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + FROM_FIELD_NUMBER;
hash = (53 * hash) + getFrom().hashCode();
hash = (37 * hash) + TO_FIELD_NUMBER;
hash = (53 * hash) + getTo().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover 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 istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover 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 istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover 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(istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover 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;
}
/**
*
* Specify the traffic failover policy across regions. Since zone and sub-zone
* failover is supported by default this only needs to be specified for
* regions when the operator needs to constrain traffic failover so that
* the default behavior of failing over to any endpoint globally does not
* apply. This is useful when failing over traffic across regions would not
* improve service health or may need to be restricted for other reasons
* like regulatory controls.
*
*
* Protobuf type {@code istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover)
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.FailoverOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Failover_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Failover_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover.class, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover.Builder.class);
}
// Construct using istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover.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();
from_ = "";
to_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Failover_descriptor;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover getDefaultInstanceForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover.getDefaultInstance();
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover build() {
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover buildPartial() {
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover result = new istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover(this);
result.from_ = from_;
result.to_ = to_;
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.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover) {
return mergeFrom((istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover other) {
if (other == istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover.getDefaultInstance()) return this;
if (!other.getFrom().isEmpty()) {
from_ = other.from_;
onChanged();
}
if (!other.getTo().isEmpty()) {
to_ = other.to_;
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.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object from_ = "";
/**
*
* Destination region the traffic will fail over to when endpoints in
* the 'from' region becomes unhealthy.
*
*
* string to = 2;
*/
public Builder setTo(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
to_ = value;
onChanged();
return this;
}
/**
*
* Destination region the traffic will fail over to when endpoints in
* the 'from' region becomes unhealthy.
*
*
* string to = 2;
*/
public Builder clearTo() {
to_ = getDefaultInstance().getTo();
onChanged();
return this;
}
/**
*
* Destination region the traffic will fail over to when endpoints in
* the 'from' region becomes unhealthy.
*
*
* string to = 2;
*/
public Builder setToBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
to_ = 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.LocalityLoadBalancerSetting.Failover)
}
// @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover)
private static final istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover();
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Failover parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Failover(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.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int DISTRIBUTE_FIELD_NUMBER = 1;
private java.util.List distribute_;
/**
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute distribute = 1;
*/
public int getDistributeCount() {
return distribute_.size();
}
/**
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute distribute = 1;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.DistributeOrBuilder getDistributeOrBuilder(
int index) {
return distribute_.get(index);
}
public static final int FAILOVER_FIELD_NUMBER = 2;
private java.util.List failover_;
/**
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover failover = 2;
*/
public int getFailoverCount() {
return failover_.size();
}
/**
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover failover = 2;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.FailoverOrBuilder getFailoverOrBuilder(
int index) {
return failover_.get(index);
}
public static final int ENABLED_FIELD_NUMBER = 3;
private com.google.protobuf.BoolValue enabled_;
/**
*
* enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety.
* e.g. true means that turn on locality load balancing for this DestinationRule no matter what mesh wide settings is.
*
* enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety.
* e.g. true means that turn on locality load balancing for this DestinationRule no matter what mesh wide settings is.
*
* enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety.
* e.g. true means that turn on locality load balancing for this DestinationRule no matter what mesh wide settings is.
*
*
* .google.protobuf.BoolValue enabled = 3;
*/
public com.google.protobuf.BoolValueOrBuilder getEnabledOrBuilder() {
return getEnabled();
}
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 < distribute_.size(); i++) {
output.writeMessage(1, distribute_.get(i));
}
for (int i = 0; i < failover_.size(); i++) {
output.writeMessage(2, failover_.get(i));
}
if (enabled_ != null) {
output.writeMessage(3, getEnabled());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < distribute_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, distribute_.get(i));
}
for (int i = 0; i < failover_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, failover_.get(i));
}
if (enabled_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getEnabled());
}
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 istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting)) {
return super.equals(obj);
}
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting other = (istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting) obj;
if (!getDistributeList()
.equals(other.getDistributeList())) return false;
if (!getFailoverList()
.equals(other.getFailoverList())) return false;
if (hasEnabled() != other.hasEnabled()) return false;
if (hasEnabled()) {
if (!getEnabled()
.equals(other.getEnabled())) 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 (getDistributeCount() > 0) {
hash = (37 * hash) + DISTRIBUTE_FIELD_NUMBER;
hash = (53 * hash) + getDistributeList().hashCode();
}
if (getFailoverCount() > 0) {
hash = (37 * hash) + FAILOVER_FIELD_NUMBER;
hash = (53 * hash) + getFailoverList().hashCode();
}
if (hasEnabled()) {
hash = (37 * hash) + ENABLED_FIELD_NUMBER;
hash = (53 * hash) + getEnabled().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting 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 istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting 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 istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting 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(istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting 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;
}
/**
*
* Locality-weighted load balancing allows administrators to control the
* distribution of traffic to endpoints based on the localities of where the
* traffic originates and where it will terminate. These localities are
* specified using arbitrary labels that designate a hierarchy of localities in
* {region}/{zone}/{sub-zone} form. For additional detail refer to
* [Locality Weight](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* The following example shows how to setup locality weights mesh-wide.
* Given a mesh with workloads and their service deployed to "us-west/zone1/*"
* and "us-west/zone2/*". This example specifies that when traffic accessing a
* service originates from workloads in "us-west/zone1/*", 80% of the traffic
* will be sent to endpoints in "us-west/zone1/*", i.e the same zone, and the
* remaining 20% will go to endpoints in "us-west/zone2/*". This setup is
* intended to favor routing traffic to endpoints in the same locality.
* A similar setting is specified for traffic originating in "us-west/zone2/*".
* ```yaml
* distribute:
* - from: us-west/zone1/*
* to:
* "us-west/zone1/*": 80
* "us-west/zone2/*": 20
* - from: us-west/zone2/*
* to:
* "us-west/zone1/*": 20
* "us-west/zone2/*": 80
* ```
* If the goal of the operator is not to distribute load across zones and
* regions but rather to restrict the regionality of failover to meet other
* operational requirements an operator can set a 'failover' policy instead of
* a 'distribute' policy.
* The following example sets up a locality failover policy for regions.
* Assume a service resides in zones within us-east, us-west & eu-west
* this example specifies that when endpoints within us-east become unhealthy
* traffic should failover to endpoints in any zone or sub-zone within eu-west
* and similarly us-west should failover to us-east.
* ```yaml
* failover:
* - from: us-east
* to: eu-west
* - from: us-west
* to: us-east
* ```
* Locality load balancing settings.
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute distribute = 1;
*/
public int getDistributeCount() {
if (distributeBuilder_ == null) {
return distribute_.size();
} else {
return distributeBuilder_.getCount();
}
}
/**
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute distribute = 1;
*/
public Builder setDistribute(
int index, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute value) {
if (distributeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDistributeIsMutable();
distribute_.set(index, value);
onChanged();
} else {
distributeBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute distribute = 1;
*/
public Builder addDistribute(istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute value) {
if (distributeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDistributeIsMutable();
distribute_.add(value);
onChanged();
} else {
distributeBuilder_.addMessage(value);
}
return this;
}
/**
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute distribute = 1;
*/
public Builder addDistribute(
int index, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute value) {
if (distributeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDistributeIsMutable();
distribute_.add(index, value);
onChanged();
} else {
distributeBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute distribute = 1;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute.Builder getDistributeBuilder(
int index) {
return getDistributeFieldBuilder().getBuilder(index);
}
/**
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute distribute = 1;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.DistributeOrBuilder getDistributeOrBuilder(
int index) {
if (distributeBuilder_ == null) {
return distribute_.get(index); } else {
return distributeBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
* Optional: only one of distribute or failover can be set.
* Explicitly specify loadbalancing weight across different zones and geographical locations.
* Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
* If empty, the locality weight is set according to the endpoints number within it.
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover failover = 2;
*/
public int getFailoverCount() {
if (failoverBuilder_ == null) {
return failover_.size();
} else {
return failoverBuilder_.getCount();
}
}
/**
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover failover = 2;
*/
public Builder setFailover(
int index, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover value) {
if (failoverBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFailoverIsMutable();
failover_.set(index, value);
onChanged();
} else {
failoverBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover failover = 2;
*/
public Builder addFailover(istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover value) {
if (failoverBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFailoverIsMutable();
failover_.add(value);
onChanged();
} else {
failoverBuilder_.addMessage(value);
}
return this;
}
/**
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover failover = 2;
*/
public Builder addFailover(
int index, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover value) {
if (failoverBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFailoverIsMutable();
failover_.add(index, value);
onChanged();
} else {
failoverBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover failover = 2;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover.Builder getFailoverBuilder(
int index) {
return getFailoverFieldBuilder().getBuilder(index);
}
/**
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover failover = 2;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.FailoverOrBuilder getFailoverOrBuilder(
int index) {
if (failoverBuilder_ == null) {
return failover_.get(index); } else {
return failoverBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
* Optional: only failover or distribute can be set.
* Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy.
* Should be used together with OutlierDetection to detect unhealthy endpoints.
* Note: if no OutlierDetection specified, this will not take effect.
*
* enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety.
* e.g. true means that turn on locality load balancing for this DestinationRule no matter what mesh wide settings is.
*
* enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety.
* e.g. true means that turn on locality load balancing for this DestinationRule no matter what mesh wide settings is.
*
* enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety.
* e.g. true means that turn on locality load balancing for this DestinationRule no matter what mesh wide settings is.
*
*
* .google.protobuf.BoolValue enabled = 3;
*/
public Builder setEnabled(com.google.protobuf.BoolValue value) {
if (enabledBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
enabled_ = value;
onChanged();
} else {
enabledBuilder_.setMessage(value);
}
return this;
}
/**
*
* enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety.
* e.g. true means that turn on locality load balancing for this DestinationRule no matter what mesh wide settings is.
*
* enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety.
* e.g. true means that turn on locality load balancing for this DestinationRule no matter what mesh wide settings is.
*
* enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety.
* e.g. true means that turn on locality load balancing for this DestinationRule no matter what mesh wide settings is.
*
* enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety.
* e.g. true means that turn on locality load balancing for this DestinationRule no matter what mesh wide settings is.
*
* enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety.
* e.g. true means that turn on locality load balancing for this DestinationRule no matter what mesh wide settings is.
*
* enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety.
* e.g. true means that turn on locality load balancing for this DestinationRule no matter what mesh wide settings is.
*