istio.networking.v1alpha3.DestinationRuleOuterClass Maven / Gradle / Ivy
The newest version!
// 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.
*
*
* string host = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The host.
*/
java.lang.String getHost();
/**
*
* 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];
* @return The bytes for host.
*/
com.google.protobuf.ByteString
getHostBytes();
/**
*
* Traffic policies to apply (load balancing policy, connection pool
* sizes, outlier detection).
*
*
* .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 2;
* @return Whether the trafficPolicy field is set.
*/
boolean hasTrafficPolicy();
/**
*
* Traffic policies to apply (load balancing policy, connection pool
* sizes, outlier detection).
*
*
* .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 2;
* @return The trafficPolicy.
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy getTrafficPolicy();
/**
*
* Traffic policies to apply (load balancing policy, connection pool
* sizes, outlier detection).
*
*
* .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 2;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicyOrBuilder getTrafficPolicyOrBuilder();
/**
*
* 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;
*/
java.util.List
getSubsetsList();
/**
*
* 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;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.Subset getSubsets(int index);
/**
*
* 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;
*/
int getSubsetsCount();
/**
*
* 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;
*/
java.util.List extends istio.networking.v1alpha3.DestinationRuleOuterClass.SubsetOrBuilder>
getSubsetsOrBuilderList();
/**
*
* 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;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.SubsetOrBuilder getSubsetsOrBuilder(
int index);
/**
*
* 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;
* @return A list containing the exportTo.
*/
java.util.List
getExportToList();
/**
*
* 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;
* @return The count of exportTo.
*/
int getExportToCount();
/**
*
* 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;
* @param index The index of the element to return.
* @return The exportTo at the given index.
*/
java.lang.String getExportTo(int index);
/**
*
* 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;
* @param index The index of the value to return.
* @return The bytes of the exportTo at the given index.
*/
com.google.protobuf.ByteString
getExportToBytes(int index);
}
/**
*
* 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.
*
*
* string host = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The host.
*/
@java.lang.Override
public java.lang.String getHost() {
java.lang.Object ref = host_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
host_ = s;
return s;
}
}
/**
*
* 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];
* @return The bytes for host.
*/
@java.lang.Override
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).
*
*
* .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 2;
* @return Whether the trafficPolicy field is set.
*/
@java.lang.Override
public boolean hasTrafficPolicy() {
return trafficPolicy_ != null;
}
/**
*
* Traffic policies to apply (load balancing policy, connection pool
* sizes, outlier detection).
*
*
* .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 2;
* @return The trafficPolicy.
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy getTrafficPolicy() {
return trafficPolicy_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.getDefaultInstance() : trafficPolicy_;
}
/**
*
* Traffic policies to apply (load balancing policy, connection pool
* sizes, outlier detection).
*
*
* .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 2;
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicyOrBuilder getTrafficPolicyOrBuilder() {
return getTrafficPolicy();
}
public static final int SUBSETS_FIELD_NUMBER = 3;
private java.util.List subsets_;
/**
*
* 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;
*/
@java.lang.Override
public java.util.List getSubsetsList() {
return subsets_;
}
/**
*
* 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;
*/
@java.lang.Override
public java.util.List extends istio.networking.v1alpha3.DestinationRuleOuterClass.SubsetOrBuilder>
getSubsetsOrBuilderList() {
return subsets_;
}
/**
*
* 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;
*/
@java.lang.Override
public int getSubsetsCount() {
return subsets_.size();
}
/**
*
* 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;
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.Subset getSubsets(int index) {
return subsets_.get(index);
}
/**
*
* 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;
*/
@java.lang.Override
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).
*
*
* repeated string export_to = 4;
* @return A list containing the exportTo.
*/
public com.google.protobuf.ProtocolStringList
getExportToList() {
return 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).
*
*
* repeated string export_to = 4;
* @return The count of exportTo.
*/
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).
*
*
* repeated string export_to = 4;
* @param index The index of the element to return.
* @return The exportTo at the given index.
*/
public java.lang.String getExportTo(int index) {
return exportTo_.get(index);
}
/**
*
* A list of namespaces to which this 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;
* @param index The index of the value to return.
* @return The bytes of the exportTo at the given index.
*/
public com.google.protobuf.ByteString
getExportToBytes(int index) {
return exportTo_.getByteString(index);
}
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
* -->
*
*
* Protobuf type {@code istio.networking.v1alpha3.DestinationRule}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:istio.networking.v1alpha3.DestinationRule)
istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRuleOrBuilder {
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);
}
// Construct using istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getSubsetsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
host_ = "";
if (trafficPolicyBuilder_ == null) {
trafficPolicy_ = null;
} else {
trafficPolicy_ = null;
trafficPolicyBuilder_ = null;
}
if (subsetsBuilder_ == null) {
subsets_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
subsetsBuilder_.clear();
}
exportTo_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_DestinationRule_descriptor;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule getDefaultInstanceForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule.getDefaultInstance();
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule build() {
istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule buildPartial() {
istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule result = new istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule(this);
int from_bitField0_ = bitField0_;
result.host_ = host_;
if (trafficPolicyBuilder_ == null) {
result.trafficPolicy_ = trafficPolicy_;
} else {
result.trafficPolicy_ = trafficPolicyBuilder_.build();
}
if (subsetsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
subsets_ = java.util.Collections.unmodifiableList(subsets_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.subsets_ = subsets_;
} else {
result.subsets_ = subsetsBuilder_.build();
}
if (((bitField0_ & 0x00000002) != 0)) {
exportTo_ = exportTo_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.exportTo_ = exportTo_;
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.DestinationRule) {
return mergeFrom((istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule other) {
if (other == istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule.getDefaultInstance()) return this;
if (!other.getHost().isEmpty()) {
host_ = other.host_;
onChanged();
}
if (other.hasTrafficPolicy()) {
mergeTrafficPolicy(other.getTrafficPolicy());
}
if (subsetsBuilder_ == null) {
if (!other.subsets_.isEmpty()) {
if (subsets_.isEmpty()) {
subsets_ = other.subsets_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureSubsetsIsMutable();
subsets_.addAll(other.subsets_);
}
onChanged();
}
} else {
if (!other.subsets_.isEmpty()) {
if (subsetsBuilder_.isEmpty()) {
subsetsBuilder_.dispose();
subsetsBuilder_ = null;
subsets_ = other.subsets_;
bitField0_ = (bitField0_ & ~0x00000001);
subsetsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getSubsetsFieldBuilder() : null;
} else {
subsetsBuilder_.addAllMessages(other.subsets_);
}
}
}
if (!other.exportTo_.isEmpty()) {
if (exportTo_.isEmpty()) {
exportTo_ = other.exportTo_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureExportToIsMutable();
exportTo_.addAll(other.exportTo_);
}
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.DestinationRule parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (istio.networking.v1alpha3.DestinationRuleOuterClass.DestinationRule) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private 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.
*
*
* string host = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The host.
*/
public java.lang.String getHost() {
java.lang.Object ref = host_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
host_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* 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];
* @return The bytes for host.
*/
public com.google.protobuf.ByteString
getHostBytes() {
java.lang.Object ref = host_;
if (ref instanceof 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;
}
}
/**
*
* 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];
* @param value The host to set.
* @return This builder for chaining.
*/
public Builder setHost(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
host_ = value;
onChanged();
return this;
}
/**
*
* 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];
* @return This builder for chaining.
*/
public Builder clearHost() {
host_ = getDefaultInstance().getHost();
onChanged();
return this;
}
/**
*
* 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];
* @param value The bytes for host to set.
* @return This builder for chaining.
*/
public Builder setHostBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
host_ = value;
onChanged();
return this;
}
private istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy trafficPolicy_;
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy, istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicyOrBuilder> trafficPolicyBuilder_;
/**
*
* Traffic policies to apply (load balancing policy, connection pool
* sizes, outlier detection).
*
*
* .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 2;
* @return Whether the trafficPolicy field is set.
*/
public boolean hasTrafficPolicy() {
return trafficPolicyBuilder_ != null || trafficPolicy_ != null;
}
/**
*
* Traffic policies to apply (load balancing policy, connection pool
* sizes, outlier detection).
*
*
* .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 2;
* @return The trafficPolicy.
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy getTrafficPolicy() {
if (trafficPolicyBuilder_ == null) {
return trafficPolicy_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.getDefaultInstance() : trafficPolicy_;
} else {
return trafficPolicyBuilder_.getMessage();
}
}
/**
*
* Traffic policies to apply (load balancing policy, connection pool
* sizes, outlier detection).
*
*
* .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 2;
*/
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 to apply (load balancing policy, connection pool
* sizes, outlier detection).
*
*
* .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 2;
*/
public Builder setTrafficPolicy(
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.Builder builderForValue) {
if (trafficPolicyBuilder_ == null) {
trafficPolicy_ = builderForValue.build();
onChanged();
} else {
trafficPolicyBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Traffic policies to apply (load balancing policy, connection pool
* sizes, outlier detection).
*
*
* .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 2;
*/
public Builder mergeTrafficPolicy(istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy value) {
if (trafficPolicyBuilder_ == null) {
if (trafficPolicy_ != null) {
trafficPolicy_ =
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.newBuilder(trafficPolicy_).mergeFrom(value).buildPartial();
} else {
trafficPolicy_ = value;
}
onChanged();
} else {
trafficPolicyBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Traffic policies to apply (load balancing policy, connection pool
* sizes, outlier detection).
*
*
* .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 2;
*/
public Builder clearTrafficPolicy() {
if (trafficPolicyBuilder_ == null) {
trafficPolicy_ = null;
onChanged();
} else {
trafficPolicy_ = null;
trafficPolicyBuilder_ = null;
}
return this;
}
/**
*
* Traffic policies to apply (load balancing policy, connection pool
* sizes, outlier detection).
*
*
* .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 2;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.Builder getTrafficPolicyBuilder() {
onChanged();
return getTrafficPolicyFieldBuilder().getBuilder();
}
/**
*
* Traffic policies to apply (load balancing policy, connection pool
* sizes, outlier detection).
*
*
* .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 2;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicyOrBuilder getTrafficPolicyOrBuilder() {
if (trafficPolicyBuilder_ != null) {
return trafficPolicyBuilder_.getMessageOrBuilder();
} else {
return trafficPolicy_ == null ?
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.getDefaultInstance() : trafficPolicy_;
}
}
/**
*
* Traffic policies to apply (load balancing policy, connection pool
* sizes, outlier detection).
*
*
* .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 2;
*/
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_;
}
private java.util.List subsets_ =
java.util.Collections.emptyList();
private void ensureSubsetsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
subsets_ = new java.util.ArrayList(subsets_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.Subset, istio.networking.v1alpha3.DestinationRuleOuterClass.Subset.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.SubsetOrBuilder> subsetsBuilder_;
/**
*
* 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 java.util.List getSubsetsList() {
if (subsetsBuilder_ == null) {
return java.util.Collections.unmodifiableList(subsets_);
} else {
return subsetsBuilder_.getMessageList();
}
}
/**
*
* 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 int getSubsetsCount() {
if (subsetsBuilder_ == null) {
return subsets_.size();
} else {
return subsetsBuilder_.getCount();
}
}
/**
*
* 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.Subset getSubsets(int index) {
if (subsetsBuilder_ == null) {
return subsets_.get(index);
} else {
return subsetsBuilder_.getMessage(index);
}
}
/**
*
* 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 Builder setSubsets(
int index, istio.networking.v1alpha3.DestinationRuleOuterClass.Subset value) {
if (subsetsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSubsetsIsMutable();
subsets_.set(index, value);
onChanged();
} else {
subsetsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* 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 Builder setSubsets(
int index, istio.networking.v1alpha3.DestinationRuleOuterClass.Subset.Builder builderForValue) {
if (subsetsBuilder_ == null) {
ensureSubsetsIsMutable();
subsets_.set(index, builderForValue.build());
onChanged();
} else {
subsetsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* 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 Builder addSubsets(istio.networking.v1alpha3.DestinationRuleOuterClass.Subset value) {
if (subsetsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSubsetsIsMutable();
subsets_.add(value);
onChanged();
} else {
subsetsBuilder_.addMessage(value);
}
return this;
}
/**
*
* 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 Builder addSubsets(
int index, istio.networking.v1alpha3.DestinationRuleOuterClass.Subset value) {
if (subsetsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSubsetsIsMutable();
subsets_.add(index, value);
onChanged();
} else {
subsetsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* 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 Builder addSubsets(
istio.networking.v1alpha3.DestinationRuleOuterClass.Subset.Builder builderForValue) {
if (subsetsBuilder_ == null) {
ensureSubsetsIsMutable();
subsets_.add(builderForValue.build());
onChanged();
} else {
subsetsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* 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 Builder addSubsets(
int index, istio.networking.v1alpha3.DestinationRuleOuterClass.Subset.Builder builderForValue) {
if (subsetsBuilder_ == null) {
ensureSubsetsIsMutable();
subsets_.add(index, builderForValue.build());
onChanged();
} else {
subsetsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* 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 Builder addAllSubsets(
java.lang.Iterable extends istio.networking.v1alpha3.DestinationRuleOuterClass.Subset> values) {
if (subsetsBuilder_ == null) {
ensureSubsetsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, subsets_);
onChanged();
} else {
subsetsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* 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 Builder clearSubsets() {
if (subsetsBuilder_ == null) {
subsets_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
subsetsBuilder_.clear();
}
return this;
}
/**
*
* 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 Builder removeSubsets(int index) {
if (subsetsBuilder_ == null) {
ensureSubsetsIsMutable();
subsets_.remove(index);
onChanged();
} else {
subsetsBuilder_.remove(index);
}
return this;
}
/**
*
* 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.Subset.Builder getSubsetsBuilder(
int index) {
return getSubsetsFieldBuilder().getBuilder(index);
}
/**
*
* 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) {
if (subsetsBuilder_ == null) {
return subsets_.get(index); } else {
return subsetsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* 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 java.util.List extends istio.networking.v1alpha3.DestinationRuleOuterClass.SubsetOrBuilder>
getSubsetsOrBuilderList() {
if (subsetsBuilder_ != null) {
return subsetsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(subsets_);
}
}
/**
*
* 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.Subset.Builder addSubsetsBuilder() {
return getSubsetsFieldBuilder().addBuilder(
istio.networking.v1alpha3.DestinationRuleOuterClass.Subset.getDefaultInstance());
}
/**
*
* 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.Subset.Builder addSubsetsBuilder(
int index) {
return getSubsetsFieldBuilder().addBuilder(
index, istio.networking.v1alpha3.DestinationRuleOuterClass.Subset.getDefaultInstance());
}
/**
*
* 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 java.util.List
getSubsetsBuilderList() {
return getSubsetsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.Subset, istio.networking.v1alpha3.DestinationRuleOuterClass.Subset.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.SubsetOrBuilder>
getSubsetsFieldBuilder() {
if (subsetsBuilder_ == null) {
subsetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.Subset, istio.networking.v1alpha3.DestinationRuleOuterClass.Subset.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.SubsetOrBuilder>(
subsets_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
subsets_ = null;
}
return subsetsBuilder_;
}
private com.google.protobuf.LazyStringList exportTo_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureExportToIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
exportTo_ = new com.google.protobuf.LazyStringArrayList(exportTo_);
bitField0_ |= 0x00000002;
}
}
/**
*
* 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;
* @return A list containing the exportTo.
*/
public com.google.protobuf.ProtocolStringList
getExportToList() {
return exportTo_.getUnmodifiableView();
}
/**
*
* 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;
* @return The count of exportTo.
*/
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).
*
*
* repeated string export_to = 4;
* @param index The index of the element to return.
* @return The exportTo at the given index.
*/
public java.lang.String getExportTo(int index) {
return exportTo_.get(index);
}
/**
*
* A list of namespaces to which this 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;
* @param index The index of the value to return.
* @return The bytes of the exportTo at the given index.
*/
public com.google.protobuf.ByteString
getExportToBytes(int index) {
return exportTo_.getByteString(index);
}
/**
*
* A list of namespaces to which this 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;
* @param index The index to set the value at.
* @param value The exportTo to set.
* @return This builder for chaining.
*/
public Builder setExportTo(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureExportToIsMutable();
exportTo_.set(index, value);
onChanged();
return this;
}
/**
*
* A list of namespaces to which this 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;
* @param value The exportTo to add.
* @return This builder for chaining.
*/
public Builder addExportTo(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureExportToIsMutable();
exportTo_.add(value);
onChanged();
return this;
}
/**
*
* A list of namespaces to which this 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;
* @param values The exportTo to add.
* @return This builder for chaining.
*/
public Builder addAllExportTo(
java.lang.Iterable values) {
ensureExportToIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, exportTo_);
onChanged();
return this;
}
/**
*
* A list of namespaces to which this 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;
* @return This builder for chaining.
*/
public Builder clearExportTo() {
exportTo_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
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).
*
*
* repeated string export_to = 4;
* @param value The bytes of the exportTo to add.
* @return This builder for chaining.
*/
public Builder addExportToBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureExportToIsMutable();
exportTo_.add(value);
onChanged();
return this;
}
@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.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 1;
* @return Whether the loadBalancer field is set.
*/
boolean hasLoadBalancer();
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 1;
* @return The loadBalancer.
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings getLoadBalancer();
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 1;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettingsOrBuilder getLoadBalancerOrBuilder();
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 2;
* @return Whether the connectionPool field is set.
*/
boolean hasConnectionPool();
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 2;
* @return The connectionPool.
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings getConnectionPool();
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 2;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettingsOrBuilder getConnectionPoolOrBuilder();
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 3;
* @return Whether the outlierDetection field is set.
*/
boolean hasOutlierDetection();
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 3;
* @return The outlierDetection.
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection getOutlierDetection();
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 3;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetectionOrBuilder getOutlierDetectionOrBuilder();
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 4;
* @return Whether the tls field is set.
*/
boolean hasTls();
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 4;
* @return The tls.
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings getTls();
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 4;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettingsOrBuilder getTlsOrBuilder();
/**
*
* 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;
*/
java.util.List
getPortLevelSettingsList();
/**
*
* 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;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy getPortLevelSettings(int 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;
*/
int getPortLevelSettingsCount();
/**
*
* 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;
*/
java.util.List extends istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicyOrBuilder>
getPortLevelSettingsOrBuilderList();
/**
*
* 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;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicyOrBuilder getPortLevelSettingsOrBuilder(
int index);
}
/**
*
* Traffic policies to apply for a specific destination, across all
* destination ports. See DestinationRule for examples.
*
*
* Protobuf type {@code istio.networking.v1alpha3.TrafficPolicy}
*/
public static final class TrafficPolicy extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:istio.networking.v1alpha3.TrafficPolicy)
TrafficPolicyOrBuilder {
private static final long serialVersionUID = 0L;
// Use TrafficPolicy.newBuilder() to construct.
private TrafficPolicy(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TrafficPolicy() {
portLevelSettings_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TrafficPolicy();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TrafficPolicy(
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: {
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.Builder subBuilder = null;
if (loadBalancer_ != null) {
subBuilder = loadBalancer_.toBuilder();
}
loadBalancer_ = input.readMessage(istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(loadBalancer_);
loadBalancer_ = subBuilder.buildPartial();
}
break;
}
case 18: {
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.Builder subBuilder = null;
if (connectionPool_ != null) {
subBuilder = connectionPool_.toBuilder();
}
connectionPool_ = input.readMessage(istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(connectionPool_);
connectionPool_ = subBuilder.buildPartial();
}
break;
}
case 26: {
istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.Builder subBuilder = null;
if (outlierDetection_ != null) {
subBuilder = outlierDetection_.toBuilder();
}
outlierDetection_ = input.readMessage(istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(outlierDetection_);
outlierDetection_ = subBuilder.buildPartial();
}
break;
}
case 34: {
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.Builder subBuilder = null;
if (tls_ != null) {
subBuilder = tls_.toBuilder();
}
tls_ = input.readMessage(istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(tls_);
tls_ = subBuilder.buildPartial();
}
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
portLevelSettings_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
portLevelSettings_.add(
input.readMessage(istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy.parser(), extensionRegistry));
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)) {
portLevelSettings_ = java.util.Collections.unmodifiableList(portLevelSettings_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_TrafficPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_TrafficPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.class, istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.Builder.class);
}
public interface PortTrafficPolicyOrBuilder extends
// @@protoc_insertion_point(interface_extends:istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy)
com.google.protobuf.MessageOrBuilder {
/**
*
* Specifies the number of a port on the destination service
* on which this policy is being applied.
*
*
* .istio.networking.v1alpha3.PortSelector port = 1;
* @return Whether the port field is set.
*/
boolean hasPort();
/**
*
* Specifies the number of a port on the destination service
* on which this policy is being applied.
*
*
* .istio.networking.v1alpha3.PortSelector port = 1;
* @return The port.
*/
istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelector getPort();
/**
*
* Specifies the number of a port on the destination service
* on which this policy is being applied.
*
*
* .istio.networking.v1alpha3.PortSelector port = 1;
*/
istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelectorOrBuilder getPortOrBuilder();
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 2;
* @return Whether the loadBalancer field is set.
*/
boolean hasLoadBalancer();
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 2;
* @return The loadBalancer.
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings getLoadBalancer();
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 2;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettingsOrBuilder getLoadBalancerOrBuilder();
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 3;
* @return Whether the connectionPool field is set.
*/
boolean hasConnectionPool();
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 3;
* @return The connectionPool.
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings getConnectionPool();
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 3;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettingsOrBuilder getConnectionPoolOrBuilder();
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 4;
* @return Whether the outlierDetection field is set.
*/
boolean hasOutlierDetection();
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 4;
* @return The outlierDetection.
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection getOutlierDetection();
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 4;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetectionOrBuilder getOutlierDetectionOrBuilder();
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 5;
* @return Whether the tls field is set.
*/
boolean hasTls();
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 5;
* @return The tls.
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings getTls();
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 5;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettingsOrBuilder getTlsOrBuilder();
}
/**
*
* Traffic policies that apply to specific ports of the service
*
*
* Protobuf type {@code istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy}
*/
public static final class PortTrafficPolicy extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy)
PortTrafficPolicyOrBuilder {
private static final long serialVersionUID = 0L;
// Use PortTrafficPolicy.newBuilder() to construct.
private PortTrafficPolicy(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PortTrafficPolicy() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PortTrafficPolicy();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PortTrafficPolicy(
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: {
istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelector.Builder subBuilder = null;
if (port_ != null) {
subBuilder = port_.toBuilder();
}
port_ = input.readMessage(istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelector.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(port_);
port_ = subBuilder.buildPartial();
}
break;
}
case 18: {
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.Builder subBuilder = null;
if (loadBalancer_ != null) {
subBuilder = loadBalancer_.toBuilder();
}
loadBalancer_ = input.readMessage(istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(loadBalancer_);
loadBalancer_ = subBuilder.buildPartial();
}
break;
}
case 26: {
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.Builder subBuilder = null;
if (connectionPool_ != null) {
subBuilder = connectionPool_.toBuilder();
}
connectionPool_ = input.readMessage(istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(connectionPool_);
connectionPool_ = subBuilder.buildPartial();
}
break;
}
case 34: {
istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.Builder subBuilder = null;
if (outlierDetection_ != null) {
subBuilder = outlierDetection_.toBuilder();
}
outlierDetection_ = input.readMessage(istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(outlierDetection_);
outlierDetection_ = subBuilder.buildPartial();
}
break;
}
case 42: {
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.Builder subBuilder = null;
if (tls_ != null) {
subBuilder = tls_.toBuilder();
}
tls_ = input.readMessage(istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(tls_);
tls_ = 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_TrafficPolicy_PortTrafficPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_TrafficPolicy_PortTrafficPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy.class, istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy.Builder.class);
}
public static final int PORT_FIELD_NUMBER = 1;
private istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelector port_;
/**
*
* Specifies the number of a port on the destination service
* on which this policy is being applied.
*
*
* .istio.networking.v1alpha3.PortSelector port = 1;
* @return Whether the port field is set.
*/
@java.lang.Override
public boolean hasPort() {
return port_ != null;
}
/**
*
* Specifies the number of a port on the destination service
* on which this policy is being applied.
*
*
* .istio.networking.v1alpha3.PortSelector port = 1;
* @return The port.
*/
@java.lang.Override
public istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelector getPort() {
return port_ == null ? istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelector.getDefaultInstance() : port_;
}
/**
*
* Specifies the number of a port on the destination service
* on which this policy is being applied.
*
*
* .istio.networking.v1alpha3.PortSelector port = 1;
*/
@java.lang.Override
public istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelectorOrBuilder getPortOrBuilder() {
return getPort();
}
public static final int LOAD_BALANCER_FIELD_NUMBER = 2;
private istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings loadBalancer_;
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 2;
* @return Whether the loadBalancer field is set.
*/
@java.lang.Override
public boolean hasLoadBalancer() {
return loadBalancer_ != null;
}
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 2;
* @return The loadBalancer.
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings getLoadBalancer() {
return loadBalancer_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.getDefaultInstance() : loadBalancer_;
}
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 2;
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettingsOrBuilder getLoadBalancerOrBuilder() {
return getLoadBalancer();
}
public static final int CONNECTION_POOL_FIELD_NUMBER = 3;
private istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings connectionPool_;
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 3;
* @return Whether the connectionPool field is set.
*/
@java.lang.Override
public boolean hasConnectionPool() {
return connectionPool_ != null;
}
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 3;
* @return The connectionPool.
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings getConnectionPool() {
return connectionPool_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.getDefaultInstance() : connectionPool_;
}
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 3;
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettingsOrBuilder getConnectionPoolOrBuilder() {
return getConnectionPool();
}
public static final int OUTLIER_DETECTION_FIELD_NUMBER = 4;
private istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection outlierDetection_;
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 4;
* @return Whether the outlierDetection field is set.
*/
@java.lang.Override
public boolean hasOutlierDetection() {
return outlierDetection_ != null;
}
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 4;
* @return The outlierDetection.
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection getOutlierDetection() {
return outlierDetection_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.getDefaultInstance() : outlierDetection_;
}
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 4;
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetectionOrBuilder getOutlierDetectionOrBuilder() {
return getOutlierDetection();
}
public static final int TLS_FIELD_NUMBER = 5;
private istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings tls_;
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 5;
* @return Whether the tls field is set.
*/
@java.lang.Override
public boolean hasTls() {
return tls_ != null;
}
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 5;
* @return The tls.
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings getTls() {
return tls_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.getDefaultInstance() : tls_;
}
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 5;
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettingsOrBuilder getTlsOrBuilder() {
return getTls();
}
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 (port_ != null) {
output.writeMessage(1, getPort());
}
if (loadBalancer_ != null) {
output.writeMessage(2, getLoadBalancer());
}
if (connectionPool_ != null) {
output.writeMessage(3, getConnectionPool());
}
if (outlierDetection_ != null) {
output.writeMessage(4, getOutlierDetection());
}
if (tls_ != null) {
output.writeMessage(5, getTls());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (port_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getPort());
}
if (loadBalancer_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getLoadBalancer());
}
if (connectionPool_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getConnectionPool());
}
if (outlierDetection_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getOutlierDetection());
}
if (tls_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getTls());
}
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.PortTrafficPolicy)) {
return super.equals(obj);
}
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy other = (istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy) obj;
if (hasPort() != other.hasPort()) return false;
if (hasPort()) {
if (!getPort()
.equals(other.getPort())) return false;
}
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 (!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 (hasPort()) {
hash = (37 * hash) + PORT_FIELD_NUMBER;
hash = (53 * hash) + getPort().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();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy 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.PortTrafficPolicy parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy 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.PortTrafficPolicy parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy 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.PortTrafficPolicy parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy 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.PortTrafficPolicy parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy 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.PortTrafficPolicy 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.PortTrafficPolicy 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.PortTrafficPolicy 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 that apply to specific ports of the service
*
*
* Protobuf type {@code istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy)
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_TrafficPolicy_PortTrafficPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_TrafficPolicy_PortTrafficPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy.class, istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy.Builder.class);
}
// Construct using istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy.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();
if (portBuilder_ == null) {
port_ = null;
} else {
port_ = null;
portBuilder_ = null;
}
if (loadBalancerBuilder_ == null) {
loadBalancer_ = null;
} else {
loadBalancer_ = null;
loadBalancerBuilder_ = null;
}
if (connectionPoolBuilder_ == null) {
connectionPool_ = null;
} else {
connectionPool_ = null;
connectionPoolBuilder_ = null;
}
if (outlierDetectionBuilder_ == null) {
outlierDetection_ = null;
} else {
outlierDetection_ = null;
outlierDetectionBuilder_ = null;
}
if (tlsBuilder_ == null) {
tls_ = null;
} else {
tls_ = null;
tlsBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_TrafficPolicy_PortTrafficPolicy_descriptor;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy getDefaultInstanceForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy.getDefaultInstance();
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy build() {
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy buildPartial() {
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy result = new istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy(this);
if (portBuilder_ == null) {
result.port_ = port_;
} else {
result.port_ = portBuilder_.build();
}
if (loadBalancerBuilder_ == null) {
result.loadBalancer_ = loadBalancer_;
} else {
result.loadBalancer_ = loadBalancerBuilder_.build();
}
if (connectionPoolBuilder_ == null) {
result.connectionPool_ = connectionPool_;
} else {
result.connectionPool_ = connectionPoolBuilder_.build();
}
if (outlierDetectionBuilder_ == null) {
result.outlierDetection_ = outlierDetection_;
} else {
result.outlierDetection_ = outlierDetectionBuilder_.build();
}
if (tlsBuilder_ == null) {
result.tls_ = tls_;
} else {
result.tls_ = tlsBuilder_.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.TrafficPolicy.PortTrafficPolicy) {
return mergeFrom((istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy other) {
if (other == istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy.getDefaultInstance()) return this;
if (other.hasPort()) {
mergePort(other.getPort());
}
if (other.hasLoadBalancer()) {
mergeLoadBalancer(other.getLoadBalancer());
}
if (other.hasConnectionPool()) {
mergeConnectionPool(other.getConnectionPool());
}
if (other.hasOutlierDetection()) {
mergeOutlierDetection(other.getOutlierDetection());
}
if (other.hasTls()) {
mergeTls(other.getTls());
}
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.TrafficPolicy.PortTrafficPolicy parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelector port_;
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelector, istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelector.Builder, istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelectorOrBuilder> portBuilder_;
/**
*
* Specifies the number of a port on the destination service
* on which this policy is being applied.
*
*
* .istio.networking.v1alpha3.PortSelector port = 1;
* @return Whether the port field is set.
*/
public boolean hasPort() {
return portBuilder_ != null || port_ != null;
}
/**
*
* Specifies the number of a port on the destination service
* on which this policy is being applied.
*
*
* .istio.networking.v1alpha3.PortSelector port = 1;
* @return The port.
*/
public istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelector getPort() {
if (portBuilder_ == null) {
return port_ == null ? istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelector.getDefaultInstance() : port_;
} else {
return portBuilder_.getMessage();
}
}
/**
*
* Specifies the number of a port on the destination service
* on which this policy is being applied.
*
*
* .istio.networking.v1alpha3.PortSelector port = 1;
*/
public Builder setPort(istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelector value) {
if (portBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
port_ = value;
onChanged();
} else {
portBuilder_.setMessage(value);
}
return this;
}
/**
*
* Specifies the number of a port on the destination service
* on which this policy is being applied.
*
*
* .istio.networking.v1alpha3.PortSelector port = 1;
*/
public Builder setPort(
istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelector.Builder builderForValue) {
if (portBuilder_ == null) {
port_ = builderForValue.build();
onChanged();
} else {
portBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Specifies the number of a port on the destination service
* on which this policy is being applied.
*
*
* .istio.networking.v1alpha3.PortSelector port = 1;
*/
public Builder mergePort(istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelector value) {
if (portBuilder_ == null) {
if (port_ != null) {
port_ =
istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelector.newBuilder(port_).mergeFrom(value).buildPartial();
} else {
port_ = value;
}
onChanged();
} else {
portBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Specifies the number of a port on the destination service
* on which this policy is being applied.
*
*
* .istio.networking.v1alpha3.PortSelector port = 1;
*/
public Builder clearPort() {
if (portBuilder_ == null) {
port_ = null;
onChanged();
} else {
port_ = null;
portBuilder_ = null;
}
return this;
}
/**
*
* Specifies the number of a port on the destination service
* on which this policy is being applied.
*
*
* .istio.networking.v1alpha3.PortSelector port = 1;
*/
public istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelector.Builder getPortBuilder() {
onChanged();
return getPortFieldBuilder().getBuilder();
}
/**
*
* Specifies the number of a port on the destination service
* on which this policy is being applied.
*
*
* .istio.networking.v1alpha3.PortSelector port = 1;
*/
public istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelectorOrBuilder getPortOrBuilder() {
if (portBuilder_ != null) {
return portBuilder_.getMessageOrBuilder();
} else {
return port_ == null ?
istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelector.getDefaultInstance() : port_;
}
}
/**
*
* Specifies the number of a port on the destination service
* on which this policy is being applied.
*
*
* .istio.networking.v1alpha3.PortSelector port = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelector, istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelector.Builder, istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelectorOrBuilder>
getPortFieldBuilder() {
if (portBuilder_ == null) {
portBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelector, istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelector.Builder, istio.networking.v1alpha3.VirtualServiceOuterClass.PortSelectorOrBuilder>(
getPort(),
getParentForChildren(),
isClean());
port_ = null;
}
return portBuilder_;
}
private istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings loadBalancer_;
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettingsOrBuilder> loadBalancerBuilder_;
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 2;
* @return Whether the loadBalancer field is set.
*/
public boolean hasLoadBalancer() {
return loadBalancerBuilder_ != null || loadBalancer_ != null;
}
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 2;
* @return The loadBalancer.
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings getLoadBalancer() {
if (loadBalancerBuilder_ == null) {
return loadBalancer_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.getDefaultInstance() : loadBalancer_;
} else {
return loadBalancerBuilder_.getMessage();
}
}
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 2;
*/
public Builder setLoadBalancer(istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings value) {
if (loadBalancerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
loadBalancer_ = value;
onChanged();
} else {
loadBalancerBuilder_.setMessage(value);
}
return this;
}
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 2;
*/
public Builder setLoadBalancer(
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.Builder builderForValue) {
if (loadBalancerBuilder_ == null) {
loadBalancer_ = builderForValue.build();
onChanged();
} else {
loadBalancerBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 2;
*/
public Builder mergeLoadBalancer(istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings value) {
if (loadBalancerBuilder_ == null) {
if (loadBalancer_ != null) {
loadBalancer_ =
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.newBuilder(loadBalancer_).mergeFrom(value).buildPartial();
} else {
loadBalancer_ = value;
}
onChanged();
} else {
loadBalancerBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 2;
*/
public Builder clearLoadBalancer() {
if (loadBalancerBuilder_ == null) {
loadBalancer_ = null;
onChanged();
} else {
loadBalancer_ = null;
loadBalancerBuilder_ = null;
}
return this;
}
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 2;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.Builder getLoadBalancerBuilder() {
onChanged();
return getLoadBalancerFieldBuilder().getBuilder();
}
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 2;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettingsOrBuilder getLoadBalancerOrBuilder() {
if (loadBalancerBuilder_ != null) {
return loadBalancerBuilder_.getMessageOrBuilder();
} else {
return loadBalancer_ == null ?
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.getDefaultInstance() : loadBalancer_;
}
}
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettingsOrBuilder>
getLoadBalancerFieldBuilder() {
if (loadBalancerBuilder_ == null) {
loadBalancerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettingsOrBuilder>(
getLoadBalancer(),
getParentForChildren(),
isClean());
loadBalancer_ = null;
}
return loadBalancerBuilder_;
}
private istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings connectionPool_;
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettingsOrBuilder> connectionPoolBuilder_;
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 3;
* @return Whether the connectionPool field is set.
*/
public boolean hasConnectionPool() {
return connectionPoolBuilder_ != null || connectionPool_ != null;
}
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 3;
* @return The connectionPool.
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings getConnectionPool() {
if (connectionPoolBuilder_ == null) {
return connectionPool_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.getDefaultInstance() : connectionPool_;
} else {
return connectionPoolBuilder_.getMessage();
}
}
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 3;
*/
public Builder setConnectionPool(istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings value) {
if (connectionPoolBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
connectionPool_ = value;
onChanged();
} else {
connectionPoolBuilder_.setMessage(value);
}
return this;
}
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 3;
*/
public Builder setConnectionPool(
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.Builder builderForValue) {
if (connectionPoolBuilder_ == null) {
connectionPool_ = builderForValue.build();
onChanged();
} else {
connectionPoolBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 3;
*/
public Builder mergeConnectionPool(istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings value) {
if (connectionPoolBuilder_ == null) {
if (connectionPool_ != null) {
connectionPool_ =
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.newBuilder(connectionPool_).mergeFrom(value).buildPartial();
} else {
connectionPool_ = value;
}
onChanged();
} else {
connectionPoolBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 3;
*/
public Builder clearConnectionPool() {
if (connectionPoolBuilder_ == null) {
connectionPool_ = null;
onChanged();
} else {
connectionPool_ = null;
connectionPoolBuilder_ = null;
}
return this;
}
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 3;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.Builder getConnectionPoolBuilder() {
onChanged();
return getConnectionPoolFieldBuilder().getBuilder();
}
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 3;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettingsOrBuilder getConnectionPoolOrBuilder() {
if (connectionPoolBuilder_ != null) {
return connectionPoolBuilder_.getMessageOrBuilder();
} else {
return connectionPool_ == null ?
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.getDefaultInstance() : connectionPool_;
}
}
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettingsOrBuilder>
getConnectionPoolFieldBuilder() {
if (connectionPoolBuilder_ == null) {
connectionPoolBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettingsOrBuilder>(
getConnectionPool(),
getParentForChildren(),
isClean());
connectionPool_ = null;
}
return connectionPoolBuilder_;
}
private istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection outlierDetection_;
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection, istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetectionOrBuilder> outlierDetectionBuilder_;
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 4;
* @return Whether the outlierDetection field is set.
*/
public boolean hasOutlierDetection() {
return outlierDetectionBuilder_ != null || outlierDetection_ != null;
}
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 4;
* @return The outlierDetection.
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection getOutlierDetection() {
if (outlierDetectionBuilder_ == null) {
return outlierDetection_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.getDefaultInstance() : outlierDetection_;
} else {
return outlierDetectionBuilder_.getMessage();
}
}
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 4;
*/
public Builder setOutlierDetection(istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection value) {
if (outlierDetectionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
outlierDetection_ = value;
onChanged();
} else {
outlierDetectionBuilder_.setMessage(value);
}
return this;
}
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 4;
*/
public Builder setOutlierDetection(
istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.Builder builderForValue) {
if (outlierDetectionBuilder_ == null) {
outlierDetection_ = builderForValue.build();
onChanged();
} else {
outlierDetectionBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 4;
*/
public Builder mergeOutlierDetection(istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection value) {
if (outlierDetectionBuilder_ == null) {
if (outlierDetection_ != null) {
outlierDetection_ =
istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.newBuilder(outlierDetection_).mergeFrom(value).buildPartial();
} else {
outlierDetection_ = value;
}
onChanged();
} else {
outlierDetectionBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 4;
*/
public Builder clearOutlierDetection() {
if (outlierDetectionBuilder_ == null) {
outlierDetection_ = null;
onChanged();
} else {
outlierDetection_ = null;
outlierDetectionBuilder_ = null;
}
return this;
}
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 4;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.Builder getOutlierDetectionBuilder() {
onChanged();
return getOutlierDetectionFieldBuilder().getBuilder();
}
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 4;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetectionOrBuilder getOutlierDetectionOrBuilder() {
if (outlierDetectionBuilder_ != null) {
return outlierDetectionBuilder_.getMessageOrBuilder();
} else {
return outlierDetection_ == null ?
istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.getDefaultInstance() : outlierDetection_;
}
}
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection, istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetectionOrBuilder>
getOutlierDetectionFieldBuilder() {
if (outlierDetectionBuilder_ == null) {
outlierDetectionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection, istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetectionOrBuilder>(
getOutlierDetection(),
getParentForChildren(),
isClean());
outlierDetection_ = null;
}
return outlierDetectionBuilder_;
}
private istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings tls_;
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings, istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettingsOrBuilder> tlsBuilder_;
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 5;
* @return Whether the tls field is set.
*/
public boolean hasTls() {
return tlsBuilder_ != null || tls_ != null;
}
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 5;
* @return The tls.
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings getTls() {
if (tlsBuilder_ == null) {
return tls_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.getDefaultInstance() : tls_;
} else {
return tlsBuilder_.getMessage();
}
}
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 5;
*/
public Builder setTls(istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings value) {
if (tlsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tls_ = value;
onChanged();
} else {
tlsBuilder_.setMessage(value);
}
return this;
}
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 5;
*/
public Builder setTls(
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.Builder builderForValue) {
if (tlsBuilder_ == null) {
tls_ = builderForValue.build();
onChanged();
} else {
tlsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 5;
*/
public Builder mergeTls(istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings value) {
if (tlsBuilder_ == null) {
if (tls_ != null) {
tls_ =
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.newBuilder(tls_).mergeFrom(value).buildPartial();
} else {
tls_ = value;
}
onChanged();
} else {
tlsBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 5;
*/
public Builder clearTls() {
if (tlsBuilder_ == null) {
tls_ = null;
onChanged();
} else {
tls_ = null;
tlsBuilder_ = null;
}
return this;
}
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 5;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.Builder getTlsBuilder() {
onChanged();
return getTlsFieldBuilder().getBuilder();
}
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 5;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettingsOrBuilder getTlsOrBuilder() {
if (tlsBuilder_ != null) {
return tlsBuilder_.getMessageOrBuilder();
} else {
return tls_ == null ?
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.getDefaultInstance() : tls_;
}
}
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings, istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettingsOrBuilder>
getTlsFieldBuilder() {
if (tlsBuilder_ == null) {
tlsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings, istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettingsOrBuilder>(
getTls(),
getParentForChildren(),
isClean());
tls_ = null;
}
return tlsBuilder_;
}
@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.PortTrafficPolicy)
}
// @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy)
private static final istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy();
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PortTrafficPolicy parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PortTrafficPolicy(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.PortTrafficPolicy getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int LOAD_BALANCER_FIELD_NUMBER = 1;
private istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings loadBalancer_;
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 1;
* @return Whether the loadBalancer field is set.
*/
@java.lang.Override
public boolean hasLoadBalancer() {
return loadBalancer_ != null;
}
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 1;
* @return The loadBalancer.
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings getLoadBalancer() {
return loadBalancer_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.getDefaultInstance() : loadBalancer_;
}
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 1;
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettingsOrBuilder getLoadBalancerOrBuilder() {
return getLoadBalancer();
}
public static final int CONNECTION_POOL_FIELD_NUMBER = 2;
private istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings connectionPool_;
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 2;
* @return Whether the connectionPool field is set.
*/
@java.lang.Override
public boolean hasConnectionPool() {
return connectionPool_ != null;
}
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 2;
* @return The connectionPool.
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings getConnectionPool() {
return connectionPool_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.getDefaultInstance() : connectionPool_;
}
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 2;
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettingsOrBuilder getConnectionPoolOrBuilder() {
return getConnectionPool();
}
public static final int OUTLIER_DETECTION_FIELD_NUMBER = 3;
private istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection outlierDetection_;
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 3;
* @return Whether the outlierDetection field is set.
*/
@java.lang.Override
public boolean hasOutlierDetection() {
return outlierDetection_ != null;
}
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 3;
* @return The outlierDetection.
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection getOutlierDetection() {
return outlierDetection_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.getDefaultInstance() : outlierDetection_;
}
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 3;
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetectionOrBuilder getOutlierDetectionOrBuilder() {
return getOutlierDetection();
}
public static final int TLS_FIELD_NUMBER = 4;
private istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings tls_;
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 4;
* @return Whether the tls field is set.
*/
@java.lang.Override
public boolean hasTls() {
return tls_ != null;
}
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 4;
* @return The tls.
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings getTls() {
return tls_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.getDefaultInstance() : tls_;
}
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 4;
*/
@java.lang.Override
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.
*
*
* repeated .istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy port_level_settings = 5;
*/
@java.lang.Override
public java.util.List getPortLevelSettingsList() {
return 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.
*
*
* repeated .istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy port_level_settings = 5;
*/
@java.lang.Override
public java.util.List extends istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicyOrBuilder>
getPortLevelSettingsOrBuilderList() {
return 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.
*
*
* repeated .istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy port_level_settings = 5;
*/
@java.lang.Override
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.
*
*
* repeated .istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy port_level_settings = 5;
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy getPortLevelSettings(int index) {
return portLevelSettings_.get(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;
*/
@java.lang.Override
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.
*
*
* Protobuf type {@code istio.networking.v1alpha3.TrafficPolicy}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:istio.networking.v1alpha3.TrafficPolicy)
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_TrafficPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_TrafficPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.class, istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.Builder.class);
}
// Construct using istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getPortLevelSettingsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (loadBalancerBuilder_ == null) {
loadBalancer_ = null;
} else {
loadBalancer_ = null;
loadBalancerBuilder_ = null;
}
if (connectionPoolBuilder_ == null) {
connectionPool_ = null;
} else {
connectionPool_ = null;
connectionPoolBuilder_ = null;
}
if (outlierDetectionBuilder_ == null) {
outlierDetection_ = null;
} else {
outlierDetection_ = null;
outlierDetectionBuilder_ = null;
}
if (tlsBuilder_ == null) {
tls_ = null;
} else {
tls_ = null;
tlsBuilder_ = null;
}
if (portLevelSettingsBuilder_ == null) {
portLevelSettings_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
portLevelSettingsBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_TrafficPolicy_descriptor;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy getDefaultInstanceForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.getDefaultInstance();
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy build() {
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy buildPartial() {
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy result = new istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy(this);
int from_bitField0_ = bitField0_;
if (loadBalancerBuilder_ == null) {
result.loadBalancer_ = loadBalancer_;
} else {
result.loadBalancer_ = loadBalancerBuilder_.build();
}
if (connectionPoolBuilder_ == null) {
result.connectionPool_ = connectionPool_;
} else {
result.connectionPool_ = connectionPoolBuilder_.build();
}
if (outlierDetectionBuilder_ == null) {
result.outlierDetection_ = outlierDetection_;
} else {
result.outlierDetection_ = outlierDetectionBuilder_.build();
}
if (tlsBuilder_ == null) {
result.tls_ = tls_;
} else {
result.tls_ = tlsBuilder_.build();
}
if (portLevelSettingsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
portLevelSettings_ = java.util.Collections.unmodifiableList(portLevelSettings_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.portLevelSettings_ = portLevelSettings_;
} else {
result.portLevelSettings_ = portLevelSettingsBuilder_.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.TrafficPolicy) {
return mergeFrom((istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy other) {
if (other == istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.getDefaultInstance()) return this;
if (other.hasLoadBalancer()) {
mergeLoadBalancer(other.getLoadBalancer());
}
if (other.hasConnectionPool()) {
mergeConnectionPool(other.getConnectionPool());
}
if (other.hasOutlierDetection()) {
mergeOutlierDetection(other.getOutlierDetection());
}
if (other.hasTls()) {
mergeTls(other.getTls());
}
if (portLevelSettingsBuilder_ == null) {
if (!other.portLevelSettings_.isEmpty()) {
if (portLevelSettings_.isEmpty()) {
portLevelSettings_ = other.portLevelSettings_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensurePortLevelSettingsIsMutable();
portLevelSettings_.addAll(other.portLevelSettings_);
}
onChanged();
}
} else {
if (!other.portLevelSettings_.isEmpty()) {
if (portLevelSettingsBuilder_.isEmpty()) {
portLevelSettingsBuilder_.dispose();
portLevelSettingsBuilder_ = null;
portLevelSettings_ = other.portLevelSettings_;
bitField0_ = (bitField0_ & ~0x00000001);
portLevelSettingsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getPortLevelSettingsFieldBuilder() : null;
} else {
portLevelSettingsBuilder_.addAllMessages(other.portLevelSettings_);
}
}
}
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.TrafficPolicy parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings loadBalancer_;
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettingsOrBuilder> loadBalancerBuilder_;
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 1;
* @return Whether the loadBalancer field is set.
*/
public boolean hasLoadBalancer() {
return loadBalancerBuilder_ != null || loadBalancer_ != null;
}
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 1;
* @return The loadBalancer.
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings getLoadBalancer() {
if (loadBalancerBuilder_ == null) {
return loadBalancer_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.getDefaultInstance() : loadBalancer_;
} else {
return loadBalancerBuilder_.getMessage();
}
}
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 1;
*/
public Builder setLoadBalancer(istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings value) {
if (loadBalancerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
loadBalancer_ = value;
onChanged();
} else {
loadBalancerBuilder_.setMessage(value);
}
return this;
}
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 1;
*/
public Builder setLoadBalancer(
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.Builder builderForValue) {
if (loadBalancerBuilder_ == null) {
loadBalancer_ = builderForValue.build();
onChanged();
} else {
loadBalancerBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 1;
*/
public Builder mergeLoadBalancer(istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings value) {
if (loadBalancerBuilder_ == null) {
if (loadBalancer_ != null) {
loadBalancer_ =
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.newBuilder(loadBalancer_).mergeFrom(value).buildPartial();
} else {
loadBalancer_ = value;
}
onChanged();
} else {
loadBalancerBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 1;
*/
public Builder clearLoadBalancer() {
if (loadBalancerBuilder_ == null) {
loadBalancer_ = null;
onChanged();
} else {
loadBalancer_ = null;
loadBalancerBuilder_ = null;
}
return this;
}
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 1;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.Builder getLoadBalancerBuilder() {
onChanged();
return getLoadBalancerFieldBuilder().getBuilder();
}
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 1;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettingsOrBuilder getLoadBalancerOrBuilder() {
if (loadBalancerBuilder_ != null) {
return loadBalancerBuilder_.getMessageOrBuilder();
} else {
return loadBalancer_ == null ?
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.getDefaultInstance() : loadBalancer_;
}
}
/**
*
* Settings controlling the load balancer algorithms.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings load_balancer = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettingsOrBuilder>
getLoadBalancerFieldBuilder() {
if (loadBalancerBuilder_ == null) {
loadBalancerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettingsOrBuilder>(
getLoadBalancer(),
getParentForChildren(),
isClean());
loadBalancer_ = null;
}
return loadBalancerBuilder_;
}
private istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings connectionPool_;
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettingsOrBuilder> connectionPoolBuilder_;
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 2;
* @return Whether the connectionPool field is set.
*/
public boolean hasConnectionPool() {
return connectionPoolBuilder_ != null || connectionPool_ != null;
}
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 2;
* @return The connectionPool.
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings getConnectionPool() {
if (connectionPoolBuilder_ == null) {
return connectionPool_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.getDefaultInstance() : connectionPool_;
} else {
return connectionPoolBuilder_.getMessage();
}
}
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 2;
*/
public Builder setConnectionPool(istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings value) {
if (connectionPoolBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
connectionPool_ = value;
onChanged();
} else {
connectionPoolBuilder_.setMessage(value);
}
return this;
}
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 2;
*/
public Builder setConnectionPool(
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.Builder builderForValue) {
if (connectionPoolBuilder_ == null) {
connectionPool_ = builderForValue.build();
onChanged();
} else {
connectionPoolBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 2;
*/
public Builder mergeConnectionPool(istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings value) {
if (connectionPoolBuilder_ == null) {
if (connectionPool_ != null) {
connectionPool_ =
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.newBuilder(connectionPool_).mergeFrom(value).buildPartial();
} else {
connectionPool_ = value;
}
onChanged();
} else {
connectionPoolBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 2;
*/
public Builder clearConnectionPool() {
if (connectionPoolBuilder_ == null) {
connectionPool_ = null;
onChanged();
} else {
connectionPool_ = null;
connectionPoolBuilder_ = null;
}
return this;
}
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 2;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.Builder getConnectionPoolBuilder() {
onChanged();
return getConnectionPoolFieldBuilder().getBuilder();
}
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 2;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettingsOrBuilder getConnectionPoolOrBuilder() {
if (connectionPoolBuilder_ != null) {
return connectionPoolBuilder_.getMessageOrBuilder();
} else {
return connectionPool_ == null ?
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.getDefaultInstance() : connectionPool_;
}
}
/**
*
* Settings controlling the volume of connections to an upstream service
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings connection_pool = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettingsOrBuilder>
getConnectionPoolFieldBuilder() {
if (connectionPoolBuilder_ == null) {
connectionPoolBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettingsOrBuilder>(
getConnectionPool(),
getParentForChildren(),
isClean());
connectionPool_ = null;
}
return connectionPoolBuilder_;
}
private istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection outlierDetection_;
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection, istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetectionOrBuilder> outlierDetectionBuilder_;
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 3;
* @return Whether the outlierDetection field is set.
*/
public boolean hasOutlierDetection() {
return outlierDetectionBuilder_ != null || outlierDetection_ != null;
}
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 3;
* @return The outlierDetection.
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection getOutlierDetection() {
if (outlierDetectionBuilder_ == null) {
return outlierDetection_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.getDefaultInstance() : outlierDetection_;
} else {
return outlierDetectionBuilder_.getMessage();
}
}
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 3;
*/
public Builder setOutlierDetection(istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection value) {
if (outlierDetectionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
outlierDetection_ = value;
onChanged();
} else {
outlierDetectionBuilder_.setMessage(value);
}
return this;
}
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 3;
*/
public Builder setOutlierDetection(
istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.Builder builderForValue) {
if (outlierDetectionBuilder_ == null) {
outlierDetection_ = builderForValue.build();
onChanged();
} else {
outlierDetectionBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 3;
*/
public Builder mergeOutlierDetection(istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection value) {
if (outlierDetectionBuilder_ == null) {
if (outlierDetection_ != null) {
outlierDetection_ =
istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.newBuilder(outlierDetection_).mergeFrom(value).buildPartial();
} else {
outlierDetection_ = value;
}
onChanged();
} else {
outlierDetectionBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 3;
*/
public Builder clearOutlierDetection() {
if (outlierDetectionBuilder_ == null) {
outlierDetection_ = null;
onChanged();
} else {
outlierDetection_ = null;
outlierDetectionBuilder_ = null;
}
return this;
}
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 3;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.Builder getOutlierDetectionBuilder() {
onChanged();
return getOutlierDetectionFieldBuilder().getBuilder();
}
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 3;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetectionOrBuilder getOutlierDetectionOrBuilder() {
if (outlierDetectionBuilder_ != null) {
return outlierDetectionBuilder_.getMessageOrBuilder();
} else {
return outlierDetection_ == null ?
istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.getDefaultInstance() : outlierDetection_;
}
}
/**
*
* Settings controlling eviction of unhealthy hosts from the load balancing pool
*
*
* .istio.networking.v1alpha3.OutlierDetection outlier_detection = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection, istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetectionOrBuilder>
getOutlierDetectionFieldBuilder() {
if (outlierDetectionBuilder_ == null) {
outlierDetectionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection, istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetectionOrBuilder>(
getOutlierDetection(),
getParentForChildren(),
isClean());
outlierDetection_ = null;
}
return outlierDetectionBuilder_;
}
private istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings tls_;
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings, istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettingsOrBuilder> tlsBuilder_;
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 4;
* @return Whether the tls field is set.
*/
public boolean hasTls() {
return tlsBuilder_ != null || tls_ != null;
}
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 4;
* @return The tls.
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings getTls() {
if (tlsBuilder_ == null) {
return tls_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.getDefaultInstance() : tls_;
} else {
return tlsBuilder_.getMessage();
}
}
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 4;
*/
public Builder setTls(istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings value) {
if (tlsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tls_ = value;
onChanged();
} else {
tlsBuilder_.setMessage(value);
}
return this;
}
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 4;
*/
public Builder setTls(
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.Builder builderForValue) {
if (tlsBuilder_ == null) {
tls_ = builderForValue.build();
onChanged();
} else {
tlsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 4;
*/
public Builder mergeTls(istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings value) {
if (tlsBuilder_ == null) {
if (tls_ != null) {
tls_ =
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.newBuilder(tls_).mergeFrom(value).buildPartial();
} else {
tls_ = value;
}
onChanged();
} else {
tlsBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 4;
*/
public Builder clearTls() {
if (tlsBuilder_ == null) {
tls_ = null;
onChanged();
} else {
tls_ = null;
tlsBuilder_ = null;
}
return this;
}
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 4;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.Builder getTlsBuilder() {
onChanged();
return getTlsFieldBuilder().getBuilder();
}
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 4;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettingsOrBuilder getTlsOrBuilder() {
if (tlsBuilder_ != null) {
return tlsBuilder_.getMessageOrBuilder();
} else {
return tls_ == null ?
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.getDefaultInstance() : tls_;
}
}
/**
*
* TLS related settings for connections to the upstream service.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings tls = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings, istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettingsOrBuilder>
getTlsFieldBuilder() {
if (tlsBuilder_ == null) {
tlsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings, istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettingsOrBuilder>(
getTls(),
getParentForChildren(),
isClean());
tls_ = null;
}
return tlsBuilder_;
}
private java.util.List portLevelSettings_ =
java.util.Collections.emptyList();
private void ensurePortLevelSettingsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
portLevelSettings_ = new java.util.ArrayList(portLevelSettings_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy, istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicyOrBuilder> portLevelSettingsBuilder_;
/**
*
* 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 getPortLevelSettingsList() {
if (portLevelSettingsBuilder_ == null) {
return java.util.Collections.unmodifiableList(portLevelSettings_);
} else {
return portLevelSettingsBuilder_.getMessageList();
}
}
/**
*
* 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.
*
*
* repeated .istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy port_level_settings = 5;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy getPortLevelSettings(int index) {
if (portLevelSettingsBuilder_ == null) {
return portLevelSettings_.get(index);
} else {
return portLevelSettingsBuilder_.getMessage(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 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.
*
*
* repeated .istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy port_level_settings = 5;
*/
public Builder setPortLevelSettings(
int index, istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy.Builder builderForValue) {
if (portLevelSettingsBuilder_ == null) {
ensurePortLevelSettingsIsMutable();
portLevelSettings_.set(index, builderForValue.build());
onChanged();
} else {
portLevelSettingsBuilder_.setMessage(index, builderForValue.build());
}
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(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.
*
*
* repeated .istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy port_level_settings = 5;
*/
public Builder addPortLevelSettings(
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy.Builder builderForValue) {
if (portLevelSettingsBuilder_ == null) {
ensurePortLevelSettingsIsMutable();
portLevelSettings_.add(builderForValue.build());
onChanged();
} else {
portLevelSettingsBuilder_.addMessage(builderForValue.build());
}
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.Builder builderForValue) {
if (portLevelSettingsBuilder_ == null) {
ensurePortLevelSettingsIsMutable();
portLevelSettings_.add(index, builderForValue.build());
onChanged();
} else {
portLevelSettingsBuilder_.addMessage(index, builderForValue.build());
}
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 addAllPortLevelSettings(
java.lang.Iterable extends istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy> values) {
if (portLevelSettingsBuilder_ == null) {
ensurePortLevelSettingsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, portLevelSettings_);
onChanged();
} else {
portLevelSettingsBuilder_.addAllMessages(values);
}
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 clearPortLevelSettings() {
if (portLevelSettingsBuilder_ == null) {
portLevelSettings_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
portLevelSettingsBuilder_.clear();
}
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 removePortLevelSettings(int index) {
if (portLevelSettingsBuilder_ == null) {
ensurePortLevelSettingsIsMutable();
portLevelSettings_.remove(index);
onChanged();
} else {
portLevelSettingsBuilder_.remove(index);
}
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 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.
*
*
* repeated .istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy port_level_settings = 5;
*/
public java.util.List extends istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicyOrBuilder>
getPortLevelSettingsOrBuilderList() {
if (portLevelSettingsBuilder_ != null) {
return portLevelSettingsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(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.
*
*
* repeated .istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy port_level_settings = 5;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy.Builder addPortLevelSettingsBuilder() {
return getPortLevelSettingsFieldBuilder().addBuilder(
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy.getDefaultInstance());
}
/**
*
* 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 addPortLevelSettingsBuilder(
int index) {
return getPortLevelSettingsFieldBuilder().addBuilder(
index, istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.PortTrafficPolicy.getDefaultInstance());
}
/**
*
* 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.
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The name.
*/
java.lang.String getName();
/**
*
* Name of the subset. The service name and the subset name can
* be used for traffic splitting in a route rule.
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* 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;
*/
int getLabelsCount();
/**
*
* 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;
*/
boolean containsLabels(
java.lang.String key);
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getLabels();
/**
*
* 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;
*/
java.util.Map
getLabelsMap();
/**
*
* 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;
*/
java.lang.String getLabelsOrDefault(
java.lang.String key,
java.lang.String defaultValue);
/**
*
* 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;
*/
java.lang.String getLabelsOrThrow(
java.lang.String key);
/**
*
* 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;
* @return Whether the trafficPolicy field is set.
*/
boolean hasTrafficPolicy();
/**
*
* 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;
* @return The trafficPolicy.
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy getTrafficPolicy();
/**
*
* 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;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicyOrBuilder getTrafficPolicyOrBuilder();
}
/**
*
* 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.
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
* Name of the subset. The service name and the subset name can
* be used for traffic splitting in a route rule.
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LABELS_FIELD_NUMBER = 2;
private static final class LabelsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_Subset_LabelsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> labels_;
private com.google.protobuf.MapField
internalGetLabels() {
if (labels_ == null) {
return com.google.protobuf.MapField.emptyMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
*
* 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;
*/
@java.lang.Override
public boolean containsLabels(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetLabels().getMap().containsKey(key);
}
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getLabels() {
return getLabelsMap();
}
/**
*
* 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;
*/
@java.lang.Override
public java.util.Map getLabelsMap() {
return internalGetLabels().getMap();
}
/**
*
* 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;
*/
@java.lang.Override
public java.lang.String getLabelsOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetLabels().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* 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;
*/
@java.lang.Override
public java.lang.String getLabelsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetLabels().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int 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.
*
*
* .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 3;
* @return Whether the trafficPolicy field is set.
*/
@java.lang.Override
public boolean hasTrafficPolicy() {
return trafficPolicy_ != null;
}
/**
*
* 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;
* @return The trafficPolicy.
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy getTrafficPolicy() {
return trafficPolicy_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.getDefaultInstance() : 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.
*
*
* .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 3;
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicyOrBuilder getTrafficPolicyOrBuilder() {
return getTrafficPolicy();
}
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_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetLabels(),
LabelsDefaultEntryHolder.defaultEntry,
2);
if (trafficPolicy_ != null) {
output.writeMessage(3, getTrafficPolicy());
}
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_);
}
for (java.util.Map.Entry entry
: internalGetLabels().getMap().entrySet()) {
com.google.protobuf.MapEntry
labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, labels__);
}
if (trafficPolicy_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getTrafficPolicy());
}
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.Subset)) {
return super.equals(obj);
}
istio.networking.v1alpha3.DestinationRuleOuterClass.Subset other = (istio.networking.v1alpha3.DestinationRuleOuterClass.Subset) obj;
if (!getName()
.equals(other.getName())) return false;
if (!internalGetLabels().equals(
other.internalGetLabels())) return false;
if (hasTrafficPolicy() != other.hasTrafficPolicy()) return false;
if (hasTrafficPolicy()) {
if (!getTrafficPolicy()
.equals(other.getTrafficPolicy())) 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();
if (!internalGetLabels().getMap().isEmpty()) {
hash = (37 * hash) + LABELS_FIELD_NUMBER;
hash = (53 * hash) + internalGetLabels().hashCode();
}
if (hasTrafficPolicy()) {
hash = (37 * hash) + TRAFFIC_POLICY_FIELD_NUMBER;
hash = (53 * hash) + getTrafficPolicy().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.Subset parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.Subset 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.Subset parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.Subset 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.Subset parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.Subset parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.Subset parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.Subset 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.Subset parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.Subset 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.Subset parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.Subset 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.Subset 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 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.
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Name of the subset. The service name and the subset name can
* be used for traffic splitting in a route rule.
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Name of the subset. The service name and the subset name can
* be used for traffic splitting in a route rule.
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* Name of the subset. The service name and the subset name can
* be used for traffic splitting in a route rule.
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Name of the subset. The service name and the subset name can
* be used for traffic splitting in a route rule.
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> labels_;
private com.google.protobuf.MapField
internalGetLabels() {
if (labels_ == null) {
return com.google.protobuf.MapField.emptyMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
private com.google.protobuf.MapField
internalGetMutableLabels() {
onChanged();;
if (labels_ == null) {
labels_ = com.google.protobuf.MapField.newMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
if (!labels_.isMutable()) {
labels_ = labels_.copy();
}
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
*
* 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;
*/
@java.lang.Override
public boolean containsLabels(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetLabels().getMap().containsKey(key);
}
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getLabels() {
return getLabelsMap();
}
/**
*
* 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;
*/
@java.lang.Override
public java.util.Map getLabelsMap() {
return internalGetLabels().getMap();
}
/**
*
* 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;
*/
@java.lang.Override
public java.lang.String getLabelsOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetLabels().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* 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;
*/
@java.lang.Override
public java.lang.String getLabelsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetLabels().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearLabels() {
internalGetMutableLabels().getMutableMap()
.clear();
return this;
}
/**
*
* 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 Builder removeLabels(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableLabels().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableLabels() {
return internalGetMutableLabels().getMutableMap();
}
/**
*
* 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 Builder putLabels(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableLabels().getMutableMap()
.put(key, value);
return this;
}
/**
*
* 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 Builder putAllLabels(
java.util.Map values) {
internalGetMutableLabels().getMutableMap()
.putAll(values);
return this;
}
private istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy trafficPolicy_;
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy, istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicyOrBuilder> trafficPolicyBuilder_;
/**
*
* 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;
* @return Whether the trafficPolicy field is set.
*/
public boolean hasTrafficPolicy() {
return trafficPolicyBuilder_ != null || trafficPolicy_ != null;
}
/**
*
* 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;
* @return The trafficPolicy.
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy getTrafficPolicy() {
if (trafficPolicyBuilder_ == null) {
return trafficPolicy_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.getDefaultInstance() : trafficPolicy_;
} else {
return trafficPolicyBuilder_.getMessage();
}
}
/**
*
* 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.
*
*
* .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 3;
*/
public Builder setTrafficPolicy(
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.Builder builderForValue) {
if (trafficPolicyBuilder_ == null) {
trafficPolicy_ = builderForValue.build();
onChanged();
} else {
trafficPolicyBuilder_.setMessage(builderForValue.build());
}
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.
*
*
* .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 3;
*/
public Builder mergeTrafficPolicy(istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy value) {
if (trafficPolicyBuilder_ == null) {
if (trafficPolicy_ != null) {
trafficPolicy_ =
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.newBuilder(trafficPolicy_).mergeFrom(value).buildPartial();
} else {
trafficPolicy_ = value;
}
onChanged();
} else {
trafficPolicyBuilder_.mergeFrom(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.
*
*
* .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 3;
*/
public Builder clearTrafficPolicy() {
if (trafficPolicyBuilder_ == null) {
trafficPolicy_ = null;
onChanged();
} else {
trafficPolicy_ = null;
trafficPolicyBuilder_ = null;
}
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.
*
*
* .istio.networking.v1alpha3.TrafficPolicy traffic_policy = 3;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.Builder getTrafficPolicyBuilder() {
onChanged();
return getTrafficPolicyFieldBuilder().getBuilder();
}
/**
*
* 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 istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicyOrBuilder getTrafficPolicyOrBuilder() {
if (trafficPolicyBuilder_ != null) {
return trafficPolicyBuilder_.getMessageOrBuilder();
} else {
return trafficPolicy_ == null ?
istio.networking.v1alpha3.DestinationRuleOuterClass.TrafficPolicy.getDefaultInstance() : 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.
*
*
* .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;
* @return Whether the simple field is set.
*/
boolean hasSimple();
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB simple = 1;
* @return The enum numeric value on the wire for simple.
*/
int getSimpleValue();
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB simple = 1;
* @return The simple.
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.SimpleLB getSimple();
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB consistent_hash = 2;
* @return Whether the consistentHash field is set.
*/
boolean hasConsistentHash();
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB consistent_hash = 2;
* @return The consistentHash.
*/
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
*
*
* .istio.networking.v1alpha3.LocalityLoadBalancerSetting locality_lb_setting = 3;
* @return Whether the localityLbSetting field is set.
*/
boolean hasLocalityLbSetting();
/**
*
* 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;
* @return The localityLbSetting.
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting getLocalityLbSetting();
/**
*
* 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;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSettingOrBuilder getLocalityLbSettingOrBuilder();
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.LbPolicyCase getLbPolicyCase();
}
/**
*
* 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>}}
*
*
* Protobuf type {@code istio.networking.v1alpha3.LoadBalancerSettings}
*/
public static final class LoadBalancerSettings extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:istio.networking.v1alpha3.LoadBalancerSettings)
LoadBalancerSettingsOrBuilder {
private static final long serialVersionUID = 0L;
// Use LoadBalancerSettings.newBuilder() to construct.
private LoadBalancerSettings(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LoadBalancerSettings() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new LoadBalancerSettings();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private LoadBalancerSettings(
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: {
int rawValue = input.readEnum();
lbPolicyCase_ = 1;
lbPolicy_ = rawValue;
break;
}
case 18: {
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.Builder subBuilder = null;
if (lbPolicyCase_ == 2) {
subBuilder = ((istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB) lbPolicy_).toBuilder();
}
lbPolicy_ =
input.readMessage(istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB) lbPolicy_);
lbPolicy_ = subBuilder.buildPartial();
}
lbPolicyCase_ = 2;
break;
}
case 26: {
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Builder subBuilder = null;
if (localityLbSetting_ != null) {
subBuilder = localityLbSetting_.toBuilder();
}
localityLbSetting_ = input.readMessage(istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(localityLbSetting_);
localityLbSetting_ = 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_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LoadBalancerSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.class, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.Builder.class);
}
/**
*
* Standard load balancing algorithms that require no tuning.
*
*
* Protobuf enum {@code istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB}
*/
public enum SimpleLB
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Round Robin policy. Default
*
*
* ROUND_ROBIN = 0;
*/
ROUND_ROBIN(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;
*/
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.
*
*
* PASSTHROUGH = 3;
*/
PASSTHROUGH(3),
UNRECOGNIZED(-1),
;
/**
*
* Round Robin policy. Default
*
*
* 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;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static SimpleLB valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static 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() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
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 {
/**
*
* Hash based on a specific HTTP header.
*
*
* string http_header_name = 1;
* @return Whether the httpHeaderName field is set.
*/
boolean hasHttpHeaderName();
/**
*
* Hash based on a specific HTTP header.
*
*
* string http_header_name = 1;
* @return The httpHeaderName.
*/
java.lang.String getHttpHeaderName();
/**
*
* Hash based on a specific HTTP header.
*
*
* string http_header_name = 1;
* @return The bytes for httpHeaderName.
*/
com.google.protobuf.ByteString
getHttpHeaderNameBytes();
/**
*
* Hash based on HTTP cookie.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie http_cookie = 2;
* @return Whether the httpCookie field is set.
*/
boolean hasHttpCookie();
/**
*
* Hash based on HTTP cookie.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie http_cookie = 2;
* @return The httpCookie.
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie getHttpCookie();
/**
*
* Hash based on HTTP cookie.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie http_cookie = 2;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookieOrBuilder getHttpCookieOrBuilder();
/**
*
* Hash based on the source IP address.
*
*
* bool use_source_ip = 3;
* @return Whether the useSourceIp field is set.
*/
boolean hasUseSourceIp();
/**
*
* Hash based on the source IP address.
*
*
* bool use_source_ip = 3;
* @return The useSourceIp.
*/
boolean getUseSourceIp();
/**
*
* Hash based on a specific HTTP query parameter.
*
*
* string http_query_parameter_name = 5;
* @return Whether the httpQueryParameterName field is set.
*/
boolean hasHttpQueryParameterName();
/**
*
* Hash based on a specific HTTP query parameter.
*
*
* string http_query_parameter_name = 5;
* @return The httpQueryParameterName.
*/
java.lang.String getHttpQueryParameterName();
/**
*
* Hash based on a specific HTTP query parameter.
*
*
* string http_query_parameter_name = 5;
* @return The bytes for httpQueryParameterName.
*/
com.google.protobuf.ByteString
getHttpQueryParameterNameBytes();
/**
*
* 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;
* @return The minimumRingSize.
*/
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 {
/**
*
* Name of the cookie.
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The name.
*/
java.lang.String getName();
/**
*
* Name of the cookie.
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* Path to set for the cookie.
*
*
* string path = 2;
* @return The path.
*/
java.lang.String getPath();
/**
*
* Path to set for the cookie.
*
*
* string path = 2;
* @return The bytes for path.
*/
com.google.protobuf.ByteString
getPathBytes();
/**
*
* Lifetime of the cookie.
*
*
* .google.protobuf.Duration ttl = 3 [(.google.api.field_behavior) = REQUIRED];
* @return Whether the ttl field is set.
*/
boolean hasTtl();
/**
*
* Lifetime of the cookie.
*
*
* .google.protobuf.Duration ttl = 3 [(.google.api.field_behavior) = REQUIRED];
* @return The ttl.
*/
com.google.protobuf.Duration getTtl();
/**
*
* Lifetime of the cookie.
*
*
* .google.protobuf.Duration ttl = 3 [(.google.api.field_behavior) = REQUIRED];
*/
com.google.protobuf.DurationOrBuilder getTtlOrBuilder();
}
/**
*
* 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_;
/**
*
* Name of the cookie.
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
* Name of the cookie.
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PATH_FIELD_NUMBER = 2;
private volatile java.lang.Object path_;
/**
*
* Path to set for the cookie.
*
*
* string path = 2;
* @return The path.
*/
@java.lang.Override
public java.lang.String getPath() {
java.lang.Object ref = path_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
path_ = s;
return s;
}
}
/**
*
* Path to set for the cookie.
*
*
* string path = 2;
* @return The bytes for path.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPathBytes() {
java.lang.Object ref = path_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
path_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TTL_FIELD_NUMBER = 3;
private com.google.protobuf.Duration ttl_;
/**
*
* Lifetime of the cookie.
*
*
* .google.protobuf.Duration ttl = 3 [(.google.api.field_behavior) = REQUIRED];
* @return Whether the ttl field is set.
*/
@java.lang.Override
public boolean hasTtl() {
return ttl_ != null;
}
/**
*
* Lifetime of the cookie.
*
*
* .google.protobuf.Duration ttl = 3 [(.google.api.field_behavior) = REQUIRED];
* @return The ttl.
*/
@java.lang.Override
public com.google.protobuf.Duration getTtl() {
return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_;
}
/**
*
* Lifetime of the cookie.
*
*
* .google.protobuf.Duration ttl = 3 [(.google.api.field_behavior) = REQUIRED];
*/
@java.lang.Override
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_ = "";
/**
*
* Name of the cookie.
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Name of the cookie.
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Name of the cookie.
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* Name of the cookie.
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Name of the cookie.
*
*
* string name = 1 [(.google.api.field_behavior) = REQUIRED];
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private java.lang.Object path_ = "";
/**
*
* Path to set for the cookie.
*
*
* string path = 2;
* @return The path.
*/
public java.lang.String getPath() {
java.lang.Object ref = path_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
path_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Path to set for the cookie.
*
*
* string path = 2;
* @return The bytes for path.
*/
public com.google.protobuf.ByteString
getPathBytes() {
java.lang.Object ref = path_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
path_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Path to set for the cookie.
*
*
* string path = 2;
* @param value The path to set.
* @return This builder for chaining.
*/
public Builder setPath(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
path_ = value;
onChanged();
return this;
}
/**
*
* Path to set for the cookie.
*
*
* string path = 2;
* @return This builder for chaining.
*/
public Builder clearPath() {
path_ = getDefaultInstance().getPath();
onChanged();
return this;
}
/**
*
* Path to set for the cookie.
*
*
* string path = 2;
* @param value The bytes for path to set.
* @return This builder for chaining.
*/
public Builder setPathBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
path_ = value;
onChanged();
return this;
}
private com.google.protobuf.Duration ttl_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> ttlBuilder_;
/**
*
* Lifetime of the cookie.
*
*
* .google.protobuf.Duration ttl = 3 [(.google.api.field_behavior) = REQUIRED];
* @return Whether the ttl field is set.
*/
public boolean hasTtl() {
return ttlBuilder_ != null || ttl_ != null;
}
/**
*
* Lifetime of the cookie.
*
*
* .google.protobuf.Duration ttl = 3 [(.google.api.field_behavior) = REQUIRED];
* @return The ttl.
*/
public com.google.protobuf.Duration getTtl() {
if (ttlBuilder_ == null) {
return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_;
} else {
return ttlBuilder_.getMessage();
}
}
/**
*
* Lifetime of the cookie.
*
*
* .google.protobuf.Duration ttl = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder setTtl(com.google.protobuf.Duration value) {
if (ttlBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ttl_ = value;
onChanged();
} else {
ttlBuilder_.setMessage(value);
}
return this;
}
/**
*
* Lifetime of the cookie.
*
*
* .google.protobuf.Duration ttl = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder setTtl(
com.google.protobuf.Duration.Builder builderForValue) {
if (ttlBuilder_ == null) {
ttl_ = builderForValue.build();
onChanged();
} else {
ttlBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Lifetime of the cookie.
*
*
* .google.protobuf.Duration ttl = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder mergeTtl(com.google.protobuf.Duration value) {
if (ttlBuilder_ == null) {
if (ttl_ != null) {
ttl_ =
com.google.protobuf.Duration.newBuilder(ttl_).mergeFrom(value).buildPartial();
} else {
ttl_ = value;
}
onChanged();
} else {
ttlBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Lifetime of the cookie.
*
*
* .google.protobuf.Duration ttl = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder clearTtl() {
if (ttlBuilder_ == null) {
ttl_ = null;
onChanged();
} else {
ttl_ = null;
ttlBuilder_ = null;
}
return this;
}
/**
*
* Lifetime of the cookie.
*
*
* .google.protobuf.Duration ttl = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.protobuf.Duration.Builder getTtlBuilder() {
onChanged();
return getTtlFieldBuilder().getBuilder();
}
/**
*
* Lifetime of the cookie.
*
*
* .google.protobuf.Duration ttl = 3 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() {
if (ttlBuilder_ != null) {
return ttlBuilder_.getMessageOrBuilder();
} else {
return ttl_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : ttl_;
}
}
/**
*
* Lifetime of the cookie.
*
*
* .google.protobuf.Duration ttl = 3 [(.google.api.field_behavior) = REQUIRED];
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getTtlFieldBuilder() {
if (ttlBuilder_ == null) {
ttlBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getTtl(),
getParentForChildren(),
isClean());
ttl_ = null;
}
return ttlBuilder_;
}
@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.HTTPCookie)
}
// @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie)
private static final istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie();
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public HTTPCookie parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HTTPCookie(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.HTTPCookie getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int hashKeyCase_ = 0;
private java.lang.Object hashKey_;
public enum HashKeyCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
HTTP_HEADER_NAME(1),
HTTP_COOKIE(2),
USE_SOURCE_IP(3),
HTTP_QUERY_PARAMETER_NAME(5),
HASHKEY_NOT_SET(0);
private final int value;
private HashKeyCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static HashKeyCase valueOf(int value) {
return forNumber(value);
}
public static HashKeyCase forNumber(int value) {
switch (value) {
case 1: return HTTP_HEADER_NAME;
case 2: return HTTP_COOKIE;
case 3: return USE_SOURCE_IP;
case 5: return HTTP_QUERY_PARAMETER_NAME;
case 0: return HASHKEY_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public HashKeyCase
getHashKeyCase() {
return HashKeyCase.forNumber(
hashKeyCase_);
}
public static final int HTTP_HEADER_NAME_FIELD_NUMBER = 1;
/**
*
* Hash based on a specific HTTP header.
*
*
* string http_header_name = 1;
* @return Whether the httpHeaderName field is set.
*/
public boolean hasHttpHeaderName() {
return hashKeyCase_ == 1;
}
/**
*
* Hash based on a specific HTTP header.
*
*
* string http_header_name = 1;
* @return The httpHeaderName.
*/
public java.lang.String getHttpHeaderName() {
java.lang.Object ref = "";
if (hashKeyCase_ == 1) {
ref = hashKey_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (hashKeyCase_ == 1) {
hashKey_ = s;
}
return s;
}
}
/**
*
* Hash based on a specific HTTP header.
*
*
* string http_header_name = 1;
* @return The bytes for httpHeaderName.
*/
public com.google.protobuf.ByteString
getHttpHeaderNameBytes() {
java.lang.Object ref = "";
if (hashKeyCase_ == 1) {
ref = hashKey_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (hashKeyCase_ == 1) {
hashKey_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int HTTP_COOKIE_FIELD_NUMBER = 2;
/**
*
* Hash based on HTTP cookie.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie http_cookie = 2;
* @return Whether the httpCookie field is set.
*/
@java.lang.Override
public boolean hasHttpCookie() {
return hashKeyCase_ == 2;
}
/**
*
* Hash based on HTTP cookie.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie http_cookie = 2;
* @return The httpCookie.
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie getHttpCookie() {
if (hashKeyCase_ == 2) {
return (istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie) hashKey_;
}
return istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.getDefaultInstance();
}
/**
*
* Hash based on HTTP cookie.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie http_cookie = 2;
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookieOrBuilder getHttpCookieOrBuilder() {
if (hashKeyCase_ == 2) {
return (istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie) hashKey_;
}
return istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.getDefaultInstance();
}
public static final int USE_SOURCE_IP_FIELD_NUMBER = 3;
/**
*
* Hash based on the source IP address.
*
*
* bool use_source_ip = 3;
* @return Whether the useSourceIp field is set.
*/
@java.lang.Override
public boolean hasUseSourceIp() {
return hashKeyCase_ == 3;
}
/**
*
* Hash based on the source IP address.
*
*
* bool use_source_ip = 3;
* @return The useSourceIp.
*/
@java.lang.Override
public boolean getUseSourceIp() {
if (hashKeyCase_ == 3) {
return (java.lang.Boolean) hashKey_;
}
return false;
}
public static final int HTTP_QUERY_PARAMETER_NAME_FIELD_NUMBER = 5;
/**
*
* Hash based on a specific HTTP query parameter.
*
*
* string http_query_parameter_name = 5;
* @return Whether the httpQueryParameterName field is set.
*/
public boolean hasHttpQueryParameterName() {
return hashKeyCase_ == 5;
}
/**
*
* Hash based on a specific HTTP query parameter.
*
*
* string http_query_parameter_name = 5;
* @return The httpQueryParameterName.
*/
public java.lang.String getHttpQueryParameterName() {
java.lang.Object ref = "";
if (hashKeyCase_ == 5) {
ref = hashKey_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (hashKeyCase_ == 5) {
hashKey_ = s;
}
return s;
}
}
/**
*
* Hash based on a specific HTTP query parameter.
*
*
* string http_query_parameter_name = 5;
* @return The bytes for httpQueryParameterName.
*/
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;
* @return The minimumRingSize.
*/
@java.lang.Override
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 header.
*
*
* string http_header_name = 1;
* @return Whether the httpHeaderName field is set.
*/
@java.lang.Override
public boolean hasHttpHeaderName() {
return hashKeyCase_ == 1;
}
/**
*
* Hash based on a specific HTTP header.
*
*
* string http_header_name = 1;
* @return The httpHeaderName.
*/
@java.lang.Override
public java.lang.String getHttpHeaderName() {
java.lang.Object ref = "";
if (hashKeyCase_ == 1) {
ref = hashKey_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (hashKeyCase_ == 1) {
hashKey_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Hash based on a specific HTTP header.
*
*
* string http_header_name = 1;
* @return The bytes for httpHeaderName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getHttpHeaderNameBytes() {
java.lang.Object ref = "";
if (hashKeyCase_ == 1) {
ref = hashKey_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (hashKeyCase_ == 1) {
hashKey_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Hash based on a specific HTTP header.
*
*
* string http_header_name = 1;
* @param value The httpHeaderName to set.
* @return This builder for chaining.
*/
public Builder setHttpHeaderName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
hashKeyCase_ = 1;
hashKey_ = value;
onChanged();
return this;
}
/**
*
* Hash based on a specific HTTP header.
*
*
* string http_header_name = 1;
* @return This builder for chaining.
*/
public Builder clearHttpHeaderName() {
if (hashKeyCase_ == 1) {
hashKeyCase_ = 0;
hashKey_ = null;
onChanged();
}
return this;
}
/**
*
* Hash based on a specific HTTP header.
*
*
* string http_header_name = 1;
* @param value The bytes for httpHeaderName to set.
* @return This builder for chaining.
*/
public Builder setHttpHeaderNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
hashKeyCase_ = 1;
hashKey_ = value;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookieOrBuilder> httpCookieBuilder_;
/**
*
* Hash based on HTTP cookie.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie http_cookie = 2;
* @return Whether the httpCookie field is set.
*/
@java.lang.Override
public boolean hasHttpCookie() {
return hashKeyCase_ == 2;
}
/**
*
* Hash based on HTTP cookie.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie http_cookie = 2;
* @return The httpCookie.
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie getHttpCookie() {
if (httpCookieBuilder_ == null) {
if (hashKeyCase_ == 2) {
return (istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie) hashKey_;
}
return istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.getDefaultInstance();
} else {
if (hashKeyCase_ == 2) {
return httpCookieBuilder_.getMessage();
}
return istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.getDefaultInstance();
}
}
/**
*
* Hash based on HTTP cookie.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie http_cookie = 2;
*/
public Builder setHttpCookie(istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie value) {
if (httpCookieBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
hashKey_ = value;
onChanged();
} else {
httpCookieBuilder_.setMessage(value);
}
hashKeyCase_ = 2;
return this;
}
/**
*
* Hash based on HTTP cookie.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie http_cookie = 2;
*/
public Builder setHttpCookie(
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.Builder builderForValue) {
if (httpCookieBuilder_ == null) {
hashKey_ = builderForValue.build();
onChanged();
} else {
httpCookieBuilder_.setMessage(builderForValue.build());
}
hashKeyCase_ = 2;
return this;
}
/**
*
* Hash based on HTTP cookie.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie http_cookie = 2;
*/
public Builder mergeHttpCookie(istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie value) {
if (httpCookieBuilder_ == null) {
if (hashKeyCase_ == 2 &&
hashKey_ != istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.getDefaultInstance()) {
hashKey_ = istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.newBuilder((istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie) hashKey_)
.mergeFrom(value).buildPartial();
} else {
hashKey_ = value;
}
onChanged();
} else {
if (hashKeyCase_ == 2) {
httpCookieBuilder_.mergeFrom(value);
}
httpCookieBuilder_.setMessage(value);
}
hashKeyCase_ = 2;
return this;
}
/**
*
* Hash based on HTTP cookie.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie http_cookie = 2;
*/
public Builder clearHttpCookie() {
if (httpCookieBuilder_ == null) {
if (hashKeyCase_ == 2) {
hashKeyCase_ = 0;
hashKey_ = null;
onChanged();
}
} else {
if (hashKeyCase_ == 2) {
hashKeyCase_ = 0;
hashKey_ = null;
}
httpCookieBuilder_.clear();
}
return this;
}
/**
*
* Hash based on HTTP cookie.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie http_cookie = 2;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.Builder getHttpCookieBuilder() {
return getHttpCookieFieldBuilder().getBuilder();
}
/**
*
* Hash based on HTTP cookie.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie http_cookie = 2;
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookieOrBuilder getHttpCookieOrBuilder() {
if ((hashKeyCase_ == 2) && (httpCookieBuilder_ != null)) {
return httpCookieBuilder_.getMessageOrBuilder();
} else {
if (hashKeyCase_ == 2) {
return (istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie) hashKey_;
}
return istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.getDefaultInstance();
}
}
/**
*
* Hash based on HTTP cookie.
*
*
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie http_cookie = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookieOrBuilder>
getHttpCookieFieldBuilder() {
if (httpCookieBuilder_ == null) {
if (!(hashKeyCase_ == 2)) {
hashKey_ = istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.getDefaultInstance();
}
httpCookieBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookieOrBuilder>(
(istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.HTTPCookie) hashKey_,
getParentForChildren(),
isClean());
hashKey_ = null;
}
hashKeyCase_ = 2;
onChanged();;
return httpCookieBuilder_;
}
/**
*
* Hash based on the source IP address.
*
*
* bool use_source_ip = 3;
* @return Whether the useSourceIp field is set.
*/
public boolean hasUseSourceIp() {
return hashKeyCase_ == 3;
}
/**
*
* Hash based on the source IP address.
*
*
* bool use_source_ip = 3;
* @return The useSourceIp.
*/
public boolean getUseSourceIp() {
if (hashKeyCase_ == 3) {
return (java.lang.Boolean) hashKey_;
}
return false;
}
/**
*
* Hash based on the source IP address.
*
*
* bool use_source_ip = 3;
* @param value The useSourceIp to set.
* @return This builder for chaining.
*/
public Builder setUseSourceIp(boolean value) {
hashKeyCase_ = 3;
hashKey_ = value;
onChanged();
return this;
}
/**
*
* Hash based on the source IP address.
*
*
* bool use_source_ip = 3;
* @return This builder for chaining.
*/
public Builder clearUseSourceIp() {
if (hashKeyCase_ == 3) {
hashKeyCase_ = 0;
hashKey_ = null;
onChanged();
}
return this;
}
/**
*
* Hash based on a specific HTTP query parameter.
*
*
* string http_query_parameter_name = 5;
* @return Whether the httpQueryParameterName field is set.
*/
@java.lang.Override
public boolean hasHttpQueryParameterName() {
return hashKeyCase_ == 5;
}
/**
*
* Hash based on a specific HTTP query parameter.
*
*
* string http_query_parameter_name = 5;
* @return The httpQueryParameterName.
*/
@java.lang.Override
public java.lang.String getHttpQueryParameterName() {
java.lang.Object ref = "";
if (hashKeyCase_ == 5) {
ref = hashKey_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (hashKeyCase_ == 5) {
hashKey_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Hash based on a specific HTTP query parameter.
*
*
* string http_query_parameter_name = 5;
* @return The bytes for httpQueryParameterName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getHttpQueryParameterNameBytes() {
java.lang.Object ref = "";
if (hashKeyCase_ == 5) {
ref = hashKey_;
}
if (ref instanceof 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;
}
}
/**
*
* Hash based on a specific HTTP query parameter.
*
*
* string http_query_parameter_name = 5;
* @param value The httpQueryParameterName to set.
* @return This builder for chaining.
*/
public Builder setHttpQueryParameterName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
hashKeyCase_ = 5;
hashKey_ = value;
onChanged();
return this;
}
/**
*
* Hash based on a specific HTTP query parameter.
*
*
* string http_query_parameter_name = 5;
* @return This builder for chaining.
*/
public Builder clearHttpQueryParameterName() {
if (hashKeyCase_ == 5) {
hashKeyCase_ = 0;
hashKey_ = null;
onChanged();
}
return this;
}
/**
*
* Hash based on a specific HTTP query parameter.
*
*
* string http_query_parameter_name = 5;
* @param value The bytes for httpQueryParameterName to set.
* @return This builder for chaining.
*/
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;
* @return The minimumRingSize.
*/
@java.lang.Override
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.
*
*
* uint64 minimum_ring_size = 4;
* @param value The minimumRingSize to set.
* @return This builder for chaining.
*/
public Builder setMinimumRingSize(long value) {
minimumRingSize_ = value;
onChanged();
return this;
}
/**
*
* 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;
* @return This builder for chaining.
*/
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,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
SIMPLE(1),
CONSISTENT_HASH(2),
LBPOLICY_NOT_SET(0);
private final int value;
private LbPolicyCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @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;
* @return Whether the simple field is set.
*/
public boolean hasSimple() {
return lbPolicyCase_ == 1;
}
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB simple = 1;
* @return The enum numeric value on the wire for simple.
*/
public int getSimpleValue() {
if (lbPolicyCase_ == 1) {
return (java.lang.Integer) lbPolicy_;
}
return 0;
}
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB simple = 1;
* @return The simple.
*/
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;
* @return Whether the consistentHash field is set.
*/
@java.lang.Override
public boolean hasConsistentHash() {
return lbPolicyCase_ == 2;
}
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB consistent_hash = 2;
* @return The consistentHash.
*/
@java.lang.Override
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;
*/
@java.lang.Override
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
*
*
* .istio.networking.v1alpha3.LocalityLoadBalancerSetting locality_lb_setting = 3;
* @return Whether the localityLbSetting field is set.
*/
@java.lang.Override
public boolean hasLocalityLbSetting() {
return localityLbSetting_ != null;
}
/**
*
* 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;
* @return The localityLbSetting.
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting getLocalityLbSetting() {
return localityLbSetting_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.getDefaultInstance() : 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
*
*
* .istio.networking.v1alpha3.LocalityLoadBalancerSetting locality_lb_setting = 3;
*/
@java.lang.Override
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>}}
*
*
* Protobuf type {@code istio.networking.v1alpha3.LoadBalancerSettings}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:istio.networking.v1alpha3.LoadBalancerSettings)
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettingsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LoadBalancerSettings_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LoadBalancerSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.class, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.Builder.class);
}
// Construct using istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.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();
if (localityLbSettingBuilder_ == null) {
localityLbSetting_ = null;
} else {
localityLbSetting_ = null;
localityLbSettingBuilder_ = null;
}
lbPolicyCase_ = 0;
lbPolicy_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LoadBalancerSettings_descriptor;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings getDefaultInstanceForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.getDefaultInstance();
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings build() {
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings buildPartial() {
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings result = new istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings(this);
if (lbPolicyCase_ == 1) {
result.lbPolicy_ = lbPolicy_;
}
if (lbPolicyCase_ == 2) {
if (consistentHashBuilder_ == null) {
result.lbPolicy_ = lbPolicy_;
} else {
result.lbPolicy_ = consistentHashBuilder_.build();
}
}
if (localityLbSettingBuilder_ == null) {
result.localityLbSetting_ = localityLbSetting_;
} else {
result.localityLbSetting_ = localityLbSettingBuilder_.build();
}
result.lbPolicyCase_ = lbPolicyCase_;
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) {
return mergeFrom((istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings other) {
if (other == istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.getDefaultInstance()) return this;
if (other.hasLocalityLbSetting()) {
mergeLocalityLbSetting(other.getLocalityLbSetting());
}
switch (other.getLbPolicyCase()) {
case SIMPLE: {
setSimpleValue(other.getSimpleValue());
break;
}
case CONSISTENT_HASH: {
mergeConsistentHash(other.getConsistentHash());
break;
}
case LBPOLICY_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 parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int lbPolicyCase_ = 0;
private java.lang.Object lbPolicy_;
public LbPolicyCase
getLbPolicyCase() {
return LbPolicyCase.forNumber(
lbPolicyCase_);
}
public Builder clearLbPolicy() {
lbPolicyCase_ = 0;
lbPolicy_ = null;
onChanged();
return this;
}
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB simple = 1;
* @return Whether the simple field is set.
*/
@java.lang.Override
public boolean hasSimple() {
return lbPolicyCase_ == 1;
}
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB simple = 1;
* @return The enum numeric value on the wire for simple.
*/
@java.lang.Override
public int getSimpleValue() {
if (lbPolicyCase_ == 1) {
return ((java.lang.Integer) lbPolicy_).intValue();
}
return 0;
}
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB simple = 1;
* @param value The enum numeric value on the wire for simple to set.
* @return This builder for chaining.
*/
public Builder setSimpleValue(int value) {
lbPolicyCase_ = 1;
lbPolicy_ = value;
onChanged();
return this;
}
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB simple = 1;
* @return The simple.
*/
@java.lang.Override
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;
}
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB simple = 1;
* @param value The simple to set.
* @return This builder for chaining.
*/
public Builder setSimple(istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.SimpleLB value) {
if (value == null) {
throw new NullPointerException();
}
lbPolicyCase_ = 1;
lbPolicy_ = value.getNumber();
onChanged();
return this;
}
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB simple = 1;
* @return This builder for chaining.
*/
public Builder clearSimple() {
if (lbPolicyCase_ == 1) {
lbPolicyCase_ = 0;
lbPolicy_ = null;
onChanged();
}
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLBOrBuilder> consistentHashBuilder_;
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB consistent_hash = 2;
* @return Whether the consistentHash field is set.
*/
@java.lang.Override
public boolean hasConsistentHash() {
return lbPolicyCase_ == 2;
}
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB consistent_hash = 2;
* @return The consistentHash.
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB getConsistentHash() {
if (consistentHashBuilder_ == null) {
if (lbPolicyCase_ == 2) {
return (istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB) lbPolicy_;
}
return istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.getDefaultInstance();
} else {
if (lbPolicyCase_ == 2) {
return consistentHashBuilder_.getMessage();
}
return istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.getDefaultInstance();
}
}
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB consistent_hash = 2;
*/
public Builder setConsistentHash(istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB value) {
if (consistentHashBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
lbPolicy_ = value;
onChanged();
} else {
consistentHashBuilder_.setMessage(value);
}
lbPolicyCase_ = 2;
return this;
}
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB consistent_hash = 2;
*/
public Builder setConsistentHash(
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.Builder builderForValue) {
if (consistentHashBuilder_ == null) {
lbPolicy_ = builderForValue.build();
onChanged();
} else {
consistentHashBuilder_.setMessage(builderForValue.build());
}
lbPolicyCase_ = 2;
return this;
}
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB consistent_hash = 2;
*/
public Builder mergeConsistentHash(istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB value) {
if (consistentHashBuilder_ == null) {
if (lbPolicyCase_ == 2 &&
lbPolicy_ != istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.getDefaultInstance()) {
lbPolicy_ = istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.newBuilder((istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB) lbPolicy_)
.mergeFrom(value).buildPartial();
} else {
lbPolicy_ = value;
}
onChanged();
} else {
if (lbPolicyCase_ == 2) {
consistentHashBuilder_.mergeFrom(value);
}
consistentHashBuilder_.setMessage(value);
}
lbPolicyCase_ = 2;
return this;
}
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB consistent_hash = 2;
*/
public Builder clearConsistentHash() {
if (consistentHashBuilder_ == null) {
if (lbPolicyCase_ == 2) {
lbPolicyCase_ = 0;
lbPolicy_ = null;
onChanged();
}
} else {
if (lbPolicyCase_ == 2) {
lbPolicyCase_ = 0;
lbPolicy_ = null;
}
consistentHashBuilder_.clear();
}
return this;
}
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB consistent_hash = 2;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.Builder getConsistentHashBuilder() {
return getConsistentHashFieldBuilder().getBuilder();
}
/**
* .istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB consistent_hash = 2;
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLBOrBuilder getConsistentHashOrBuilder() {
if ((lbPolicyCase_ == 2) && (consistentHashBuilder_ != null)) {
return consistentHashBuilder_.getMessageOrBuilder();
} else {
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;
*/
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLBOrBuilder>
getConsistentHashFieldBuilder() {
if (consistentHashBuilder_ == null) {
if (!(lbPolicyCase_ == 2)) {
lbPolicy_ = istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.getDefaultInstance();
}
consistentHashBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLBOrBuilder>(
(istio.networking.v1alpha3.DestinationRuleOuterClass.LoadBalancerSettings.ConsistentHashLB) lbPolicy_,
getParentForChildren(),
isClean());
lbPolicy_ = null;
}
lbPolicyCase_ = 2;
onChanged();;
return consistentHashBuilder_;
}
private istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting localityLbSetting_;
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSettingOrBuilder> localityLbSettingBuilder_;
/**
*
* 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;
* @return Whether the localityLbSetting field is set.
*/
public boolean hasLocalityLbSetting() {
return localityLbSettingBuilder_ != null || localityLbSetting_ != null;
}
/**
*
* 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;
* @return The localityLbSetting.
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting getLocalityLbSetting() {
if (localityLbSettingBuilder_ == null) {
return localityLbSetting_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.getDefaultInstance() : localityLbSetting_;
} else {
return localityLbSettingBuilder_.getMessage();
}
}
/**
*
* 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
*
*
* .istio.networking.v1alpha3.LocalityLoadBalancerSetting locality_lb_setting = 3;
*/
public Builder setLocalityLbSetting(
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Builder builderForValue) {
if (localityLbSettingBuilder_ == null) {
localityLbSetting_ = builderForValue.build();
onChanged();
} else {
localityLbSettingBuilder_.setMessage(builderForValue.build());
}
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
*
*
* .istio.networking.v1alpha3.LocalityLoadBalancerSetting locality_lb_setting = 3;
*/
public Builder mergeLocalityLbSetting(istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting value) {
if (localityLbSettingBuilder_ == null) {
if (localityLbSetting_ != null) {
localityLbSetting_ =
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.newBuilder(localityLbSetting_).mergeFrom(value).buildPartial();
} else {
localityLbSetting_ = value;
}
onChanged();
} else {
localityLbSettingBuilder_.mergeFrom(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
*
*
* .istio.networking.v1alpha3.LocalityLoadBalancerSetting locality_lb_setting = 3;
*/
public Builder clearLocalityLbSetting() {
if (localityLbSettingBuilder_ == null) {
localityLbSetting_ = null;
onChanged();
} else {
localityLbSetting_ = null;
localityLbSettingBuilder_ = null;
}
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
*
*
* .istio.networking.v1alpha3.LocalityLoadBalancerSetting locality_lb_setting = 3;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Builder getLocalityLbSettingBuilder() {
onChanged();
return getLocalityLbSettingFieldBuilder().getBuilder();
}
/**
*
* 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() {
if (localityLbSettingBuilder_ != null) {
return localityLbSettingBuilder_.getMessageOrBuilder();
} else {
return localityLbSetting_ == null ?
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.getDefaultInstance() : 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
*
*
* .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.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings tcp = 1;
* @return Whether the tcp field is set.
*/
boolean hasTcp();
/**
*
* Settings common to both HTTP and TCP upstream connections.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings tcp = 1;
* @return The tcp.
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings getTcp();
/**
*
* Settings common to both HTTP and TCP upstream connections.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings tcp = 1;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettingsOrBuilder getTcpOrBuilder();
/**
*
* HTTP connection pool settings.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings http = 2;
* @return Whether the http field is set.
*/
boolean hasHttp();
/**
*
* HTTP connection pool settings.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings http = 2;
* @return The http.
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings getHttp();
/**
*
* HTTP connection pool settings.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings http = 2;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettingsOrBuilder getHttpOrBuilder();
}
/**
*
* Connection pool settings for an upstream host. The settings apply to
* each individual host in the upstream service. See Envoy's [circuit
* breaker](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/circuit_breaking)
* for more details. Connection pool settings can be applied at the TCP
* level as well as at HTTP level.
* For example, the following rule sets a limit of 100 connections to redis
* service called myredissrv with a connect timeout of 30ms
* {{<tabset category-name="example">}}
* {{<tab name="v1alpha3" category-value="v1alpha3">}}
* ```yaml
* apiVersion: networking.istio.io/v1alpha3
* kind: DestinationRule
* metadata:
* name: bookinfo-redis
* spec:
* host: myredissrv.prod.svc.cluster.local
* trafficPolicy:
* connectionPool:
* tcp:
* maxConnections: 100
* connectTimeout: 30ms
* tcpKeepalive:
* time: 7200s
* interval: 75s
* ```
* {{</tab>}}
* {{<tab name="v1beta1" category-value="v1beta1">}}
* ```yaml
* apiVersion: networking.istio.io/v1beta1
* kind: DestinationRule
* metadata:
* name: bookinfo-redis
* spec:
* host: myredissrv.prod.svc.cluster.local
* trafficPolicy:
* connectionPool:
* tcp:
* maxConnections: 100
* connectTimeout: 30ms
* tcpKeepalive:
* time: 7200s
* interval: 75s
* ```
* {{</tab>}}
* {{</tabset>}}
*
*
* Protobuf type {@code istio.networking.v1alpha3.ConnectionPoolSettings}
*/
public static final class ConnectionPoolSettings extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:istio.networking.v1alpha3.ConnectionPoolSettings)
ConnectionPoolSettingsOrBuilder {
private static final long serialVersionUID = 0L;
// Use ConnectionPoolSettings.newBuilder() to construct.
private ConnectionPoolSettings(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ConnectionPoolSettings() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ConnectionPoolSettings();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ConnectionPoolSettings(
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: {
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.Builder subBuilder = null;
if (tcp_ != null) {
subBuilder = tcp_.toBuilder();
}
tcp_ = input.readMessage(istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(tcp_);
tcp_ = subBuilder.buildPartial();
}
break;
}
case 18: {
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.Builder subBuilder = null;
if (http_ != null) {
subBuilder = http_.toBuilder();
}
http_ = input.readMessage(istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(http_);
http_ = 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_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.class, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.Builder.class);
}
public interface TCPSettingsOrBuilder extends
// @@protoc_insertion_point(interface_extends:istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings)
com.google.protobuf.MessageOrBuilder {
/**
*
* Maximum number of HTTP1 /TCP connections to a destination host. Default 2^32-1.
*
*
* int32 max_connections = 1;
* @return The maxConnections.
*/
int getMaxConnections();
/**
*
* TCP connection timeout. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration connect_timeout = 2;
* @return Whether the connectTimeout field is set.
*/
boolean hasConnectTimeout();
/**
*
* TCP connection timeout. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration connect_timeout = 2;
* @return The connectTimeout.
*/
com.google.protobuf.Duration getConnectTimeout();
/**
*
* TCP connection timeout. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration connect_timeout = 2;
*/
com.google.protobuf.DurationOrBuilder getConnectTimeoutOrBuilder();
/**
*
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive tcp_keepalive = 3;
* @return Whether the tcpKeepalive field is set.
*/
boolean hasTcpKeepalive();
/**
*
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive tcp_keepalive = 3;
* @return The tcpKeepalive.
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive getTcpKeepalive();
/**
*
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive tcp_keepalive = 3;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepaliveOrBuilder getTcpKeepaliveOrBuilder();
}
/**
*
* 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;
* @return The probes.
*/
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.)
*
*
* .google.protobuf.Duration time = 2;
* @return Whether the time field is set.
*/
boolean hasTime();
/**
*
* 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;
* @return The time.
*/
com.google.protobuf.Duration getTime();
/**
*
* 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;
*/
com.google.protobuf.DurationOrBuilder getTimeOrBuilder();
/**
*
* 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;
* @return Whether the interval field is set.
*/
boolean hasInterval();
/**
*
* 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;
* @return The interval.
*/
com.google.protobuf.Duration getInterval();
/**
*
* 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;
*/
com.google.protobuf.DurationOrBuilder getIntervalOrBuilder();
}
/**
*
* TCP keepalive.
*
*
* 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;
* @return The probes.
*/
@java.lang.Override
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;
* @return Whether the time field is set.
*/
@java.lang.Override
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.)
*
*
* .google.protobuf.Duration time = 2;
* @return The time.
*/
@java.lang.Override
public com.google.protobuf.Duration getTime() {
return time_ == null ? com.google.protobuf.Duration.getDefaultInstance() : 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;
*/
@java.lang.Override
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.)
*
*
* .google.protobuf.Duration interval = 3;
* @return Whether the interval field is set.
*/
@java.lang.Override
public boolean hasInterval() {
return interval_ != null;
}
/**
*
* 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;
* @return The interval.
*/
@java.lang.Override
public com.google.protobuf.Duration getInterval() {
return interval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : interval_;
}
/**
*
* 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;
*/
@java.lang.Override
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;
* @return The probes.
*/
@java.lang.Override
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.)
*
*
* uint32 probes = 1;
* @param value The probes to set.
* @return This builder for chaining.
*/
public Builder setProbes(int value) {
probes_ = value;
onChanged();
return this;
}
/**
*
* 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;
* @return This builder for chaining.
*/
public Builder clearProbes() {
probes_ = 0;
onChanged();
return this;
}
private com.google.protobuf.Duration time_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> timeBuilder_;
/**
*
* 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;
* @return Whether the time field is set.
*/
public boolean hasTime() {
return timeBuilder_ != null || 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.)
*
*
* .google.protobuf.Duration time = 2;
* @return The time.
*/
public com.google.protobuf.Duration getTime() {
if (timeBuilder_ == null) {
return time_ == null ? com.google.protobuf.Duration.getDefaultInstance() : time_;
} else {
return timeBuilder_.getMessage();
}
}
/**
*
* 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.)
*
*
* .google.protobuf.Duration time = 2;
*/
public Builder setTime(
com.google.protobuf.Duration.Builder builderForValue) {
if (timeBuilder_ == null) {
time_ = builderForValue.build();
onChanged();
} else {
timeBuilder_.setMessage(builderForValue.build());
}
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.)
*
*
* .google.protobuf.Duration time = 2;
*/
public Builder mergeTime(com.google.protobuf.Duration value) {
if (timeBuilder_ == null) {
if (time_ != null) {
time_ =
com.google.protobuf.Duration.newBuilder(time_).mergeFrom(value).buildPartial();
} else {
time_ = value;
}
onChanged();
} else {
timeBuilder_.mergeFrom(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.)
*
*
* .google.protobuf.Duration time = 2;
*/
public Builder clearTime() {
if (timeBuilder_ == null) {
time_ = null;
onChanged();
} else {
time_ = null;
timeBuilder_ = null;
}
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.)
*
*
* .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.)
*
*
* .google.protobuf.Duration time = 2;
*/
public com.google.protobuf.DurationOrBuilder getTimeOrBuilder() {
if (timeBuilder_ != null) {
return timeBuilder_.getMessageOrBuilder();
} else {
return time_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : 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;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getTimeFieldBuilder() {
if (timeBuilder_ == null) {
timeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getTime(),
getParentForChildren(),
isClean());
time_ = null;
}
return timeBuilder_;
}
private com.google.protobuf.Duration interval_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> intervalBuilder_;
/**
*
* 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;
* @return Whether the interval field is set.
*/
public boolean hasInterval() {
return intervalBuilder_ != null || interval_ != null;
}
/**
*
* 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;
* @return The interval.
*/
public com.google.protobuf.Duration getInterval() {
if (intervalBuilder_ == null) {
return interval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : interval_;
} else {
return intervalBuilder_.getMessage();
}
}
/**
*
* 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 Builder setInterval(com.google.protobuf.Duration value) {
if (intervalBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
interval_ = value;
onChanged();
} else {
intervalBuilder_.setMessage(value);
}
return this;
}
/**
*
* 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 Builder setInterval(
com.google.protobuf.Duration.Builder builderForValue) {
if (intervalBuilder_ == null) {
interval_ = builderForValue.build();
onChanged();
} else {
intervalBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 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 Builder mergeInterval(com.google.protobuf.Duration value) {
if (intervalBuilder_ == null) {
if (interval_ != null) {
interval_ =
com.google.protobuf.Duration.newBuilder(interval_).mergeFrom(value).buildPartial();
} else {
interval_ = value;
}
onChanged();
} else {
intervalBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 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 Builder clearInterval() {
if (intervalBuilder_ == null) {
interval_ = null;
onChanged();
} else {
interval_ = null;
intervalBuilder_ = null;
}
return this;
}
/**
*
* 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.Duration.Builder getIntervalBuilder() {
onChanged();
return getIntervalFieldBuilder().getBuilder();
}
/**
*
* 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() {
if (intervalBuilder_ != null) {
return intervalBuilder_.getMessageOrBuilder();
} else {
return interval_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : interval_;
}
}
/**
*
* 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;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getIntervalFieldBuilder() {
if (intervalBuilder_ == null) {
intervalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getInterval(),
getParentForChildren(),
isClean());
interval_ = null;
}
return intervalBuilder_;
}
@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.TCPSettings.TcpKeepalive)
}
// @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive)
private static final istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive();
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TcpKeepalive parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new TcpKeepalive(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.TCPSettings.TcpKeepalive getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int MAX_CONNECTIONS_FIELD_NUMBER = 1;
private int maxConnections_;
/**
*
* Maximum number of HTTP1 /TCP connections to a destination host. Default 2^32-1.
*
*
* int32 max_connections = 1;
* @return The maxConnections.
*/
@java.lang.Override
public int getMaxConnections() {
return maxConnections_;
}
public static final int CONNECT_TIMEOUT_FIELD_NUMBER = 2;
private com.google.protobuf.Duration connectTimeout_;
/**
*
* TCP connection timeout. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration connect_timeout = 2;
* @return Whether the connectTimeout field is set.
*/
@java.lang.Override
public boolean hasConnectTimeout() {
return connectTimeout_ != null;
}
/**
*
* TCP connection timeout. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration connect_timeout = 2;
* @return The connectTimeout.
*/
@java.lang.Override
public com.google.protobuf.Duration getConnectTimeout() {
return connectTimeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : connectTimeout_;
}
/**
*
* TCP connection timeout. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration connect_timeout = 2;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getConnectTimeoutOrBuilder() {
return getConnectTimeout();
}
public static final int TCP_KEEPALIVE_FIELD_NUMBER = 3;
private istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive tcpKeepalive_;
/**
*
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive tcp_keepalive = 3;
* @return Whether the tcpKeepalive field is set.
*/
@java.lang.Override
public boolean hasTcpKeepalive() {
return tcpKeepalive_ != null;
}
/**
*
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive tcp_keepalive = 3;
* @return The tcpKeepalive.
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive getTcpKeepalive() {
return tcpKeepalive_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive.getDefaultInstance() : tcpKeepalive_;
}
/**
*
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive tcp_keepalive = 3;
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepaliveOrBuilder getTcpKeepaliveOrBuilder() {
return getTcpKeepalive();
}
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 (maxConnections_ != 0) {
output.writeInt32(1, maxConnections_);
}
if (connectTimeout_ != null) {
output.writeMessage(2, getConnectTimeout());
}
if (tcpKeepalive_ != null) {
output.writeMessage(3, getTcpKeepalive());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (maxConnections_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, maxConnections_);
}
if (connectTimeout_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getConnectTimeout());
}
if (tcpKeepalive_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getTcpKeepalive());
}
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)) {
return super.equals(obj);
}
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings other = (istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings) obj;
if (getMaxConnections()
!= other.getMaxConnections()) return false;
if (hasConnectTimeout() != other.hasConnectTimeout()) return false;
if (hasConnectTimeout()) {
if (!getConnectTimeout()
.equals(other.getConnectTimeout())) return false;
}
if (hasTcpKeepalive() != other.hasTcpKeepalive()) return false;
if (hasTcpKeepalive()) {
if (!getTcpKeepalive()
.equals(other.getTcpKeepalive())) 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) + MAX_CONNECTIONS_FIELD_NUMBER;
hash = (53 * hash) + getMaxConnections();
if (hasConnectTimeout()) {
hash = (37 * hash) + CONNECT_TIMEOUT_FIELD_NUMBER;
hash = (53 * hash) + getConnectTimeout().hashCode();
}
if (hasTcpKeepalive()) {
hash = (37 * hash) + TCP_KEEPALIVE_FIELD_NUMBER;
hash = (53 * hash) + getTcpKeepalive().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings 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 parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings 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 parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings 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 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 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 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 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 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 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 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;
}
/**
*
* Settings common to both HTTP and TCP upstream connections.
*
*
* Protobuf type {@code istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings)
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettingsOrBuilder {
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);
}
// Construct using istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.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();
maxConnections_ = 0;
if (connectTimeoutBuilder_ == null) {
connectTimeout_ = null;
} else {
connectTimeout_ = null;
connectTimeoutBuilder_ = null;
}
if (tcpKeepaliveBuilder_ == null) {
tcpKeepalive_ = null;
} else {
tcpKeepalive_ = null;
tcpKeepaliveBuilder_ = 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_descriptor;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings getDefaultInstanceForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.getDefaultInstance();
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings build() {
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings buildPartial() {
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings result = new istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings(this);
result.maxConnections_ = maxConnections_;
if (connectTimeoutBuilder_ == null) {
result.connectTimeout_ = connectTimeout_;
} else {
result.connectTimeout_ = connectTimeoutBuilder_.build();
}
if (tcpKeepaliveBuilder_ == null) {
result.tcpKeepalive_ = tcpKeepalive_;
} else {
result.tcpKeepalive_ = tcpKeepaliveBuilder_.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) {
return mergeFrom((istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings other) {
if (other == istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.getDefaultInstance()) return this;
if (other.getMaxConnections() != 0) {
setMaxConnections(other.getMaxConnections());
}
if (other.hasConnectTimeout()) {
mergeConnectTimeout(other.getConnectTimeout());
}
if (other.hasTcpKeepalive()) {
mergeTcpKeepalive(other.getTcpKeepalive());
}
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 parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int maxConnections_ ;
/**
*
* Maximum number of HTTP1 /TCP connections to a destination host. Default 2^32-1.
*
*
* int32 max_connections = 1;
* @return The maxConnections.
*/
@java.lang.Override
public int getMaxConnections() {
return maxConnections_;
}
/**
*
* Maximum number of HTTP1 /TCP connections to a destination host. Default 2^32-1.
*
*
* int32 max_connections = 1;
* @param value The maxConnections to set.
* @return This builder for chaining.
*/
public Builder setMaxConnections(int value) {
maxConnections_ = value;
onChanged();
return this;
}
/**
*
* Maximum number of HTTP1 /TCP connections to a destination host. Default 2^32-1.
*
*
* int32 max_connections = 1;
* @return This builder for chaining.
*/
public Builder clearMaxConnections() {
maxConnections_ = 0;
onChanged();
return this;
}
private com.google.protobuf.Duration connectTimeout_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> connectTimeoutBuilder_;
/**
*
* TCP connection timeout. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration connect_timeout = 2;
* @return Whether the connectTimeout field is set.
*/
public boolean hasConnectTimeout() {
return connectTimeoutBuilder_ != null || connectTimeout_ != null;
}
/**
*
* TCP connection timeout. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration connect_timeout = 2;
* @return The connectTimeout.
*/
public com.google.protobuf.Duration getConnectTimeout() {
if (connectTimeoutBuilder_ == null) {
return connectTimeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : connectTimeout_;
} else {
return connectTimeoutBuilder_.getMessage();
}
}
/**
*
* TCP connection timeout. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration connect_timeout = 2;
*/
public Builder setConnectTimeout(com.google.protobuf.Duration value) {
if (connectTimeoutBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
connectTimeout_ = value;
onChanged();
} else {
connectTimeoutBuilder_.setMessage(value);
}
return this;
}
/**
*
* TCP connection timeout. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration connect_timeout = 2;
*/
public Builder setConnectTimeout(
com.google.protobuf.Duration.Builder builderForValue) {
if (connectTimeoutBuilder_ == null) {
connectTimeout_ = builderForValue.build();
onChanged();
} else {
connectTimeoutBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* TCP connection timeout. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration connect_timeout = 2;
*/
public Builder mergeConnectTimeout(com.google.protobuf.Duration value) {
if (connectTimeoutBuilder_ == null) {
if (connectTimeout_ != null) {
connectTimeout_ =
com.google.protobuf.Duration.newBuilder(connectTimeout_).mergeFrom(value).buildPartial();
} else {
connectTimeout_ = value;
}
onChanged();
} else {
connectTimeoutBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* TCP connection timeout. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration connect_timeout = 2;
*/
public Builder clearConnectTimeout() {
if (connectTimeoutBuilder_ == null) {
connectTimeout_ = null;
onChanged();
} else {
connectTimeout_ = null;
connectTimeoutBuilder_ = null;
}
return this;
}
/**
*
* TCP connection timeout. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration connect_timeout = 2;
*/
public com.google.protobuf.Duration.Builder getConnectTimeoutBuilder() {
onChanged();
return getConnectTimeoutFieldBuilder().getBuilder();
}
/**
*
* TCP connection timeout. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration connect_timeout = 2;
*/
public com.google.protobuf.DurationOrBuilder getConnectTimeoutOrBuilder() {
if (connectTimeoutBuilder_ != null) {
return connectTimeoutBuilder_.getMessageOrBuilder();
} else {
return connectTimeout_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : connectTimeout_;
}
}
/**
*
* TCP connection timeout. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration connect_timeout = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getConnectTimeoutFieldBuilder() {
if (connectTimeoutBuilder_ == null) {
connectTimeoutBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getConnectTimeout(),
getParentForChildren(),
isClean());
connectTimeout_ = null;
}
return connectTimeoutBuilder_;
}
private istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive tcpKeepalive_;
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepaliveOrBuilder> tcpKeepaliveBuilder_;
/**
*
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive tcp_keepalive = 3;
* @return Whether the tcpKeepalive field is set.
*/
public boolean hasTcpKeepalive() {
return tcpKeepaliveBuilder_ != null || tcpKeepalive_ != null;
}
/**
*
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive tcp_keepalive = 3;
* @return The tcpKeepalive.
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive getTcpKeepalive() {
if (tcpKeepaliveBuilder_ == null) {
return tcpKeepalive_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive.getDefaultInstance() : tcpKeepalive_;
} else {
return tcpKeepaliveBuilder_.getMessage();
}
}
/**
*
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive tcp_keepalive = 3;
*/
public Builder setTcpKeepalive(istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive value) {
if (tcpKeepaliveBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tcpKeepalive_ = value;
onChanged();
} else {
tcpKeepaliveBuilder_.setMessage(value);
}
return this;
}
/**
*
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive tcp_keepalive = 3;
*/
public Builder setTcpKeepalive(
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive.Builder builderForValue) {
if (tcpKeepaliveBuilder_ == null) {
tcpKeepalive_ = builderForValue.build();
onChanged();
} else {
tcpKeepaliveBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive tcp_keepalive = 3;
*/
public Builder mergeTcpKeepalive(istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive value) {
if (tcpKeepaliveBuilder_ == null) {
if (tcpKeepalive_ != null) {
tcpKeepalive_ =
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive.newBuilder(tcpKeepalive_).mergeFrom(value).buildPartial();
} else {
tcpKeepalive_ = value;
}
onChanged();
} else {
tcpKeepaliveBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive tcp_keepalive = 3;
*/
public Builder clearTcpKeepalive() {
if (tcpKeepaliveBuilder_ == null) {
tcpKeepalive_ = null;
onChanged();
} else {
tcpKeepalive_ = null;
tcpKeepaliveBuilder_ = null;
}
return this;
}
/**
*
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive tcp_keepalive = 3;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive.Builder getTcpKeepaliveBuilder() {
onChanged();
return getTcpKeepaliveFieldBuilder().getBuilder();
}
/**
*
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive tcp_keepalive = 3;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepaliveOrBuilder getTcpKeepaliveOrBuilder() {
if (tcpKeepaliveBuilder_ != null) {
return tcpKeepaliveBuilder_.getMessageOrBuilder();
} else {
return tcpKeepalive_ == null ?
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive.getDefaultInstance() : tcpKeepalive_;
}
}
/**
*
* If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive tcp_keepalive = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepaliveOrBuilder>
getTcpKeepaliveFieldBuilder() {
if (tcpKeepaliveBuilder_ == null) {
tcpKeepaliveBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepalive.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.TcpKeepaliveOrBuilder>(
getTcpKeepalive(),
getParentForChildren(),
isClean());
tcpKeepalive_ = null;
}
return tcpKeepaliveBuilder_;
}
@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.TCPSettings)
}
// @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings)
private static final istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings();
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TCPSettings parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new TCPSettings(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.TCPSettings getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface HTTPSettingsOrBuilder extends
// @@protoc_insertion_point(interface_extends:istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings)
com.google.protobuf.MessageOrBuilder {
/**
*
* Maximum number of pending HTTP requests to a destination. Default 2^32-1.
*
*
* int32 http1_max_pending_requests = 1;
* @return The http1MaxPendingRequests.
*/
int getHttp1MaxPendingRequests();
/**
*
* Maximum number of requests to a backend. Default 2^32-1.
*
*
* int32 http2_max_requests = 2;
* @return The http2MaxRequests.
*/
int getHttp2MaxRequests();
/**
*
* 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;
* @return The maxRequestsPerConnection.
*/
int getMaxRequestsPerConnection();
/**
*
* 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;
* @return The maxRetries.
*/
int getMaxRetries();
/**
*
* 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;
* @return Whether the idleTimeout field is set.
*/
boolean hasIdleTimeout();
/**
*
* 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;
* @return The idleTimeout.
*/
com.google.protobuf.Duration getIdleTimeout();
/**
*
* 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;
*/
com.google.protobuf.DurationOrBuilder getIdleTimeoutOrBuilder();
/**
*
* Specify if http1.1 connection should be upgraded to http2 for the associated destination.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy h2_upgrade_policy = 6;
* @return The enum numeric value on the wire for h2UpgradePolicy.
*/
int getH2UpgradePolicyValue();
/**
*
* Specify if http1.1 connection should be upgraded to http2 for the associated destination.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy h2_upgrade_policy = 6;
* @return The h2UpgradePolicy.
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy getH2UpgradePolicy();
/**
*
* 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;
* @return The useClientProtocol.
*/
boolean getUseClientProtocol();
}
/**
*
* Settings applicable to HTTP1.1/HTTP2/GRPC connections.
*
*
* Protobuf type {@code istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings}
*/
public static final class HTTPSettings extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings)
HTTPSettingsOrBuilder {
private static final long serialVersionUID = 0L;
// Use HTTPSettings.newBuilder() to construct.
private HTTPSettings(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private HTTPSettings() {
h2UpgradePolicy_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new HTTPSettings();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private HTTPSettings(
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: {
http1MaxPendingRequests_ = input.readInt32();
break;
}
case 16: {
http2MaxRequests_ = input.readInt32();
break;
}
case 24: {
maxRequestsPerConnection_ = input.readInt32();
break;
}
case 32: {
maxRetries_ = input.readInt32();
break;
}
case 42: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (idleTimeout_ != null) {
subBuilder = idleTimeout_.toBuilder();
}
idleTimeout_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(idleTimeout_);
idleTimeout_ = subBuilder.buildPartial();
}
break;
}
case 48: {
int rawValue = input.readEnum();
h2UpgradePolicy_ = rawValue;
break;
}
case 56: {
useClientProtocol_ = input.readBool();
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_HTTPSettings_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_HTTPSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.class, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.Builder.class);
}
/**
*
* Policy for upgrading http1.1 connections to http2.
*
*
* Protobuf enum {@code istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy}
*/
public enum H2UpgradePolicy
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Use the global default.
*
*
* DEFAULT = 0;
*/
DEFAULT(0),
/**
*
* Do not upgrade the connection to http2.
* This opt-out option overrides the default.
*
*
* DO_NOT_UPGRADE = 1;
*/
DO_NOT_UPGRADE(1),
/**
*
* Upgrade the connection to http2.
* This opt-in option overrides the default.
*
*
* UPGRADE = 2;
*/
UPGRADE(2),
UNRECOGNIZED(-1),
;
/**
*
* Use the global default.
*
*
* 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;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static H2UpgradePolicy valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static 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() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
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;
* @return The http1MaxPendingRequests.
*/
@java.lang.Override
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;
* @return The http2MaxRequests.
*/
@java.lang.Override
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;
* @return The maxRequestsPerConnection.
*/
@java.lang.Override
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;
* @return The maxRetries.
*/
@java.lang.Override
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.
*
*
* .google.protobuf.Duration idle_timeout = 5;
* @return Whether the idleTimeout field is set.
*/
@java.lang.Override
public boolean hasIdleTimeout() {
return idleTimeout_ != null;
}
/**
*
* 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;
* @return The idleTimeout.
*/
@java.lang.Override
public com.google.protobuf.Duration getIdleTimeout() {
return idleTimeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : 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.
*
*
* .google.protobuf.Duration idle_timeout = 5;
*/
@java.lang.Override
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;
* @return The enum numeric value on the wire for h2UpgradePolicy.
*/
@java.lang.Override 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;
* @return The h2UpgradePolicy.
*/
@java.lang.Override 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.
*
*
* bool use_client_protocol = 7;
* @return The useClientProtocol.
*/
@java.lang.Override
public boolean getUseClientProtocol() {
return useClientProtocol_;
}
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 (http1MaxPendingRequests_ != 0) {
output.writeInt32(1, http1MaxPendingRequests_);
}
if (http2MaxRequests_ != 0) {
output.writeInt32(2, http2MaxRequests_);
}
if (maxRequestsPerConnection_ != 0) {
output.writeInt32(3, maxRequestsPerConnection_);
}
if (maxRetries_ != 0) {
output.writeInt32(4, maxRetries_);
}
if (idleTimeout_ != null) {
output.writeMessage(5, getIdleTimeout());
}
if (h2UpgradePolicy_ != istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy.DEFAULT.getNumber()) {
output.writeEnum(6, h2UpgradePolicy_);
}
if (useClientProtocol_ != false) {
output.writeBool(7, useClientProtocol_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (http1MaxPendingRequests_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, http1MaxPendingRequests_);
}
if (http2MaxRequests_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, http2MaxRequests_);
}
if (maxRequestsPerConnection_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, maxRequestsPerConnection_);
}
if (maxRetries_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(4, maxRetries_);
}
if (idleTimeout_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getIdleTimeout());
}
if (h2UpgradePolicy_ != istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy.DEFAULT.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(6, h2UpgradePolicy_);
}
if (useClientProtocol_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(7, useClientProtocol_);
}
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.HTTPSettings)) {
return super.equals(obj);
}
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings other = (istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings) obj;
if (getHttp1MaxPendingRequests()
!= other.getHttp1MaxPendingRequests()) return false;
if (getHttp2MaxRequests()
!= other.getHttp2MaxRequests()) return false;
if (getMaxRequestsPerConnection()
!= other.getMaxRequestsPerConnection()) return false;
if (getMaxRetries()
!= other.getMaxRetries()) return false;
if (hasIdleTimeout() != other.hasIdleTimeout()) return false;
if (hasIdleTimeout()) {
if (!getIdleTimeout()
.equals(other.getIdleTimeout())) return false;
}
if (h2UpgradePolicy_ != other.h2UpgradePolicy_) return false;
if (getUseClientProtocol()
!= other.getUseClientProtocol()) 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) + HTTP1_MAX_PENDING_REQUESTS_FIELD_NUMBER;
hash = (53 * hash) + getHttp1MaxPendingRequests();
hash = (37 * hash) + HTTP2_MAX_REQUESTS_FIELD_NUMBER;
hash = (53 * hash) + getHttp2MaxRequests();
hash = (37 * hash) + MAX_REQUESTS_PER_CONNECTION_FIELD_NUMBER;
hash = (53 * hash) + getMaxRequestsPerConnection();
hash = (37 * hash) + MAX_RETRIES_FIELD_NUMBER;
hash = (53 * hash) + getMaxRetries();
if (hasIdleTimeout()) {
hash = (37 * hash) + IDLE_TIMEOUT_FIELD_NUMBER;
hash = (53 * hash) + getIdleTimeout().hashCode();
}
hash = (37 * hash) + H2_UPGRADE_POLICY_FIELD_NUMBER;
hash = (53 * hash) + h2UpgradePolicy_;
hash = (37 * hash) + USE_CLIENT_PROTOCOL_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getUseClientProtocol());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings 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.HTTPSettings parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings 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.HTTPSettings parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings 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.HTTPSettings parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings 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.HTTPSettings parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings 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.HTTPSettings 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.HTTPSettings 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.HTTPSettings 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;
}
/**
*
* Settings applicable to HTTP1.1/HTTP2/GRPC connections.
*
*
* Protobuf type {@code istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings)
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettingsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_HTTPSettings_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_HTTPSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.class, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.Builder.class);
}
// Construct using istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.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();
http1MaxPendingRequests_ = 0;
http2MaxRequests_ = 0;
maxRequestsPerConnection_ = 0;
maxRetries_ = 0;
if (idleTimeoutBuilder_ == null) {
idleTimeout_ = null;
} else {
idleTimeout_ = null;
idleTimeoutBuilder_ = null;
}
h2UpgradePolicy_ = 0;
useClientProtocol_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_HTTPSettings_descriptor;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings getDefaultInstanceForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.getDefaultInstance();
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings build() {
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings buildPartial() {
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings result = new istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings(this);
result.http1MaxPendingRequests_ = http1MaxPendingRequests_;
result.http2MaxRequests_ = http2MaxRequests_;
result.maxRequestsPerConnection_ = maxRequestsPerConnection_;
result.maxRetries_ = maxRetries_;
if (idleTimeoutBuilder_ == null) {
result.idleTimeout_ = idleTimeout_;
} else {
result.idleTimeout_ = idleTimeoutBuilder_.build();
}
result.h2UpgradePolicy_ = h2UpgradePolicy_;
result.useClientProtocol_ = useClientProtocol_;
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.HTTPSettings) {
return mergeFrom((istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings other) {
if (other == istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.getDefaultInstance()) return this;
if (other.getHttp1MaxPendingRequests() != 0) {
setHttp1MaxPendingRequests(other.getHttp1MaxPendingRequests());
}
if (other.getHttp2MaxRequests() != 0) {
setHttp2MaxRequests(other.getHttp2MaxRequests());
}
if (other.getMaxRequestsPerConnection() != 0) {
setMaxRequestsPerConnection(other.getMaxRequestsPerConnection());
}
if (other.getMaxRetries() != 0) {
setMaxRetries(other.getMaxRetries());
}
if (other.hasIdleTimeout()) {
mergeIdleTimeout(other.getIdleTimeout());
}
if (other.h2UpgradePolicy_ != 0) {
setH2UpgradePolicyValue(other.getH2UpgradePolicyValue());
}
if (other.getUseClientProtocol() != false) {
setUseClientProtocol(other.getUseClientProtocol());
}
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.HTTPSettings parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int http1MaxPendingRequests_ ;
/**
*
* Maximum number of pending HTTP requests to a destination. Default 2^32-1.
*
*
* int32 http1_max_pending_requests = 1;
* @return The http1MaxPendingRequests.
*/
@java.lang.Override
public int getHttp1MaxPendingRequests() {
return http1MaxPendingRequests_;
}
/**
*
* Maximum number of pending HTTP requests to a destination. Default 2^32-1.
*
*
* int32 http1_max_pending_requests = 1;
* @param value The http1MaxPendingRequests to set.
* @return This builder for chaining.
*/
public Builder setHttp1MaxPendingRequests(int value) {
http1MaxPendingRequests_ = value;
onChanged();
return this;
}
/**
*
* Maximum number of pending HTTP requests to a destination. Default 2^32-1.
*
*
* int32 http1_max_pending_requests = 1;
* @return This builder for chaining.
*/
public Builder clearHttp1MaxPendingRequests() {
http1MaxPendingRequests_ = 0;
onChanged();
return this;
}
private int http2MaxRequests_ ;
/**
*
* Maximum number of requests to a backend. Default 2^32-1.
*
*
* int32 http2_max_requests = 2;
* @return The http2MaxRequests.
*/
@java.lang.Override
public int getHttp2MaxRequests() {
return http2MaxRequests_;
}
/**
*
* Maximum number of requests to a backend. Default 2^32-1.
*
*
* int32 http2_max_requests = 2;
* @param value The http2MaxRequests to set.
* @return This builder for chaining.
*/
public Builder setHttp2MaxRequests(int value) {
http2MaxRequests_ = value;
onChanged();
return this;
}
/**
*
* Maximum number of requests to a backend. Default 2^32-1.
*
*
* int32 http2_max_requests = 2;
* @return This builder for chaining.
*/
public Builder clearHttp2MaxRequests() {
http2MaxRequests_ = 0;
onChanged();
return this;
}
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;
* @return The maxRequestsPerConnection.
*/
@java.lang.Override
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.
*
*
* int32 max_requests_per_connection = 3;
* @param value The maxRequestsPerConnection to set.
* @return This builder for chaining.
*/
public Builder setMaxRequestsPerConnection(int value) {
maxRequestsPerConnection_ = value;
onChanged();
return this;
}
/**
*
* 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;
* @return This builder for chaining.
*/
public Builder clearMaxRequestsPerConnection() {
maxRequestsPerConnection_ = 0;
onChanged();
return this;
}
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;
* @return The maxRetries.
*/
@java.lang.Override
public int getMaxRetries() {
return 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;
* @param value The maxRetries to set.
* @return This builder for chaining.
*/
public Builder setMaxRetries(int value) {
maxRetries_ = value;
onChanged();
return this;
}
/**
*
* 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;
* @return This builder for chaining.
*/
public Builder clearMaxRetries() {
maxRetries_ = 0;
onChanged();
return this;
}
private com.google.protobuf.Duration idleTimeout_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> idleTimeoutBuilder_;
/**
*
* 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;
* @return Whether the idleTimeout field is set.
*/
public boolean hasIdleTimeout() {
return idleTimeoutBuilder_ != null || idleTimeout_ != null;
}
/**
*
* 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;
* @return The idleTimeout.
*/
public com.google.protobuf.Duration getIdleTimeout() {
if (idleTimeoutBuilder_ == null) {
return idleTimeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : idleTimeout_;
} else {
return idleTimeoutBuilder_.getMessage();
}
}
/**
*
* 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.
*
*
* .google.protobuf.Duration idle_timeout = 5;
*/
public Builder setIdleTimeout(
com.google.protobuf.Duration.Builder builderForValue) {
if (idleTimeoutBuilder_ == null) {
idleTimeout_ = builderForValue.build();
onChanged();
} else {
idleTimeoutBuilder_.setMessage(builderForValue.build());
}
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.
*
*
* .google.protobuf.Duration idle_timeout = 5;
*/
public Builder mergeIdleTimeout(com.google.protobuf.Duration value) {
if (idleTimeoutBuilder_ == null) {
if (idleTimeout_ != null) {
idleTimeout_ =
com.google.protobuf.Duration.newBuilder(idleTimeout_).mergeFrom(value).buildPartial();
} else {
idleTimeout_ = value;
}
onChanged();
} else {
idleTimeoutBuilder_.mergeFrom(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.
*
*
* .google.protobuf.Duration idle_timeout = 5;
*/
public Builder clearIdleTimeout() {
if (idleTimeoutBuilder_ == null) {
idleTimeout_ = null;
onChanged();
} else {
idleTimeout_ = null;
idleTimeoutBuilder_ = null;
}
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.
*
*
* .google.protobuf.Duration idle_timeout = 5;
*/
public com.google.protobuf.Duration.Builder getIdleTimeoutBuilder() {
onChanged();
return getIdleTimeoutFieldBuilder().getBuilder();
}
/**
*
* 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() {
if (idleTimeoutBuilder_ != null) {
return idleTimeoutBuilder_.getMessageOrBuilder();
} else {
return idleTimeout_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : 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.
*
*
* .google.protobuf.Duration idle_timeout = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getIdleTimeoutFieldBuilder() {
if (idleTimeoutBuilder_ == null) {
idleTimeoutBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getIdleTimeout(),
getParentForChildren(),
isClean());
idleTimeout_ = null;
}
return idleTimeoutBuilder_;
}
private int h2UpgradePolicy_ = 0;
/**
*
* Specify if http1.1 connection should be upgraded to http2 for the associated destination.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy h2_upgrade_policy = 6;
* @return The enum numeric value on the wire for h2UpgradePolicy.
*/
@java.lang.Override 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;
* @param value The enum numeric value on the wire for h2UpgradePolicy to set.
* @return This builder for chaining.
*/
public Builder setH2UpgradePolicyValue(int value) {
h2UpgradePolicy_ = value;
onChanged();
return this;
}
/**
*
* Specify if http1.1 connection should be upgraded to http2 for the associated destination.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy h2_upgrade_policy = 6;
* @return The h2UpgradePolicy.
*/
@java.lang.Override
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;
}
/**
*
* Specify if http1.1 connection should be upgraded to http2 for the associated destination.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy h2_upgrade_policy = 6;
* @param value The h2UpgradePolicy to set.
* @return This builder for chaining.
*/
public Builder setH2UpgradePolicy(istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy value) {
if (value == null) {
throw new NullPointerException();
}
h2UpgradePolicy_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Specify if http1.1 connection should be upgraded to http2 for the associated destination.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy h2_upgrade_policy = 6;
* @return This builder for chaining.
*/
public Builder clearH2UpgradePolicy() {
h2UpgradePolicy_ = 0;
onChanged();
return this;
}
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.
*
*
* bool use_client_protocol = 7;
* @return The useClientProtocol.
*/
@java.lang.Override
public boolean getUseClientProtocol() {
return 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.
*
*
* bool use_client_protocol = 7;
* @param value The useClientProtocol to set.
* @return This builder for chaining.
*/
public Builder setUseClientProtocol(boolean value) {
useClientProtocol_ = value;
onChanged();
return this;
}
/**
*
* 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;
* @return This builder for chaining.
*/
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.TCPSettings tcp = 1;
* @return Whether the tcp field is set.
*/
@java.lang.Override
public boolean hasTcp() {
return tcp_ != null;
}
/**
*
* Settings common to both HTTP and TCP upstream connections.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings tcp = 1;
* @return The tcp.
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings getTcp() {
return tcp_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.getDefaultInstance() : tcp_;
}
/**
*
* Settings common to both HTTP and TCP upstream connections.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings tcp = 1;
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettingsOrBuilder getTcpOrBuilder() {
return getTcp();
}
public static final int HTTP_FIELD_NUMBER = 2;
private istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings http_;
/**
*
* HTTP connection pool settings.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings http = 2;
* @return Whether the http field is set.
*/
@java.lang.Override
public boolean hasHttp() {
return http_ != null;
}
/**
*
* HTTP connection pool settings.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings http = 2;
* @return The http.
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings getHttp() {
return http_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.getDefaultInstance() : http_;
}
/**
*
* HTTP connection pool settings.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings http = 2;
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettingsOrBuilder getHttpOrBuilder() {
return getHttp();
}
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 (tcp_ != null) {
output.writeMessage(1, getTcp());
}
if (http_ != null) {
output.writeMessage(2, getHttp());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (tcp_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getTcp());
}
if (http_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getHttp());
}
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)) {
return super.equals(obj);
}
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings other = (istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings) obj;
if (hasTcp() != other.hasTcp()) return false;
if (hasTcp()) {
if (!getTcp()
.equals(other.getTcp())) return false;
}
if (hasHttp() != other.hasHttp()) return false;
if (hasHttp()) {
if (!getHttp()
.equals(other.getHttp())) 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 (hasTcp()) {
hash = (37 * hash) + TCP_FIELD_NUMBER;
hash = (53 * hash) + getTcp().hashCode();
}
if (hasHttp()) {
hash = (37 * hash) + HTTP_FIELD_NUMBER;
hash = (53 * hash) + getHttp().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings 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 parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings 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 parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings 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 parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings 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 parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings 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 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 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 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;
}
/**
*
* Connection pool settings for an upstream host. The settings apply to
* each individual host in the upstream service. See Envoy's [circuit
* breaker](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/circuit_breaking)
* for more details. Connection pool settings can be applied at the TCP
* level as well as at HTTP level.
* For example, the following rule sets a limit of 100 connections to redis
* service called myredissrv with a connect timeout of 30ms
* {{<tabset category-name="example">}}
* {{<tab name="v1alpha3" category-value="v1alpha3">}}
* ```yaml
* apiVersion: networking.istio.io/v1alpha3
* kind: DestinationRule
* metadata:
* name: bookinfo-redis
* spec:
* host: myredissrv.prod.svc.cluster.local
* trafficPolicy:
* connectionPool:
* tcp:
* maxConnections: 100
* connectTimeout: 30ms
* tcpKeepalive:
* time: 7200s
* interval: 75s
* ```
* {{</tab>}}
* {{<tab name="v1beta1" category-value="v1beta1">}}
* ```yaml
* apiVersion: networking.istio.io/v1beta1
* kind: DestinationRule
* metadata:
* name: bookinfo-redis
* spec:
* host: myredissrv.prod.svc.cluster.local
* trafficPolicy:
* connectionPool:
* tcp:
* maxConnections: 100
* connectTimeout: 30ms
* tcpKeepalive:
* time: 7200s
* interval: 75s
* ```
* {{</tab>}}
* {{</tabset>}}
*
*
* Protobuf type {@code istio.networking.v1alpha3.ConnectionPoolSettings}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:istio.networking.v1alpha3.ConnectionPoolSettings)
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettingsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.class, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.Builder.class);
}
// Construct using istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.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();
if (tcpBuilder_ == null) {
tcp_ = null;
} else {
tcp_ = null;
tcpBuilder_ = null;
}
if (httpBuilder_ == null) {
http_ = null;
} else {
http_ = null;
httpBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_descriptor;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings getDefaultInstanceForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.getDefaultInstance();
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings build() {
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings buildPartial() {
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings result = new istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings(this);
if (tcpBuilder_ == null) {
result.tcp_ = tcp_;
} else {
result.tcp_ = tcpBuilder_.build();
}
if (httpBuilder_ == null) {
result.http_ = http_;
} else {
result.http_ = httpBuilder_.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) {
return mergeFrom((istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings other) {
if (other == istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.getDefaultInstance()) return this;
if (other.hasTcp()) {
mergeTcp(other.getTcp());
}
if (other.hasHttp()) {
mergeHttp(other.getHttp());
}
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 parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings tcp_;
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettingsOrBuilder> tcpBuilder_;
/**
*
* Settings common to both HTTP and TCP upstream connections.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings tcp = 1;
* @return Whether the tcp field is set.
*/
public boolean hasTcp() {
return tcpBuilder_ != null || tcp_ != null;
}
/**
*
* Settings common to both HTTP and TCP upstream connections.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings tcp = 1;
* @return The tcp.
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings getTcp() {
if (tcpBuilder_ == null) {
return tcp_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.getDefaultInstance() : tcp_;
} else {
return tcpBuilder_.getMessage();
}
}
/**
*
* Settings common to both HTTP and TCP upstream connections.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings tcp = 1;
*/
public Builder setTcp(istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings value) {
if (tcpBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tcp_ = value;
onChanged();
} else {
tcpBuilder_.setMessage(value);
}
return this;
}
/**
*
* Settings common to both HTTP and TCP upstream connections.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings tcp = 1;
*/
public Builder setTcp(
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.Builder builderForValue) {
if (tcpBuilder_ == null) {
tcp_ = builderForValue.build();
onChanged();
} else {
tcpBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Settings common to both HTTP and TCP upstream connections.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings tcp = 1;
*/
public Builder mergeTcp(istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings value) {
if (tcpBuilder_ == null) {
if (tcp_ != null) {
tcp_ =
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.newBuilder(tcp_).mergeFrom(value).buildPartial();
} else {
tcp_ = value;
}
onChanged();
} else {
tcpBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Settings common to both HTTP and TCP upstream connections.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings tcp = 1;
*/
public Builder clearTcp() {
if (tcpBuilder_ == null) {
tcp_ = null;
onChanged();
} else {
tcp_ = null;
tcpBuilder_ = null;
}
return this;
}
/**
*
* Settings common to both HTTP and TCP upstream connections.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings tcp = 1;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.Builder getTcpBuilder() {
onChanged();
return getTcpFieldBuilder().getBuilder();
}
/**
*
* Settings common to both HTTP and TCP upstream connections.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings tcp = 1;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettingsOrBuilder getTcpOrBuilder() {
if (tcpBuilder_ != null) {
return tcpBuilder_.getMessageOrBuilder();
} else {
return tcp_ == null ?
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.getDefaultInstance() : tcp_;
}
}
/**
*
* Settings common to both HTTP and TCP upstream connections.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings tcp = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettingsOrBuilder>
getTcpFieldBuilder() {
if (tcpBuilder_ == null) {
tcpBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettings.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.TCPSettingsOrBuilder>(
getTcp(),
getParentForChildren(),
isClean());
tcp_ = null;
}
return tcpBuilder_;
}
private istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings http_;
private com.google.protobuf.SingleFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettingsOrBuilder> httpBuilder_;
/**
*
* HTTP connection pool settings.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings http = 2;
* @return Whether the http field is set.
*/
public boolean hasHttp() {
return httpBuilder_ != null || http_ != null;
}
/**
*
* HTTP connection pool settings.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings http = 2;
* @return The http.
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings getHttp() {
if (httpBuilder_ == null) {
return http_ == null ? istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.getDefaultInstance() : http_;
} else {
return httpBuilder_.getMessage();
}
}
/**
*
* HTTP connection pool settings.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings http = 2;
*/
public Builder setHttp(istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings value) {
if (httpBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
http_ = value;
onChanged();
} else {
httpBuilder_.setMessage(value);
}
return this;
}
/**
*
* HTTP connection pool settings.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings http = 2;
*/
public Builder setHttp(
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.Builder builderForValue) {
if (httpBuilder_ == null) {
http_ = builderForValue.build();
onChanged();
} else {
httpBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* HTTP connection pool settings.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings http = 2;
*/
public Builder mergeHttp(istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings value) {
if (httpBuilder_ == null) {
if (http_ != null) {
http_ =
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.newBuilder(http_).mergeFrom(value).buildPartial();
} else {
http_ = value;
}
onChanged();
} else {
httpBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* HTTP connection pool settings.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings http = 2;
*/
public Builder clearHttp() {
if (httpBuilder_ == null) {
http_ = null;
onChanged();
} else {
http_ = null;
httpBuilder_ = null;
}
return this;
}
/**
*
* HTTP connection pool settings.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings http = 2;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.Builder getHttpBuilder() {
onChanged();
return getHttpFieldBuilder().getBuilder();
}
/**
*
* HTTP connection pool settings.
*
*
* .istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings http = 2;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettingsOrBuilder getHttpOrBuilder() {
if (httpBuilder_ != null) {
return httpBuilder_.getMessageOrBuilder();
} else {
return http_ == null ?
istio.networking.v1alpha3.DestinationRuleOuterClass.ConnectionPoolSettings.HTTPSettings.getDefaultInstance() : http_;
}
}
/**
*
* HTTP connection pool settings.
*
*
* .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
*
*
* int32 consecutive_errors = 1 [deprecated = true];
* @return The consecutiveErrors.
*/
@java.lang.Deprecated int getConsecutiveErrors();
/**
*
* 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;
* @return Whether the consecutiveGatewayErrors field is set.
*/
boolean hasConsecutiveGatewayErrors();
/**
*
* 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;
* @return The consecutiveGatewayErrors.
*/
com.google.protobuf.UInt32Value getConsecutiveGatewayErrors();
/**
*
* 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;
*/
com.google.protobuf.UInt32ValueOrBuilder getConsecutiveGatewayErrorsOrBuilder();
/**
*
* 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;
* @return Whether the consecutive5xxErrors field is set.
*/
boolean hasConsecutive5XxErrors();
/**
*
* 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;
* @return The consecutive5xxErrors.
*/
com.google.protobuf.UInt32Value getConsecutive5XxErrors();
/**
*
* 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;
*/
com.google.protobuf.UInt32ValueOrBuilder getConsecutive5XxErrorsOrBuilder();
/**
*
* Time interval between ejection sweep analysis. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration interval = 2;
* @return Whether the interval field is set.
*/
boolean hasInterval();
/**
*
* Time interval between ejection sweep analysis. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration interval = 2;
* @return The interval.
*/
com.google.protobuf.Duration getInterval();
/**
*
* Time interval between ejection sweep analysis. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration interval = 2;
*/
com.google.protobuf.DurationOrBuilder getIntervalOrBuilder();
/**
*
* 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;
* @return Whether the baseEjectionTime field is set.
*/
boolean hasBaseEjectionTime();
/**
*
* 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;
* @return The baseEjectionTime.
*/
com.google.protobuf.Duration getBaseEjectionTime();
/**
*
* 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;
*/
com.google.protobuf.DurationOrBuilder getBaseEjectionTimeOrBuilder();
/**
*
* Maximum % of hosts in the load balancing pool for the upstream
* service that can be ejected. Defaults to 10%.
*
*
* int32 max_ejection_percent = 4;
* @return The maxEjectionPercent.
*/
int getMaxEjectionPercent();
/**
*
* 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;
* @return The minHealthPercent.
*/
int getMinHealthPercent();
}
/**
*
* 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];
* @return The consecutiveErrors.
*/
@java.lang.Override
@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.
*
*
* .google.protobuf.UInt32Value consecutive_gateway_errors = 6;
* @return Whether the consecutiveGatewayErrors field is set.
*/
@java.lang.Override
public boolean hasConsecutiveGatewayErrors() {
return consecutiveGatewayErrors_ != null;
}
/**
*
* 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;
* @return The consecutiveGatewayErrors.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getConsecutiveGatewayErrors() {
return consecutiveGatewayErrors_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : 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.
*
*
* .google.protobuf.UInt32Value consecutive_gateway_errors = 6;
*/
@java.lang.Override
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.
*
*
* .google.protobuf.UInt32Value consecutive_5xx_errors = 7;
* @return Whether the consecutive5xxErrors field is set.
*/
@java.lang.Override
public boolean hasConsecutive5XxErrors() {
return consecutive5XxErrors_ != null;
}
/**
*
* 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;
* @return The consecutive5xxErrors.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getConsecutive5XxErrors() {
return consecutive5XxErrors_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : 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.
*
*
* .google.protobuf.UInt32Value consecutive_5xx_errors = 7;
*/
@java.lang.Override
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.
*
*
* .google.protobuf.Duration interval = 2;
* @return Whether the interval field is set.
*/
@java.lang.Override
public boolean hasInterval() {
return interval_ != null;
}
/**
*
* Time interval between ejection sweep analysis. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration interval = 2;
* @return The interval.
*/
@java.lang.Override
public com.google.protobuf.Duration getInterval() {
return interval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : interval_;
}
/**
*
* Time interval between ejection sweep analysis. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration interval = 2;
*/
@java.lang.Override
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.
*
*
* .google.protobuf.Duration base_ejection_time = 3;
* @return Whether the baseEjectionTime field is set.
*/
@java.lang.Override
public boolean hasBaseEjectionTime() {
return baseEjectionTime_ != null;
}
/**
*
* 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;
* @return The baseEjectionTime.
*/
@java.lang.Override
public com.google.protobuf.Duration getBaseEjectionTime() {
return baseEjectionTime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : 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.
*
*
* .google.protobuf.Duration base_ejection_time = 3;
*/
@java.lang.Override
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;
* @return The maxEjectionPercent.
*/
@java.lang.Override
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;
* @return The minHealthPercent.
*/
@java.lang.Override
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>}}
*
*
* Protobuf type {@code istio.networking.v1alpha3.OutlierDetection}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:istio.networking.v1alpha3.OutlierDetection)
istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetectionOrBuilder {
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);
}
// Construct using istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.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();
consecutiveErrors_ = 0;
if (consecutiveGatewayErrorsBuilder_ == null) {
consecutiveGatewayErrors_ = null;
} else {
consecutiveGatewayErrors_ = null;
consecutiveGatewayErrorsBuilder_ = null;
}
if (consecutive5XxErrorsBuilder_ == null) {
consecutive5XxErrors_ = null;
} else {
consecutive5XxErrors_ = null;
consecutive5XxErrorsBuilder_ = null;
}
if (intervalBuilder_ == null) {
interval_ = null;
} else {
interval_ = null;
intervalBuilder_ = null;
}
if (baseEjectionTimeBuilder_ == null) {
baseEjectionTime_ = null;
} else {
baseEjectionTime_ = null;
baseEjectionTimeBuilder_ = null;
}
maxEjectionPercent_ = 0;
minHealthPercent_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_OutlierDetection_descriptor;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection getDefaultInstanceForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.getDefaultInstance();
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection build() {
istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection buildPartial() {
istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection result = new istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection(this);
result.consecutiveErrors_ = consecutiveErrors_;
if (consecutiveGatewayErrorsBuilder_ == null) {
result.consecutiveGatewayErrors_ = consecutiveGatewayErrors_;
} else {
result.consecutiveGatewayErrors_ = consecutiveGatewayErrorsBuilder_.build();
}
if (consecutive5XxErrorsBuilder_ == null) {
result.consecutive5XxErrors_ = consecutive5XxErrors_;
} else {
result.consecutive5XxErrors_ = consecutive5XxErrorsBuilder_.build();
}
if (intervalBuilder_ == null) {
result.interval_ = interval_;
} else {
result.interval_ = intervalBuilder_.build();
}
if (baseEjectionTimeBuilder_ == null) {
result.baseEjectionTime_ = baseEjectionTime_;
} else {
result.baseEjectionTime_ = baseEjectionTimeBuilder_.build();
}
result.maxEjectionPercent_ = maxEjectionPercent_;
result.minHealthPercent_ = minHealthPercent_;
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.OutlierDetection) {
return mergeFrom((istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection other) {
if (other == istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection.getDefaultInstance()) return this;
if (other.getConsecutiveErrors() != 0) {
setConsecutiveErrors(other.getConsecutiveErrors());
}
if (other.hasConsecutiveGatewayErrors()) {
mergeConsecutiveGatewayErrors(other.getConsecutiveGatewayErrors());
}
if (other.hasConsecutive5XxErrors()) {
mergeConsecutive5XxErrors(other.getConsecutive5XxErrors());
}
if (other.hasInterval()) {
mergeInterval(other.getInterval());
}
if (other.hasBaseEjectionTime()) {
mergeBaseEjectionTime(other.getBaseEjectionTime());
}
if (other.getMaxEjectionPercent() != 0) {
setMaxEjectionPercent(other.getMaxEjectionPercent());
}
if (other.getMinHealthPercent() != 0) {
setMinHealthPercent(other.getMinHealthPercent());
}
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.OutlierDetection parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (istio.networking.v1alpha3.DestinationRuleOuterClass.OutlierDetection) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
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];
* @return The consecutiveErrors.
*/
@java.lang.Override
@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
*
*
* int32 consecutive_errors = 1 [deprecated = true];
* @param value The consecutiveErrors to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setConsecutiveErrors(int value) {
consecutiveErrors_ = value;
onChanged();
return this;
}
/**
*
* 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];
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder clearConsecutiveErrors() {
consecutiveErrors_ = 0;
onChanged();
return this;
}
private com.google.protobuf.UInt32Value consecutiveGatewayErrors_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> consecutiveGatewayErrorsBuilder_;
/**
*
* 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;
* @return Whether the consecutiveGatewayErrors field is set.
*/
public boolean hasConsecutiveGatewayErrors() {
return consecutiveGatewayErrorsBuilder_ != null || consecutiveGatewayErrors_ != null;
}
/**
*
* 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;
* @return The consecutiveGatewayErrors.
*/
public com.google.protobuf.UInt32Value getConsecutiveGatewayErrors() {
if (consecutiveGatewayErrorsBuilder_ == null) {
return consecutiveGatewayErrors_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : consecutiveGatewayErrors_;
} else {
return consecutiveGatewayErrorsBuilder_.getMessage();
}
}
/**
*
* 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.
*
*
* .google.protobuf.UInt32Value consecutive_gateway_errors = 6;
*/
public Builder setConsecutiveGatewayErrors(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (consecutiveGatewayErrorsBuilder_ == null) {
consecutiveGatewayErrors_ = builderForValue.build();
onChanged();
} else {
consecutiveGatewayErrorsBuilder_.setMessage(builderForValue.build());
}
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.
*
*
* .google.protobuf.UInt32Value consecutive_gateway_errors = 6;
*/
public Builder mergeConsecutiveGatewayErrors(com.google.protobuf.UInt32Value value) {
if (consecutiveGatewayErrorsBuilder_ == null) {
if (consecutiveGatewayErrors_ != null) {
consecutiveGatewayErrors_ =
com.google.protobuf.UInt32Value.newBuilder(consecutiveGatewayErrors_).mergeFrom(value).buildPartial();
} else {
consecutiveGatewayErrors_ = value;
}
onChanged();
} else {
consecutiveGatewayErrorsBuilder_.mergeFrom(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.
*
*
* .google.protobuf.UInt32Value consecutive_gateway_errors = 6;
*/
public Builder clearConsecutiveGatewayErrors() {
if (consecutiveGatewayErrorsBuilder_ == null) {
consecutiveGatewayErrors_ = null;
onChanged();
} else {
consecutiveGatewayErrors_ = null;
consecutiveGatewayErrorsBuilder_ = null;
}
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.
*
*
* .google.protobuf.UInt32Value consecutive_gateway_errors = 6;
*/
public com.google.protobuf.UInt32Value.Builder getConsecutiveGatewayErrorsBuilder() {
onChanged();
return getConsecutiveGatewayErrorsFieldBuilder().getBuilder();
}
/**
*
* 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() {
if (consecutiveGatewayErrorsBuilder_ != null) {
return consecutiveGatewayErrorsBuilder_.getMessageOrBuilder();
} else {
return consecutiveGatewayErrors_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : 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.
*
*
* .google.protobuf.UInt32Value consecutive_gateway_errors = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getConsecutiveGatewayErrorsFieldBuilder() {
if (consecutiveGatewayErrorsBuilder_ == null) {
consecutiveGatewayErrorsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getConsecutiveGatewayErrors(),
getParentForChildren(),
isClean());
consecutiveGatewayErrors_ = null;
}
return consecutiveGatewayErrorsBuilder_;
}
private com.google.protobuf.UInt32Value consecutive5XxErrors_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> consecutive5XxErrorsBuilder_;
/**
*
* 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;
* @return Whether the consecutive5xxErrors field is set.
*/
public boolean hasConsecutive5XxErrors() {
return consecutive5XxErrorsBuilder_ != null || consecutive5XxErrors_ != null;
}
/**
*
* 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;
* @return The consecutive5xxErrors.
*/
public com.google.protobuf.UInt32Value getConsecutive5XxErrors() {
if (consecutive5XxErrorsBuilder_ == null) {
return consecutive5XxErrors_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : consecutive5XxErrors_;
} else {
return consecutive5XxErrorsBuilder_.getMessage();
}
}
/**
*
* 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.
*
*
* .google.protobuf.UInt32Value consecutive_5xx_errors = 7;
*/
public Builder setConsecutive5XxErrors(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (consecutive5XxErrorsBuilder_ == null) {
consecutive5XxErrors_ = builderForValue.build();
onChanged();
} else {
consecutive5XxErrorsBuilder_.setMessage(builderForValue.build());
}
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.
*
*
* .google.protobuf.UInt32Value consecutive_5xx_errors = 7;
*/
public Builder mergeConsecutive5XxErrors(com.google.protobuf.UInt32Value value) {
if (consecutive5XxErrorsBuilder_ == null) {
if (consecutive5XxErrors_ != null) {
consecutive5XxErrors_ =
com.google.protobuf.UInt32Value.newBuilder(consecutive5XxErrors_).mergeFrom(value).buildPartial();
} else {
consecutive5XxErrors_ = value;
}
onChanged();
} else {
consecutive5XxErrorsBuilder_.mergeFrom(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.
*
*
* .google.protobuf.UInt32Value consecutive_5xx_errors = 7;
*/
public Builder clearConsecutive5XxErrors() {
if (consecutive5XxErrorsBuilder_ == null) {
consecutive5XxErrors_ = null;
onChanged();
} else {
consecutive5XxErrors_ = null;
consecutive5XxErrorsBuilder_ = null;
}
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.
*
*
* .google.protobuf.UInt32Value consecutive_5xx_errors = 7;
*/
public com.google.protobuf.UInt32Value.Builder getConsecutive5XxErrorsBuilder() {
onChanged();
return getConsecutive5XxErrorsFieldBuilder().getBuilder();
}
/**
*
* 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() {
if (consecutive5XxErrorsBuilder_ != null) {
return consecutive5XxErrorsBuilder_.getMessageOrBuilder();
} else {
return consecutive5XxErrors_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : 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.
*
*
* .google.protobuf.UInt32Value consecutive_5xx_errors = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getConsecutive5XxErrorsFieldBuilder() {
if (consecutive5XxErrorsBuilder_ == null) {
consecutive5XxErrorsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getConsecutive5XxErrors(),
getParentForChildren(),
isClean());
consecutive5XxErrors_ = null;
}
return consecutive5XxErrorsBuilder_;
}
private com.google.protobuf.Duration interval_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> intervalBuilder_;
/**
*
* Time interval between ejection sweep analysis. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration interval = 2;
* @return Whether the interval field is set.
*/
public boolean hasInterval() {
return intervalBuilder_ != null || interval_ != null;
}
/**
*
* Time interval between ejection sweep analysis. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration interval = 2;
* @return The interval.
*/
public com.google.protobuf.Duration getInterval() {
if (intervalBuilder_ == null) {
return interval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : interval_;
} else {
return intervalBuilder_.getMessage();
}
}
/**
*
* Time interval between ejection sweep analysis. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration interval = 2;
*/
public Builder setInterval(com.google.protobuf.Duration value) {
if (intervalBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
interval_ = value;
onChanged();
} else {
intervalBuilder_.setMessage(value);
}
return this;
}
/**
*
* Time interval between ejection sweep analysis. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration interval = 2;
*/
public Builder setInterval(
com.google.protobuf.Duration.Builder builderForValue) {
if (intervalBuilder_ == null) {
interval_ = builderForValue.build();
onChanged();
} else {
intervalBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Time interval between ejection sweep analysis. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration interval = 2;
*/
public Builder mergeInterval(com.google.protobuf.Duration value) {
if (intervalBuilder_ == null) {
if (interval_ != null) {
interval_ =
com.google.protobuf.Duration.newBuilder(interval_).mergeFrom(value).buildPartial();
} else {
interval_ = value;
}
onChanged();
} else {
intervalBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Time interval between ejection sweep analysis. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration interval = 2;
*/
public Builder clearInterval() {
if (intervalBuilder_ == null) {
interval_ = null;
onChanged();
} else {
interval_ = null;
intervalBuilder_ = null;
}
return this;
}
/**
*
* 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.Duration.Builder getIntervalBuilder() {
onChanged();
return getIntervalFieldBuilder().getBuilder();
}
/**
*
* 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() {
if (intervalBuilder_ != null) {
return intervalBuilder_.getMessageOrBuilder();
} else {
return interval_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : interval_;
}
}
/**
*
* Time interval between ejection sweep analysis. format:
* 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
*
*
* .google.protobuf.Duration interval = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getIntervalFieldBuilder() {
if (intervalBuilder_ == null) {
intervalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getInterval(),
getParentForChildren(),
isClean());
interval_ = null;
}
return intervalBuilder_;
}
private com.google.protobuf.Duration baseEjectionTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> baseEjectionTimeBuilder_;
/**
*
* 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;
* @return Whether the baseEjectionTime field is set.
*/
public boolean hasBaseEjectionTime() {
return baseEjectionTimeBuilder_ != null || baseEjectionTime_ != null;
}
/**
*
* 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;
* @return The baseEjectionTime.
*/
public com.google.protobuf.Duration getBaseEjectionTime() {
if (baseEjectionTimeBuilder_ == null) {
return baseEjectionTime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : baseEjectionTime_;
} else {
return baseEjectionTimeBuilder_.getMessage();
}
}
/**
*
* 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.
*
*
* .google.protobuf.Duration base_ejection_time = 3;
*/
public Builder setBaseEjectionTime(
com.google.protobuf.Duration.Builder builderForValue) {
if (baseEjectionTimeBuilder_ == null) {
baseEjectionTime_ = builderForValue.build();
onChanged();
} else {
baseEjectionTimeBuilder_.setMessage(builderForValue.build());
}
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.
*
*
* .google.protobuf.Duration base_ejection_time = 3;
*/
public Builder mergeBaseEjectionTime(com.google.protobuf.Duration value) {
if (baseEjectionTimeBuilder_ == null) {
if (baseEjectionTime_ != null) {
baseEjectionTime_ =
com.google.protobuf.Duration.newBuilder(baseEjectionTime_).mergeFrom(value).buildPartial();
} else {
baseEjectionTime_ = value;
}
onChanged();
} else {
baseEjectionTimeBuilder_.mergeFrom(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.
*
*
* .google.protobuf.Duration base_ejection_time = 3;
*/
public Builder clearBaseEjectionTime() {
if (baseEjectionTimeBuilder_ == null) {
baseEjectionTime_ = null;
onChanged();
} else {
baseEjectionTime_ = null;
baseEjectionTimeBuilder_ = null;
}
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.
*
*
* .google.protobuf.Duration base_ejection_time = 3;
*/
public com.google.protobuf.Duration.Builder getBaseEjectionTimeBuilder() {
onChanged();
return getBaseEjectionTimeFieldBuilder().getBuilder();
}
/**
*
* 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() {
if (baseEjectionTimeBuilder_ != null) {
return baseEjectionTimeBuilder_.getMessageOrBuilder();
} else {
return baseEjectionTime_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : 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.
*
*
* .google.protobuf.Duration base_ejection_time = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getBaseEjectionTimeFieldBuilder() {
if (baseEjectionTimeBuilder_ == null) {
baseEjectionTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getBaseEjectionTime(),
getParentForChildren(),
isClean());
baseEjectionTime_ = null;
}
return baseEjectionTimeBuilder_;
}
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;
* @return The maxEjectionPercent.
*/
@java.lang.Override
public int getMaxEjectionPercent() {
return 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;
* @param value The maxEjectionPercent to set.
* @return This builder for chaining.
*/
public Builder setMaxEjectionPercent(int value) {
maxEjectionPercent_ = value;
onChanged();
return this;
}
/**
*
* Maximum % of hosts in the load balancing pool for the upstream
* service that can be ejected. Defaults to 10%.
*
*
* int32 max_ejection_percent = 4;
* @return This builder for chaining.
*/
public Builder clearMaxEjectionPercent() {
maxEjectionPercent_ = 0;
onChanged();
return this;
}
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;
* @return The minHealthPercent.
*/
@java.lang.Override
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.
*
*
* int32 min_health_percent = 5;
* @param value The minHealthPercent to set.
* @return This builder for chaining.
*/
public Builder setMinHealthPercent(int value) {
minHealthPercent_ = value;
onChanged();
return this;
}
/**
*
* 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;
* @return This builder for chaining.
*/
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.
*
*
* .istio.networking.v1alpha3.ClientTLSSettings.TLSmode mode = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The enum numeric value on the wire for mode.
*/
int getModeValue();
/**
*
* 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];
* @return The mode.
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.TLSmode getMode();
/**
*
* 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`.
*
*
* string client_certificate = 2;
* @return The clientCertificate.
*/
java.lang.String getClientCertificate();
/**
*
* 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`.
*
*
* string client_certificate = 2;
* @return The bytes for clientCertificate.
*/
com.google.protobuf.ByteString
getClientCertificateBytes();
/**
*
* 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;
* @return The privateKey.
*/
java.lang.String getPrivateKey();
/**
*
* 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;
* @return The bytes for privateKey.
*/
com.google.protobuf.ByteString
getPrivateKeyBytes();
/**
*
* 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;
* @return The caCertificates.
*/
java.lang.String getCaCertificates();
/**
*
* 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;
* @return The bytes for caCertificates.
*/
com.google.protobuf.ByteString
getCaCertificatesBytes();
/**
*
* 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;
* @return The credentialName.
*/
java.lang.String getCredentialName();
/**
*
* 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;
* @return The bytes for credentialName.
*/
com.google.protobuf.ByteString
getCredentialNameBytes();
/**
*
* 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;
* @return A list containing the subjectAltNames.
*/
java.util.List
getSubjectAltNamesList();
/**
*
* 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;
* @return The count of subjectAltNames.
*/
int getSubjectAltNamesCount();
/**
*
* 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;
* @param index The index of the element to return.
* @return The subjectAltNames at the given index.
*/
java.lang.String getSubjectAltNames(int index);
/**
*
* 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;
* @param index The index of the value to return.
* @return The bytes of the subjectAltNames at the given index.
*/
com.google.protobuf.ByteString
getSubjectAltNamesBytes(int index);
/**
*
* SNI string to present to the server during TLS handshake.
*
*
* string sni = 6;
* @return The sni.
*/
java.lang.String getSni();
/**
*
* SNI string to present to the server during TLS handshake.
*
*
* string sni = 6;
* @return The bytes for sni.
*/
com.google.protobuf.ByteString
getSniBytes();
}
/**
*
* SSL/TLS related settings for upstream connections. See Envoy's [TLS
* context](https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/auth/cert.proto.html)
* for more details. These settings are common to both HTTP and TCP upstreams.
* For example, the following rule configures a client to use mutual TLS
* for connections to upstream database cluster.
* {{<tabset category-name="example">}}
* {{<tab name="v1alpha3" category-value="v1alpha3">}}
* ```yaml
* apiVersion: networking.istio.io/v1alpha3
* kind: DestinationRule
* metadata:
* name: db-mtls
* spec:
* host: mydbserver.prod.svc.cluster.local
* trafficPolicy:
* tls:
* mode: MUTUAL
* clientCertificate: /etc/certs/myclientcert.pem
* privateKey: /etc/certs/client_private_key.pem
* caCertificates: /etc/certs/rootcacerts.pem
* ```
* {{</tab>}}
* {{<tab name="v1beta1" category-value="v1beta1">}}
* ```yaml
* apiVersion: networking.istio.io/v1beta1
* kind: DestinationRule
* metadata:
* name: db-mtls
* spec:
* host: mydbserver.prod.svc.cluster.local
* trafficPolicy:
* tls:
* mode: MUTUAL
* clientCertificate: /etc/certs/myclientcert.pem
* privateKey: /etc/certs/client_private_key.pem
* caCertificates: /etc/certs/rootcacerts.pem
* ```
* {{</tab>}}
* {{</tabset>}}
* The following rule configures a client to use TLS when talking to a
* foreign service whose domain matches *.foo.com.
* {{<tabset category-name="example">}}
* {{<tab name="v1alpha3" category-value="v1alpha3">}}
* ```yaml
* apiVersion: networking.istio.io/v1alpha3
* kind: DestinationRule
* metadata:
* name: tls-foo
* spec:
* host: "*.foo.com"
* trafficPolicy:
* tls:
* mode: SIMPLE
* ```
* {{</tab>}}
* {{<tab name="v1beta1" category-value="v1beta1">}}
* ```yaml
* apiVersion: networking.istio.io/v1beta1
* kind: DestinationRule
* metadata:
* name: tls-foo
* spec:
* host: "*.foo.com"
* trafficPolicy:
* tls:
* mode: SIMPLE
* ```
* {{</tab>}}
* {{</tabset>}}
* The following rule configures a client to use Istio mutual TLS when talking
* to rating services.
* {{<tabset category-name="example">}}
* {{<tab name="v1alpha3" category-value="v1alpha3">}}
* ```yaml
* apiVersion: networking.istio.io/v1alpha3
* kind: DestinationRule
* metadata:
* name: ratings-istio-mtls
* spec:
* host: ratings.prod.svc.cluster.local
* trafficPolicy:
* tls:
* mode: ISTIO_MUTUAL
* ```
* {{</tab>}}
* {{<tab name="v1beta1" category-value="v1beta1">}}
* ```yaml
* apiVersion: networking.istio.io/v1beta1
* kind: DestinationRule
* metadata:
* name: ratings-istio-mtls
* spec:
* host: ratings.prod.svc.cluster.local
* trafficPolicy:
* tls:
* mode: ISTIO_MUTUAL
* ```
* {{</tab>}}
* {{</tabset>}}
*
*
* Protobuf type {@code istio.networking.v1alpha3.ClientTLSSettings}
*/
public static final class ClientTLSSettings extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:istio.networking.v1alpha3.ClientTLSSettings)
ClientTLSSettingsOrBuilder {
private static final long serialVersionUID = 0L;
// Use ClientTLSSettings.newBuilder() to construct.
private ClientTLSSettings(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ClientTLSSettings() {
mode_ = 0;
clientCertificate_ = "";
privateKey_ = "";
caCertificates_ = "";
credentialName_ = "";
subjectAltNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
sni_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ClientTLSSettings();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ClientTLSSettings(
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 8: {
int rawValue = input.readEnum();
mode_ = rawValue;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
clientCertificate_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
privateKey_ = s;
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
caCertificates_ = s;
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
subjectAltNames_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
subjectAltNames_.add(s);
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
sni_ = s;
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
credentialName_ = 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)) {
subjectAltNames_ = subjectAltNames_.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_ClientTLSSettings_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_ClientTLSSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.class, istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.Builder.class);
}
/**
*
* TLS connection mode
*
*
* Protobuf enum {@code istio.networking.v1alpha3.ClientTLSSettings.TLSmode}
*/
public enum TLSmode
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* 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.
*
*
* ISTIO_MUTUAL = 3;
*/
ISTIO_MUTUAL(3),
UNRECOGNIZED(-1),
;
/**
*
* 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;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static TLSmode valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static 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() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
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];
* @return The enum numeric value on the wire for mode.
*/
@java.lang.Override 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];
* @return The mode.
*/
@java.lang.Override 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`.
*
*
* string client_certificate = 2;
* @return The clientCertificate.
*/
@java.lang.Override
public java.lang.String getClientCertificate() {
java.lang.Object ref = clientCertificate_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
clientCertificate_ = s;
return s;
}
}
/**
*
* 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`.
*
*
* string client_certificate = 2;
* @return The bytes for clientCertificate.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getClientCertificateBytes() {
java.lang.Object ref = clientCertificate_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
clientCertificate_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PRIVATE_KEY_FIELD_NUMBER = 3;
private volatile java.lang.Object privateKey_;
/**
*
* 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;
* @return The privateKey.
*/
@java.lang.Override
public java.lang.String getPrivateKey() {
java.lang.Object ref = privateKey_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
privateKey_ = s;
return s;
}
}
/**
*
* 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;
* @return The bytes for privateKey.
*/
@java.lang.Override
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`.
*
*
* string ca_certificates = 4;
* @return The caCertificates.
*/
@java.lang.Override
public java.lang.String getCaCertificates() {
java.lang.Object ref = caCertificates_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
caCertificates_ = s;
return s;
}
}
/**
*
* 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;
* @return The bytes for caCertificates.
*/
@java.lang.Override
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.
*
*
* string credential_name = 7;
* @return The credentialName.
*/
@java.lang.Override
public java.lang.String getCredentialName() {
java.lang.Object ref = credentialName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
credentialName_ = s;
return s;
}
}
/**
*
* 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;
* @return The bytes for credentialName.
*/
@java.lang.Override
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.
*
*
* repeated string subject_alt_names = 5;
* @return A list containing the subjectAltNames.
*/
public com.google.protobuf.ProtocolStringList
getSubjectAltNamesList() {
return 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.
*
*
* repeated string subject_alt_names = 5;
* @return The count of subjectAltNames.
*/
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.
*
*
* repeated string subject_alt_names = 5;
* @param index The index of the element to return.
* @return The subjectAltNames at the given index.
*/
public java.lang.String getSubjectAltNames(int index) {
return subjectAltNames_.get(index);
}
/**
*
* 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;
* @param index The index of the value to return.
* @return The bytes of the subjectAltNames at the given index.
*/
public com.google.protobuf.ByteString
getSubjectAltNamesBytes(int index) {
return subjectAltNames_.getByteString(index);
}
public static final int SNI_FIELD_NUMBER = 6;
private volatile java.lang.Object sni_;
/**
*
* SNI string to present to the server during TLS handshake.
*
*
* string sni = 6;
* @return The sni.
*/
@java.lang.Override
public java.lang.String getSni() {
java.lang.Object ref = sni_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sni_ = s;
return s;
}
}
/**
*
* SNI string to present to the server during TLS handshake.
*
*
* string sni = 6;
* @return The bytes for sni.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSniBytes() {
java.lang.Object ref = sni_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sni_ = 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 (mode_ != istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.TLSmode.DISABLE.getNumber()) {
output.writeEnum(1, mode_);
}
if (!getClientCertificateBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clientCertificate_);
}
if (!getPrivateKeyBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, privateKey_);
}
if (!getCaCertificatesBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, caCertificates_);
}
for (int i = 0; i < subjectAltNames_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, subjectAltNames_.getRaw(i));
}
if (!getSniBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, sni_);
}
if (!getCredentialNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, credentialName_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (mode_ != istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.TLSmode.DISABLE.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, mode_);
}
if (!getClientCertificateBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clientCertificate_);
}
if (!getPrivateKeyBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, privateKey_);
}
if (!getCaCertificatesBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, caCertificates_);
}
{
int dataSize = 0;
for (int i = 0; i < subjectAltNames_.size(); i++) {
dataSize += computeStringSizeNoTag(subjectAltNames_.getRaw(i));
}
size += dataSize;
size += 1 * getSubjectAltNamesList().size();
}
if (!getSniBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, sni_);
}
if (!getCredentialNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, credentialName_);
}
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.ClientTLSSettings)) {
return super.equals(obj);
}
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings other = (istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings) obj;
if (mode_ != other.mode_) return false;
if (!getClientCertificate()
.equals(other.getClientCertificate())) return false;
if (!getPrivateKey()
.equals(other.getPrivateKey())) return false;
if (!getCaCertificates()
.equals(other.getCaCertificates())) return false;
if (!getCredentialName()
.equals(other.getCredentialName())) return false;
if (!getSubjectAltNamesList()
.equals(other.getSubjectAltNamesList())) return false;
if (!getSni()
.equals(other.getSni())) 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) + MODE_FIELD_NUMBER;
hash = (53 * hash) + mode_;
hash = (37 * hash) + CLIENT_CERTIFICATE_FIELD_NUMBER;
hash = (53 * hash) + getClientCertificate().hashCode();
hash = (37 * hash) + PRIVATE_KEY_FIELD_NUMBER;
hash = (53 * hash) + getPrivateKey().hashCode();
hash = (37 * hash) + CA_CERTIFICATES_FIELD_NUMBER;
hash = (53 * hash) + getCaCertificates().hashCode();
hash = (37 * hash) + CREDENTIAL_NAME_FIELD_NUMBER;
hash = (53 * hash) + getCredentialName().hashCode();
if (getSubjectAltNamesCount() > 0) {
hash = (37 * hash) + SUBJECT_ALT_NAMES_FIELD_NUMBER;
hash = (53 * hash) + getSubjectAltNamesList().hashCode();
}
hash = (37 * hash) + SNI_FIELD_NUMBER;
hash = (53 * hash) + getSni().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings 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.ClientTLSSettings parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings 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.ClientTLSSettings parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings 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.ClientTLSSettings parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings 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.ClientTLSSettings parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings 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.ClientTLSSettings 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;
}
/**
*
* SSL/TLS related settings for upstream connections. See Envoy's [TLS
* context](https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/auth/cert.proto.html)
* for more details. These settings are common to both HTTP and TCP upstreams.
* For example, the following rule configures a client to use mutual TLS
* for connections to upstream database cluster.
* {{<tabset category-name="example">}}
* {{<tab name="v1alpha3" category-value="v1alpha3">}}
* ```yaml
* apiVersion: networking.istio.io/v1alpha3
* kind: DestinationRule
* metadata:
* name: db-mtls
* spec:
* host: mydbserver.prod.svc.cluster.local
* trafficPolicy:
* tls:
* mode: MUTUAL
* clientCertificate: /etc/certs/myclientcert.pem
* privateKey: /etc/certs/client_private_key.pem
* caCertificates: /etc/certs/rootcacerts.pem
* ```
* {{</tab>}}
* {{<tab name="v1beta1" category-value="v1beta1">}}
* ```yaml
* apiVersion: networking.istio.io/v1beta1
* kind: DestinationRule
* metadata:
* name: db-mtls
* spec:
* host: mydbserver.prod.svc.cluster.local
* trafficPolicy:
* tls:
* mode: MUTUAL
* clientCertificate: /etc/certs/myclientcert.pem
* privateKey: /etc/certs/client_private_key.pem
* caCertificates: /etc/certs/rootcacerts.pem
* ```
* {{</tab>}}
* {{</tabset>}}
* The following rule configures a client to use TLS when talking to a
* foreign service whose domain matches *.foo.com.
* {{<tabset category-name="example">}}
* {{<tab name="v1alpha3" category-value="v1alpha3">}}
* ```yaml
* apiVersion: networking.istio.io/v1alpha3
* kind: DestinationRule
* metadata:
* name: tls-foo
* spec:
* host: "*.foo.com"
* trafficPolicy:
* tls:
* mode: SIMPLE
* ```
* {{</tab>}}
* {{<tab name="v1beta1" category-value="v1beta1">}}
* ```yaml
* apiVersion: networking.istio.io/v1beta1
* kind: DestinationRule
* metadata:
* name: tls-foo
* spec:
* host: "*.foo.com"
* trafficPolicy:
* tls:
* mode: SIMPLE
* ```
* {{</tab>}}
* {{</tabset>}}
* The following rule configures a client to use Istio mutual TLS when talking
* to rating services.
* {{<tabset category-name="example">}}
* {{<tab name="v1alpha3" category-value="v1alpha3">}}
* ```yaml
* apiVersion: networking.istio.io/v1alpha3
* kind: DestinationRule
* metadata:
* name: ratings-istio-mtls
* spec:
* host: ratings.prod.svc.cluster.local
* trafficPolicy:
* tls:
* mode: ISTIO_MUTUAL
* ```
* {{</tab>}}
* {{<tab name="v1beta1" category-value="v1beta1">}}
* ```yaml
* apiVersion: networking.istio.io/v1beta1
* kind: DestinationRule
* metadata:
* name: ratings-istio-mtls
* spec:
* host: ratings.prod.svc.cluster.local
* trafficPolicy:
* tls:
* mode: ISTIO_MUTUAL
* ```
* {{</tab>}}
* {{</tabset>}}
*
*
* Protobuf type {@code istio.networking.v1alpha3.ClientTLSSettings}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:istio.networking.v1alpha3.ClientTLSSettings)
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettingsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_ClientTLSSettings_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_ClientTLSSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.class, istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.Builder.class);
}
// Construct using istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.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();
mode_ = 0;
clientCertificate_ = "";
privateKey_ = "";
caCertificates_ = "";
credentialName_ = "";
subjectAltNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
sni_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_ClientTLSSettings_descriptor;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings getDefaultInstanceForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.getDefaultInstance();
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings build() {
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings buildPartial() {
istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings result = new istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings(this);
int from_bitField0_ = bitField0_;
result.mode_ = mode_;
result.clientCertificate_ = clientCertificate_;
result.privateKey_ = privateKey_;
result.caCertificates_ = caCertificates_;
result.credentialName_ = credentialName_;
if (((bitField0_ & 0x00000001) != 0)) {
subjectAltNames_ = subjectAltNames_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.subjectAltNames_ = subjectAltNames_;
result.sni_ = sni_;
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.ClientTLSSettings) {
return mergeFrom((istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings other) {
if (other == istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.getDefaultInstance()) return this;
if (other.mode_ != 0) {
setModeValue(other.getModeValue());
}
if (!other.getClientCertificate().isEmpty()) {
clientCertificate_ = other.clientCertificate_;
onChanged();
}
if (!other.getPrivateKey().isEmpty()) {
privateKey_ = other.privateKey_;
onChanged();
}
if (!other.getCaCertificates().isEmpty()) {
caCertificates_ = other.caCertificates_;
onChanged();
}
if (!other.getCredentialName().isEmpty()) {
credentialName_ = other.credentialName_;
onChanged();
}
if (!other.subjectAltNames_.isEmpty()) {
if (subjectAltNames_.isEmpty()) {
subjectAltNames_ = other.subjectAltNames_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureSubjectAltNamesIsMutable();
subjectAltNames_.addAll(other.subjectAltNames_);
}
onChanged();
}
if (!other.getSni().isEmpty()) {
sni_ = other.sni_;
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.ClientTLSSettings parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int mode_ = 0;
/**
*
* 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];
* @return The enum numeric value on the wire for mode.
*/
@java.lang.Override 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];
* @param value The enum numeric value on the wire for mode to set.
* @return This builder for chaining.
*/
public Builder setModeValue(int value) {
mode_ = value;
onChanged();
return this;
}
/**
*
* 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];
* @return The mode.
*/
@java.lang.Override
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;
}
/**
*
* 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];
* @param value The mode to set.
* @return This builder for chaining.
*/
public Builder setMode(istio.networking.v1alpha3.DestinationRuleOuterClass.ClientTLSSettings.TLSmode value) {
if (value == null) {
throw new NullPointerException();
}
mode_ = value.getNumber();
onChanged();
return this;
}
/**
*
* 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];
* @return This builder for chaining.
*/
public Builder clearMode() {
mode_ = 0;
onChanged();
return this;
}
private 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`.
*
*
* string client_certificate = 2;
* @return The clientCertificate.
*/
public java.lang.String getClientCertificate() {
java.lang.Object ref = clientCertificate_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
clientCertificate_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* 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`.
*
*
* string client_certificate = 2;
* @return The bytes for clientCertificate.
*/
public com.google.protobuf.ByteString
getClientCertificateBytes() {
java.lang.Object ref = clientCertificate_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
clientCertificate_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* 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`.
*
*
* string client_certificate = 2;
* @param value The clientCertificate to set.
* @return This builder for chaining.
*/
public Builder setClientCertificate(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
clientCertificate_ = value;
onChanged();
return this;
}
/**
*
* 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`.
*
*
* string client_certificate = 2;
* @return This builder for chaining.
*/
public Builder clearClientCertificate() {
clientCertificate_ = getDefaultInstance().getClientCertificate();
onChanged();
return this;
}
/**
*
* 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`.
*
*
* string client_certificate = 2;
* @param value The bytes for clientCertificate to set.
* @return This builder for chaining.
*/
public Builder setClientCertificateBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
clientCertificate_ = value;
onChanged();
return this;
}
private java.lang.Object privateKey_ = "";
/**
*
* 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;
* @return The privateKey.
*/
public java.lang.String getPrivateKey() {
java.lang.Object ref = privateKey_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
privateKey_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* 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;
* @return The bytes for privateKey.
*/
public com.google.protobuf.ByteString
getPrivateKeyBytes() {
java.lang.Object ref = privateKey_;
if (ref instanceof 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;
}
}
/**
*
* 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;
* @param value The privateKey to set.
* @return This builder for chaining.
*/
public Builder setPrivateKey(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
privateKey_ = value;
onChanged();
return this;
}
/**
*
* 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;
* @return This builder for chaining.
*/
public Builder clearPrivateKey() {
privateKey_ = getDefaultInstance().getPrivateKey();
onChanged();
return this;
}
/**
*
* 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;
* @param value The bytes for privateKey to set.
* @return This builder for chaining.
*/
public Builder setPrivateKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
privateKey_ = value;
onChanged();
return this;
}
private 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`.
*
*
* string ca_certificates = 4;
* @return The caCertificates.
*/
public java.lang.String getCaCertificates() {
java.lang.Object ref = caCertificates_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
caCertificates_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* 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;
* @return The bytes for caCertificates.
*/
public com.google.protobuf.ByteString
getCaCertificatesBytes() {
java.lang.Object ref = caCertificates_;
if (ref instanceof 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;
}
}
/**
*
* 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;
* @param value The caCertificates to set.
* @return This builder for chaining.
*/
public Builder setCaCertificates(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
caCertificates_ = value;
onChanged();
return this;
}
/**
*
* 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;
* @return This builder for chaining.
*/
public Builder clearCaCertificates() {
caCertificates_ = getDefaultInstance().getCaCertificates();
onChanged();
return this;
}
/**
*
* 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;
* @param value The bytes for caCertificates to set.
* @return This builder for chaining.
*/
public Builder setCaCertificatesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
caCertificates_ = value;
onChanged();
return this;
}
private 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.
*
*
* string credential_name = 7;
* @return The credentialName.
*/
public java.lang.String getCredentialName() {
java.lang.Object ref = credentialName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
credentialName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* 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;
* @return The bytes for credentialName.
*/
public com.google.protobuf.ByteString
getCredentialNameBytes() {
java.lang.Object ref = credentialName_;
if (ref instanceof 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;
}
}
/**
*
* 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;
* @param value The credentialName to set.
* @return This builder for chaining.
*/
public Builder setCredentialName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
credentialName_ = value;
onChanged();
return this;
}
/**
*
* 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;
* @return This builder for chaining.
*/
public Builder clearCredentialName() {
credentialName_ = getDefaultInstance().getCredentialName();
onChanged();
return this;
}
/**
*
* 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;
* @param value The bytes for credentialName to set.
* @return This builder for chaining.
*/
public Builder setCredentialNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
credentialName_ = value;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList subjectAltNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureSubjectAltNamesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
subjectAltNames_ = new com.google.protobuf.LazyStringArrayList(subjectAltNames_);
bitField0_ |= 0x00000001;
}
}
/**
*
* 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;
* @return A list containing the subjectAltNames.
*/
public com.google.protobuf.ProtocolStringList
getSubjectAltNamesList() {
return subjectAltNames_.getUnmodifiableView();
}
/**
*
* 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;
* @return The count of subjectAltNames.
*/
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.
*
*
* repeated string subject_alt_names = 5;
* @param index The index of the element to return.
* @return The subjectAltNames at the given index.
*/
public java.lang.String getSubjectAltNames(int index) {
return subjectAltNames_.get(index);
}
/**
*
* 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;
* @param index The index of the value to return.
* @return The bytes of the subjectAltNames at the given index.
*/
public com.google.protobuf.ByteString
getSubjectAltNamesBytes(int index) {
return subjectAltNames_.getByteString(index);
}
/**
*
* 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;
* @param index The index to set the value at.
* @param value The subjectAltNames to set.
* @return This builder for chaining.
*/
public Builder setSubjectAltNames(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureSubjectAltNamesIsMutable();
subjectAltNames_.set(index, value);
onChanged();
return this;
}
/**
*
* 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;
* @param value The subjectAltNames to add.
* @return This builder for chaining.
*/
public Builder addSubjectAltNames(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureSubjectAltNamesIsMutable();
subjectAltNames_.add(value);
onChanged();
return this;
}
/**
*
* 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;
* @param values The subjectAltNames to add.
* @return This builder for chaining.
*/
public Builder addAllSubjectAltNames(
java.lang.Iterable values) {
ensureSubjectAltNamesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, subjectAltNames_);
onChanged();
return this;
}
/**
*
* 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;
* @return This builder for chaining.
*/
public Builder clearSubjectAltNames() {
subjectAltNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
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.
*
*
* repeated string subject_alt_names = 5;
* @param value The bytes of the subjectAltNames to add.
* @return This builder for chaining.
*/
public Builder addSubjectAltNamesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureSubjectAltNamesIsMutable();
subjectAltNames_.add(value);
onChanged();
return this;
}
private java.lang.Object sni_ = "";
/**
*
* SNI string to present to the server during TLS handshake.
*
*
* string sni = 6;
* @return The sni.
*/
public java.lang.String getSni() {
java.lang.Object ref = sni_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sni_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* SNI string to present to the server during TLS handshake.
*
*
* string sni = 6;
* @return The bytes for sni.
*/
public com.google.protobuf.ByteString
getSniBytes() {
java.lang.Object ref = sni_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sni_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* SNI string to present to the server during TLS handshake.
*
*
* string sni = 6;
* @param value The sni to set.
* @return This builder for chaining.
*/
public Builder setSni(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
sni_ = value;
onChanged();
return this;
}
/**
*
* SNI string to present to the server during TLS handshake.
*
*
* string sni = 6;
* @return This builder for chaining.
*/
public Builder clearSni() {
sni_ = getDefaultInstance().getSni();
onChanged();
return this;
}
/**
*
* SNI string to present to the server during TLS handshake.
*
*
* string sni = 6;
* @param value The bytes for sni to set.
* @return This builder for chaining.
*/
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.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute distribute = 1;
*/
java.util.List
getDistributeList();
/**
*
* 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;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute getDistribute(int 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;
*/
int getDistributeCount();
/**
*
* 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;
*/
java.util.List extends istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.DistributeOrBuilder>
getDistributeOrBuilderList();
/**
*
* 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;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.DistributeOrBuilder getDistributeOrBuilder(
int 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;
*/
java.util.List
getFailoverList();
/**
*
* 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;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover getFailover(int 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;
*/
int getFailoverCount();
/**
*
* 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;
*/
java.util.List extends istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.FailoverOrBuilder>
getFailoverOrBuilderList();
/**
*
* 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;
*/
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.FailoverOrBuilder getFailoverOrBuilder(
int index);
/**
*
* 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;
* @return Whether the enabled field is set.
*/
boolean hasEnabled();
/**
*
* 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;
* @return The enabled.
*/
com.google.protobuf.BoolValue getEnabled();
/**
*
* 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;
*/
com.google.protobuf.BoolValueOrBuilder getEnabledOrBuilder();
}
/**
*
* 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'.
*
*
* string from = 1;
* @return The from.
*/
java.lang.String getFrom();
/**
*
* Originating locality, '/' separated, e.g. 'region/zone/sub_zone'.
*
*
* string from = 1;
* @return The bytes for from.
*/
com.google.protobuf.ByteString
getFromBytes();
/**
*
* 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<string, uint32> to = 2;
*/
boolean containsTo(
java.lang.String key);
/**
* Use {@link #getToMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getTo();
/**
*
* 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;
*/
java.util.Map
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;
*/
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'.
*
*
* string from = 1;
* @return The from.
*/
@java.lang.Override
public java.lang.String getFrom() {
java.lang.Object ref = from_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
from_ = s;
return s;
}
}
/**
*
* Originating locality, '/' separated, e.g. 'region/zone/sub_zone'.
*
*
* string from = 1;
* @return The bytes for from.
*/
@java.lang.Override
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;
*/
@java.lang.Override
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.Override
@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;
*/
@java.lang.Override
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;
*/
@java.lang.Override
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;
*/
@java.lang.Override
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'.
*
*
* string from = 1;
* @return The from.
*/
public java.lang.String getFrom() {
java.lang.Object ref = from_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
from_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Originating locality, '/' separated, e.g. 'region/zone/sub_zone'.
*
*
* string from = 1;
* @return The bytes for from.
*/
public com.google.protobuf.ByteString
getFromBytes() {
java.lang.Object ref = from_;
if (ref instanceof 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;
}
}
/**
*
* Originating locality, '/' separated, e.g. 'region/zone/sub_zone'.
*
*
* string from = 1;
* @param value The from to set.
* @return This builder for chaining.
*/
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;
* @return This builder for chaining.
*/
public Builder clearFrom() {
from_ = getDefaultInstance().getFrom();
onChanged();
return this;
}
/**
*
* Originating locality, '/' separated, e.g. 'region/zone/sub_zone'.
*
*
* string from = 1;
* @param value The bytes for from to set.
* @return This builder for chaining.
*/
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;
*/
@java.lang.Override
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.Override
@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;
*/
@java.lang.Override
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;
*/
@java.lang.Override
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;
*/
@java.lang.Override
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 {
/**
*
* Originating region.
*
*
* string from = 1;
* @return The from.
*/
java.lang.String getFrom();
/**
*
* Originating region.
*
*
* string from = 1;
* @return The bytes for from.
*/
com.google.protobuf.ByteString
getFromBytes();
/**
*
* Destination region the traffic will fail over to when endpoints in
* the 'from' region becomes unhealthy.
*
*
* string to = 2;
* @return The to.
*/
java.lang.String getTo();
/**
*
* Destination region the traffic will fail over to when endpoints in
* the 'from' region becomes unhealthy.
*
*
* string to = 2;
* @return The bytes for to.
*/
com.google.protobuf.ByteString
getToBytes();
}
/**
*
* 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_;
/**
*
* Originating region.
*
*
* string from = 1;
* @return The from.
*/
@java.lang.Override
public java.lang.String getFrom() {
java.lang.Object ref = from_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
from_ = s;
return s;
}
}
/**
*
* Originating region.
*
*
* string from = 1;
* @return The bytes for from.
*/
@java.lang.Override
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 volatile java.lang.Object to_;
/**
*
* Destination region the traffic will fail over to when endpoints in
* the 'from' region becomes unhealthy.
*
*
* string to = 2;
* @return The to.
*/
@java.lang.Override
public java.lang.String getTo() {
java.lang.Object ref = to_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
to_ = s;
return s;
}
}
/**
*
* Destination region the traffic will fail over to when endpoints in
* the 'from' region becomes unhealthy.
*
*
* string to = 2;
* @return The bytes for to.
*/
@java.lang.Override
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_ = "";
/**
*
* Originating region.
*
*
* string from = 1;
* @return The from.
*/
public java.lang.String getFrom() {
java.lang.Object ref = from_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
from_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Originating region.
*
*
* string from = 1;
* @return The bytes for from.
*/
public com.google.protobuf.ByteString
getFromBytes() {
java.lang.Object ref = from_;
if (ref instanceof 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;
}
}
/**
*
* Originating region.
*
*
* string from = 1;
* @param value The from to set.
* @return This builder for chaining.
*/
public Builder setFrom(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
from_ = value;
onChanged();
return this;
}
/**
*
* Originating region.
*
*
* string from = 1;
* @return This builder for chaining.
*/
public Builder clearFrom() {
from_ = getDefaultInstance().getFrom();
onChanged();
return this;
}
/**
*
* Originating region.
*
*
* string from = 1;
* @param value The bytes for from to set.
* @return This builder for chaining.
*/
public Builder setFromBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
from_ = value;
onChanged();
return this;
}
private java.lang.Object to_ = "";
/**
*
* Destination region the traffic will fail over to when endpoints in
* the 'from' region becomes unhealthy.
*
*
* string to = 2;
* @return The to.
*/
public java.lang.String getTo() {
java.lang.Object ref = to_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
to_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Destination region the traffic will fail over to when endpoints in
* the 'from' region becomes unhealthy.
*
*
* string to = 2;
* @return The bytes for to.
*/
public com.google.protobuf.ByteString
getToBytes() {
java.lang.Object ref = to_;
if (ref instanceof 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;
}
}
/**
*
* Destination region the traffic will fail over to when endpoints in
* the 'from' region becomes unhealthy.
*
*
* string to = 2;
* @param value The to to set.
* @return This builder for chaining.
*/
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;
* @return This builder for chaining.
*/
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;
* @param value The bytes for to to set.
* @return This builder for chaining.
*/
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.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute distribute = 1;
*/
@java.lang.Override
public java.util.List getDistributeList() {
return 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.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute distribute = 1;
*/
@java.lang.Override
public java.util.List extends istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.DistributeOrBuilder>
getDistributeOrBuilderList() {
return 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.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute distribute = 1;
*/
@java.lang.Override
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.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute distribute = 1;
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute getDistribute(int index) {
return distribute_.get(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;
*/
@java.lang.Override
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.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover failover = 2;
*/
@java.lang.Override
public java.util.List getFailoverList() {
return 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.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover failover = 2;
*/
@java.lang.Override
public java.util.List extends istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.FailoverOrBuilder>
getFailoverOrBuilderList() {
return 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.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover failover = 2;
*/
@java.lang.Override
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.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover failover = 2;
*/
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover getFailover(int index) {
return failover_.get(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;
*/
@java.lang.Override
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.
*
*
* .google.protobuf.BoolValue enabled = 3;
* @return Whether the enabled field is set.
*/
@java.lang.Override
public boolean hasEnabled() {
return enabled_ != null;
}
/**
*
* 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;
* @return The enabled.
*/
@java.lang.Override
public com.google.protobuf.BoolValue getEnabled() {
return enabled_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : 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.
*
*
* .google.protobuf.BoolValue enabled = 3;
*/
@java.lang.Override
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.
*
*
* Protobuf type {@code istio.networking.v1alpha3.LocalityLoadBalancerSetting}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:istio.networking.v1alpha3.LocalityLoadBalancerSetting)
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSettingOrBuilder {
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);
}
// Construct using istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getDistributeFieldBuilder();
getFailoverFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (distributeBuilder_ == null) {
distribute_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
distributeBuilder_.clear();
}
if (failoverBuilder_ == null) {
failover_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
failoverBuilder_.clear();
}
if (enabledBuilder_ == null) {
enabled_ = null;
} else {
enabled_ = null;
enabledBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_descriptor;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting getDefaultInstanceForType() {
return istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.getDefaultInstance();
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting build() {
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting buildPartial() {
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting result = new istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting(this);
int from_bitField0_ = bitField0_;
if (distributeBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
distribute_ = java.util.Collections.unmodifiableList(distribute_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.distribute_ = distribute_;
} else {
result.distribute_ = distributeBuilder_.build();
}
if (failoverBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
failover_ = java.util.Collections.unmodifiableList(failover_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.failover_ = failover_;
} else {
result.failover_ = failoverBuilder_.build();
}
if (enabledBuilder_ == null) {
result.enabled_ = enabled_;
} else {
result.enabled_ = enabledBuilder_.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.LocalityLoadBalancerSetting) {
return mergeFrom((istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting other) {
if (other == istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.getDefaultInstance()) return this;
if (distributeBuilder_ == null) {
if (!other.distribute_.isEmpty()) {
if (distribute_.isEmpty()) {
distribute_ = other.distribute_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureDistributeIsMutable();
distribute_.addAll(other.distribute_);
}
onChanged();
}
} else {
if (!other.distribute_.isEmpty()) {
if (distributeBuilder_.isEmpty()) {
distributeBuilder_.dispose();
distributeBuilder_ = null;
distribute_ = other.distribute_;
bitField0_ = (bitField0_ & ~0x00000001);
distributeBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getDistributeFieldBuilder() : null;
} else {
distributeBuilder_.addAllMessages(other.distribute_);
}
}
}
if (failoverBuilder_ == null) {
if (!other.failover_.isEmpty()) {
if (failover_.isEmpty()) {
failover_ = other.failover_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureFailoverIsMutable();
failover_.addAll(other.failover_);
}
onChanged();
}
} else {
if (!other.failover_.isEmpty()) {
if (failoverBuilder_.isEmpty()) {
failoverBuilder_.dispose();
failoverBuilder_ = null;
failover_ = other.failover_;
bitField0_ = (bitField0_ & ~0x00000002);
failoverBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getFailoverFieldBuilder() : null;
} else {
failoverBuilder_.addAllMessages(other.failover_);
}
}
}
if (other.hasEnabled()) {
mergeEnabled(other.getEnabled());
}
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 parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List distribute_ =
java.util.Collections.emptyList();
private void ensureDistributeIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
distribute_ = new java.util.ArrayList(distribute_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.DistributeOrBuilder> distributeBuilder_;
/**
*
* 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 java.util.List getDistributeList() {
if (distributeBuilder_ == null) {
return java.util.Collections.unmodifiableList(distribute_);
} else {
return distributeBuilder_.getMessageList();
}
}
/**
*
* 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.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute distribute = 1;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute getDistribute(int index) {
if (distributeBuilder_ == null) {
return distribute_.get(index);
} else {
return distributeBuilder_.getMessage(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 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.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute distribute = 1;
*/
public Builder setDistribute(
int index, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute.Builder builderForValue) {
if (distributeBuilder_ == null) {
ensureDistributeIsMutable();
distribute_.set(index, builderForValue.build());
onChanged();
} else {
distributeBuilder_.setMessage(index, builderForValue.build());
}
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(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.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute distribute = 1;
*/
public Builder addDistribute(
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute.Builder builderForValue) {
if (distributeBuilder_ == null) {
ensureDistributeIsMutable();
distribute_.add(builderForValue.build());
onChanged();
} else {
distributeBuilder_.addMessage(builderForValue.build());
}
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.Builder builderForValue) {
if (distributeBuilder_ == null) {
ensureDistributeIsMutable();
distribute_.add(index, builderForValue.build());
onChanged();
} else {
distributeBuilder_.addMessage(index, builderForValue.build());
}
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 addAllDistribute(
java.lang.Iterable extends istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute> values) {
if (distributeBuilder_ == null) {
ensureDistributeIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, distribute_);
onChanged();
} else {
distributeBuilder_.addAllMessages(values);
}
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 clearDistribute() {
if (distributeBuilder_ == null) {
distribute_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
distributeBuilder_.clear();
}
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 removeDistribute(int index) {
if (distributeBuilder_ == null) {
ensureDistributeIsMutable();
distribute_.remove(index);
onChanged();
} else {
distributeBuilder_.remove(index);
}
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 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.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute distribute = 1;
*/
public java.util.List extends istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.DistributeOrBuilder>
getDistributeOrBuilderList() {
if (distributeBuilder_ != null) {
return distributeBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(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.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute distribute = 1;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute.Builder addDistributeBuilder() {
return getDistributeFieldBuilder().addBuilder(
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute.getDefaultInstance());
}
/**
*
* 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 addDistributeBuilder(
int index) {
return getDistributeFieldBuilder().addBuilder(
index, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute.getDefaultInstance());
}
/**
*
* 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 java.util.List
getDistributeBuilderList() {
return getDistributeFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.DistributeOrBuilder>
getDistributeFieldBuilder() {
if (distributeBuilder_ == null) {
distributeBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.DistributeOrBuilder>(
distribute_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
distribute_ = null;
}
return distributeBuilder_;
}
private java.util.List failover_ =
java.util.Collections.emptyList();
private void ensureFailoverIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
failover_ = new java.util.ArrayList(failover_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.FailoverOrBuilder> failoverBuilder_;
/**
*
* 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 java.util.List getFailoverList() {
if (failoverBuilder_ == null) {
return java.util.Collections.unmodifiableList(failover_);
} else {
return failoverBuilder_.getMessageList();
}
}
/**
*
* 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.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover failover = 2;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover getFailover(int index) {
if (failoverBuilder_ == null) {
return failover_.get(index);
} else {
return failoverBuilder_.getMessage(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 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.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover failover = 2;
*/
public Builder setFailover(
int index, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover.Builder builderForValue) {
if (failoverBuilder_ == null) {
ensureFailoverIsMutable();
failover_.set(index, builderForValue.build());
onChanged();
} else {
failoverBuilder_.setMessage(index, builderForValue.build());
}
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(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.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover failover = 2;
*/
public Builder addFailover(
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover.Builder builderForValue) {
if (failoverBuilder_ == null) {
ensureFailoverIsMutable();
failover_.add(builderForValue.build());
onChanged();
} else {
failoverBuilder_.addMessage(builderForValue.build());
}
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.Builder builderForValue) {
if (failoverBuilder_ == null) {
ensureFailoverIsMutable();
failover_.add(index, builderForValue.build());
onChanged();
} else {
failoverBuilder_.addMessage(index, builderForValue.build());
}
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 addAllFailover(
java.lang.Iterable extends istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover> values) {
if (failoverBuilder_ == null) {
ensureFailoverIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, failover_);
onChanged();
} else {
failoverBuilder_.addAllMessages(values);
}
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 clearFailover() {
if (failoverBuilder_ == null) {
failover_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
failoverBuilder_.clear();
}
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 removeFailover(int index) {
if (failoverBuilder_ == null) {
ensureFailoverIsMutable();
failover_.remove(index);
onChanged();
} else {
failoverBuilder_.remove(index);
}
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 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.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover failover = 2;
*/
public java.util.List extends istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.FailoverOrBuilder>
getFailoverOrBuilderList() {
if (failoverBuilder_ != null) {
return failoverBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(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.
*
*
* repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover failover = 2;
*/
public istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover.Builder addFailoverBuilder() {
return getFailoverFieldBuilder().addBuilder(
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover.getDefaultInstance());
}
/**
*
* 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 addFailoverBuilder(
int index) {
return getFailoverFieldBuilder().addBuilder(
index, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover.getDefaultInstance());
}
/**
*
* 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 java.util.List
getFailoverBuilderList() {
return getFailoverFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.FailoverOrBuilder>
getFailoverFieldBuilder() {
if (failoverBuilder_ == null) {
failoverBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover.Builder, istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting.FailoverOrBuilder>(
failover_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
failover_ = null;
}
return failoverBuilder_;
}
private com.google.protobuf.BoolValue enabled_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> enabledBuilder_;
/**
*
* 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;
* @return Whether the enabled field is set.
*/
public boolean hasEnabled() {
return enabledBuilder_ != null || enabled_ != null;
}
/**
*
* 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;
* @return The enabled.
*/
public com.google.protobuf.BoolValue getEnabled() {
if (enabledBuilder_ == null) {
return enabled_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enabled_;
} else {
return enabledBuilder_.getMessage();
}
}
/**
*
* 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.
*
*
* .google.protobuf.BoolValue enabled = 3;
*/
public Builder setEnabled(
com.google.protobuf.BoolValue.Builder builderForValue) {
if (enabledBuilder_ == null) {
enabled_ = builderForValue.build();
onChanged();
} else {
enabledBuilder_.setMessage(builderForValue.build());
}
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.
*
*
* .google.protobuf.BoolValue enabled = 3;
*/
public Builder mergeEnabled(com.google.protobuf.BoolValue value) {
if (enabledBuilder_ == null) {
if (enabled_ != null) {
enabled_ =
com.google.protobuf.BoolValue.newBuilder(enabled_).mergeFrom(value).buildPartial();
} else {
enabled_ = value;
}
onChanged();
} else {
enabledBuilder_.mergeFrom(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.
*
*
* .google.protobuf.BoolValue enabled = 3;
*/
public Builder clearEnabled() {
if (enabledBuilder_ == null) {
enabled_ = null;
onChanged();
} else {
enabled_ = null;
enabledBuilder_ = null;
}
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.
*
*
* .google.protobuf.BoolValue enabled = 3;
*/
public com.google.protobuf.BoolValue.Builder getEnabledBuilder() {
onChanged();
return getEnabledFieldBuilder().getBuilder();
}
/**
*
* 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() {
if (enabledBuilder_ != null) {
return enabledBuilder_.getMessageOrBuilder();
} else {
return enabled_ == null ?
com.google.protobuf.BoolValue.getDefaultInstance() : 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.
*
*
* .google.protobuf.BoolValue enabled = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>
getEnabledFieldBuilder() {
if (enabledBuilder_ == null) {
enabledBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>(
getEnabled(),
getParentForChildren(),
isClean());
enabled_ = null;
}
return enabledBuilder_;
}
@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)
}
// @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.LocalityLoadBalancerSetting)
private static final istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting();
}
public static istio.networking.v1alpha3.DestinationRuleOuterClass.LocalityLoadBalancerSetting getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LocalityLoadBalancerSetting parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LocalityLoadBalancerSetting(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 getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_istio_networking_v1alpha3_DestinationRule_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_istio_networking_v1alpha3_DestinationRule_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_istio_networking_v1alpha3_TrafficPolicy_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_istio_networking_v1alpha3_TrafficPolicy_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_istio_networking_v1alpha3_TrafficPolicy_PortTrafficPolicy_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_istio_networking_v1alpha3_TrafficPolicy_PortTrafficPolicy_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_istio_networking_v1alpha3_Subset_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_istio_networking_v1alpha3_Subset_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_istio_networking_v1alpha3_Subset_LabelsEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_istio_networking_v1alpha3_Subset_LabelsEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_istio_networking_v1alpha3_LoadBalancerSettings_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_istio_networking_v1alpha3_LoadBalancerSettings_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_istio_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_istio_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_istio_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_HTTPCookie_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_istio_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_HTTPCookie_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_TCPSettings_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_TCPSettings_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_TCPSettings_TcpKeepalive_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_TCPSettings_TcpKeepalive_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_HTTPSettings_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_HTTPSettings_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_istio_networking_v1alpha3_OutlierDetection_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_istio_networking_v1alpha3_OutlierDetection_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_istio_networking_v1alpha3_ClientTLSSettings_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_istio_networking_v1alpha3_ClientTLSSettings_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Distribute_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Distribute_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Distribute_ToEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Distribute_ToEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Failover_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Failover_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n*networking/v1alpha3/destination_rule.p" +
"roto\022\031istio.networking.v1alpha3\032\037google/" +
"api/field_behavior.proto\032\036google/protobu" +
"f/duration.proto\032\036google/protobuf/wrappe" +
"rs.proto\032)networking/v1alpha3/virtual_se" +
"rvice.proto\032\024gogoproto/gogo.proto\"\255\001\n\017De" +
"stinationRule\022\021\n\004host\030\001 \001(\tB\003\340A\002\022@\n\016traf" +
"fic_policy\030\002 \001(\0132(.istio.networking.v1al" +
"pha3.TrafficPolicy\0222\n\007subsets\030\003 \003(\0132!.is" +
"tio.networking.v1alpha3.Subset\022\021\n\texport" +
"_to\030\004 \003(\t\"\343\005\n\rTrafficPolicy\022F\n\rload_bala" +
"ncer\030\001 \001(\0132/.istio.networking.v1alpha3.L" +
"oadBalancerSettings\022J\n\017connection_pool\030\002" +
" \001(\01321.istio.networking.v1alpha3.Connect" +
"ionPoolSettings\022F\n\021outlier_detection\030\003 \001" +
"(\0132+.istio.networking.v1alpha3.OutlierDe" +
"tection\0229\n\003tls\030\004 \001(\0132,.istio.networking." +
"v1alpha3.ClientTLSSettings\022W\n\023port_level" +
"_settings\030\005 \003(\0132:.istio.networking.v1alp" +
"ha3.TrafficPolicy.PortTrafficPolicy\032\341\002\n\021" +
"PortTrafficPolicy\0225\n\004port\030\001 \001(\0132\'.istio." +
"networking.v1alpha3.PortSelector\022F\n\rload" +
"_balancer\030\002 \001(\0132/.istio.networking.v1alp" +
"ha3.LoadBalancerSettings\022J\n\017connection_p" +
"ool\030\003 \001(\01321.istio.networking.v1alpha3.Co" +
"nnectionPoolSettings\022F\n\021outlier_detectio" +
"n\030\004 \001(\0132+.istio.networking.v1alpha3.Outl" +
"ierDetection\0229\n\003tls\030\005 \001(\0132,.istio.networ" +
"king.v1alpha3.ClientTLSSettings\"\313\001\n\006Subs" +
"et\022\021\n\004name\030\001 \001(\tB\003\340A\002\022=\n\006labels\030\002 \003(\0132-." +
"istio.networking.v1alpha3.Subset.LabelsE" +
"ntry\022@\n\016traffic_policy\030\003 \001(\0132(.istio.net" +
"working.v1alpha3.TrafficPolicy\032-\n\013Labels" +
"Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\301\005" +
"\n\024LoadBalancerSettings\022J\n\006simple\030\001 \001(\01628" +
".istio.networking.v1alpha3.LoadBalancerS" +
"ettings.SimpleLBH\000\022[\n\017consistent_hash\030\002 " +
"\001(\[email protected]" +
"ncerSettings.ConsistentHashLBH\000\022S\n\023local" +
"ity_lb_setting\030\003 \001(\01326.istio.networking." +
"v1alpha3.LocalityLoadBalancerSetting\032\323\002\n" +
"\020ConsistentHashLB\022\032\n\020http_header_name\030\001 " +
"\001(\tH\000\022b\n\013http_cookie\030\002 \001(\0132K.istio.netwo" +
"rking.v1alpha3.LoadBalancerSettings.Cons" +
"istentHashLB.HTTPCookieH\000\022\027\n\ruse_source_" +
"ip\030\003 \001(\010H\000\022#\n\031http_query_parameter_name\030" +
"\005 \001(\tH\000\022\031\n\021minimum_ring_size\030\004 \001(\004\032Z\n\nHT" +
"TPCookie\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\014\n\004path\030\002 \001(" +
"\t\022+\n\003ttl\030\003 \001(\0132\031.google.protobuf.Duratio" +
"nB\003\340A\002B\n\n\010hash_key\"H\n\010SimpleLB\022\017\n\013ROUND_" +
"ROBIN\020\000\022\016\n\nLEAST_CONN\020\001\022\n\n\006RANDOM\020\002\022\017\n\013P" +
"ASSTHROUGH\020\003B\013\n\tlb_policy\"\355\006\n\026Connection" +
"PoolSettings\022J\n\003tcp\030\001 \001(\0132=.istio.networ" +
"king.v1alpha3.ConnectionPoolSettings.TCP" +
"Settings\022L\n\004http\030\002 \001(\0132>.istio.networkin" +
"g.v1alpha3.ConnectionPoolSettings.HTTPSe" +
"ttings\032\263\002\n\013TCPSettings\022\027\n\017max_connection" +
"s\030\001 \001(\005\0222\n\017connect_timeout\030\002 \001(\0132\031.googl" +
"e.protobuf.Duration\022a\n\rtcp_keepalive\030\003 \001" +
"(\0132J.istio.networking.v1alpha3.Connectio" +
"nPoolSettings.TCPSettings.TcpKeepalive\032t" +
"\n\014TcpKeepalive\022\016\n\006probes\030\001 \001(\r\022\'\n\004time\030\002" +
" \001(\0132\031.google.protobuf.Duration\022+\n\010inter" +
"val\030\003 \001(\0132\031.google.protobuf.Duration\032\202\003\n" +
"\014HTTPSettings\022\"\n\032http1_max_pending_reque" +
"sts\030\001 \001(\005\022\032\n\022http2_max_requests\030\002 \001(\005\022#\n" +
"\033max_requests_per_connection\030\003 \001(\005\022\023\n\013ma" +
"x_retries\030\004 \001(\005\022/\n\014idle_timeout\030\005 \001(\0132\031." +
"google.protobuf.Duration\022i\n\021h2_upgrade_p" +
"olicy\030\006 \001(\0162N.istio.networking.v1alpha3." +
"ConnectionPoolSettings.HTTPSettings.H2Up" +
"gradePolicy\022\033\n\023use_client_protocol\030\007 \001(\010" +
"\"?\n\017H2UpgradePolicy\022\013\n\007DEFAULT\020\000\022\022\n\016DO_N" +
"OT_UPGRADE\020\001\022\013\n\007UPGRADE\020\002\"\320\002\n\020OutlierDet" +
"ection\022\036\n\022consecutive_errors\030\001 \001(\005B\002\030\001\022@" +
"\n\032consecutive_gateway_errors\030\006 \001(\0132\034.goo" +
"gle.protobuf.UInt32Value\022<\n\026consecutive_" +
"5xx_errors\030\007 \001(\0132\034.google.protobuf.UInt3" +
"2Value\022+\n\010interval\030\002 \001(\0132\031.google.protob" +
"uf.Duration\0225\n\022base_ejection_time\030\003 \001(\0132" +
"\031.google.protobuf.Duration\022\034\n\024max_ejecti" +
"on_percent\030\004 \001(\005\022\032\n\022min_health_percent\030\005" +
" \001(\005\"\251\002\n\021ClientTLSSettings\022G\n\004mode\030\001 \001(\016" +
"24.istio.networking.v1alpha3.ClientTLSSe" +
"ttings.TLSmodeB\003\340A\002\022\032\n\022client_certificat" +
"e\030\002 \001(\t\022\023\n\013private_key\030\003 \001(\t\022\027\n\017ca_certi" +
"ficates\030\004 \001(\t\022\027\n\017credential_name\030\007 \001(\t\022\031" +
"\n\021subject_alt_names\030\005 \003(\t\022\013\n\003sni\030\006 \001(\t\"@" +
"\n\007TLSmode\022\013\n\007DISABLE\020\000\022\n\n\006SIMPLE\020\001\022\n\n\006MU" +
"TUAL\020\002\022\020\n\014ISTIO_MUTUAL\020\003\"\271\003\n\033LocalityLoa" +
"dBalancerSetting\022U\n\ndistribute\030\001 \003(\0132A.i" +
"stio.networking.v1alpha3.LocalityLoadBal" +
"ancerSetting.Distribute\022Q\n\010failover\030\002 \003(" +
"\0132?.istio.networking.v1alpha3.LocalityLo" +
"adBalancerSetting.Failover\022+\n\007enabled\030\003 " +
"\001(\0132\032.google.protobuf.BoolValue\032\234\001\n\nDist" +
"ribute\022\014\n\004from\030\001 \001(\t\022U\n\002to\030\002 \003(\0132I.istio" +
".networking.v1alpha3.LocalityLoadBalance" +
"rSetting.Distribute.ToEntry\032)\n\007ToEntry\022\013" +
"\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\r:\0028\001\032$\n\010Failov" +
"er\022\014\n\004from\030\001 \001(\t\022\n\n\002to\030\002 \001(\tB\"Z istio.io" +
"/api/networking/v1alpha3b\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.api.FieldBehaviorProto.getDescriptor(),
com.google.protobuf.DurationProto.getDescriptor(),
com.google.protobuf.WrappersProto.getDescriptor(),
istio.networking.v1alpha3.VirtualServiceOuterClass.getDescriptor(),
com.google.protobuf.GoGoProtos.getDescriptor(),
});
internal_static_istio_networking_v1alpha3_DestinationRule_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_istio_networking_v1alpha3_DestinationRule_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_istio_networking_v1alpha3_DestinationRule_descriptor,
new java.lang.String[] { "Host", "TrafficPolicy", "Subsets", "ExportTo", });
internal_static_istio_networking_v1alpha3_TrafficPolicy_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_istio_networking_v1alpha3_TrafficPolicy_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_istio_networking_v1alpha3_TrafficPolicy_descriptor,
new java.lang.String[] { "LoadBalancer", "ConnectionPool", "OutlierDetection", "Tls", "PortLevelSettings", });
internal_static_istio_networking_v1alpha3_TrafficPolicy_PortTrafficPolicy_descriptor =
internal_static_istio_networking_v1alpha3_TrafficPolicy_descriptor.getNestedTypes().get(0);
internal_static_istio_networking_v1alpha3_TrafficPolicy_PortTrafficPolicy_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_istio_networking_v1alpha3_TrafficPolicy_PortTrafficPolicy_descriptor,
new java.lang.String[] { "Port", "LoadBalancer", "ConnectionPool", "OutlierDetection", "Tls", });
internal_static_istio_networking_v1alpha3_Subset_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_istio_networking_v1alpha3_Subset_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_istio_networking_v1alpha3_Subset_descriptor,
new java.lang.String[] { "Name", "Labels", "TrafficPolicy", });
internal_static_istio_networking_v1alpha3_Subset_LabelsEntry_descriptor =
internal_static_istio_networking_v1alpha3_Subset_descriptor.getNestedTypes().get(0);
internal_static_istio_networking_v1alpha3_Subset_LabelsEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_istio_networking_v1alpha3_Subset_LabelsEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_istio_networking_v1alpha3_LoadBalancerSettings_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_istio_networking_v1alpha3_LoadBalancerSettings_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_istio_networking_v1alpha3_LoadBalancerSettings_descriptor,
new java.lang.String[] { "Simple", "ConsistentHash", "LocalityLbSetting", "LbPolicy", });
internal_static_istio_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_descriptor =
internal_static_istio_networking_v1alpha3_LoadBalancerSettings_descriptor.getNestedTypes().get(0);
internal_static_istio_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_istio_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_descriptor,
new java.lang.String[] { "HttpHeaderName", "HttpCookie", "UseSourceIp", "HttpQueryParameterName", "MinimumRingSize", "HashKey", });
internal_static_istio_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_HTTPCookie_descriptor =
internal_static_istio_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_descriptor.getNestedTypes().get(0);
internal_static_istio_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_HTTPCookie_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_istio_networking_v1alpha3_LoadBalancerSettings_ConsistentHashLB_HTTPCookie_descriptor,
new java.lang.String[] { "Name", "Path", "Ttl", });
internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_descriptor,
new java.lang.String[] { "Tcp", "Http", });
internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_TCPSettings_descriptor =
internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_descriptor.getNestedTypes().get(0);
internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_TCPSettings_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_TCPSettings_descriptor,
new java.lang.String[] { "MaxConnections", "ConnectTimeout", "TcpKeepalive", });
internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_TCPSettings_TcpKeepalive_descriptor =
internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_TCPSettings_descriptor.getNestedTypes().get(0);
internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_TCPSettings_TcpKeepalive_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_TCPSettings_TcpKeepalive_descriptor,
new java.lang.String[] { "Probes", "Time", "Interval", });
internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_HTTPSettings_descriptor =
internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_descriptor.getNestedTypes().get(1);
internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_HTTPSettings_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_istio_networking_v1alpha3_ConnectionPoolSettings_HTTPSettings_descriptor,
new java.lang.String[] { "Http1MaxPendingRequests", "Http2MaxRequests", "MaxRequestsPerConnection", "MaxRetries", "IdleTimeout", "H2UpgradePolicy", "UseClientProtocol", });
internal_static_istio_networking_v1alpha3_OutlierDetection_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_istio_networking_v1alpha3_OutlierDetection_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_istio_networking_v1alpha3_OutlierDetection_descriptor,
new java.lang.String[] { "ConsecutiveErrors", "ConsecutiveGatewayErrors", "Consecutive5XxErrors", "Interval", "BaseEjectionTime", "MaxEjectionPercent", "MinHealthPercent", });
internal_static_istio_networking_v1alpha3_ClientTLSSettings_descriptor =
getDescriptor().getMessageTypes().get(6);
internal_static_istio_networking_v1alpha3_ClientTLSSettings_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_istio_networking_v1alpha3_ClientTLSSettings_descriptor,
new java.lang.String[] { "Mode", "ClientCertificate", "PrivateKey", "CaCertificates", "CredentialName", "SubjectAltNames", "Sni", });
internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_descriptor =
getDescriptor().getMessageTypes().get(7);
internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_descriptor,
new java.lang.String[] { "Distribute", "Failover", "Enabled", });
internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Distribute_descriptor =
internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_descriptor.getNestedTypes().get(0);
internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Distribute_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Distribute_descriptor,
new java.lang.String[] { "From", "To", });
internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Distribute_ToEntry_descriptor =
internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Distribute_descriptor.getNestedTypes().get(0);
internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Distribute_ToEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Distribute_ToEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Failover_descriptor =
internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_descriptor.getNestedTypes().get(1);
internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Failover_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_istio_networking_v1alpha3_LocalityLoadBalancerSetting_Failover_descriptor,
new java.lang.String[] { "From", "To", });
com.google.protobuf.ExtensionRegistry registry =
com.google.protobuf.ExtensionRegistry.newInstance();
registry.add(com.google.api.FieldBehaviorProto.fieldBehavior);
com.google.protobuf.Descriptors.FileDescriptor
.internalUpdateFileDescriptor(descriptor, registry);
com.google.api.FieldBehaviorProto.getDescriptor();
com.google.protobuf.DurationProto.getDescriptor();
com.google.protobuf.WrappersProto.getDescriptor();
istio.networking.v1alpha3.VirtualServiceOuterClass.getDescriptor();
com.google.protobuf.GoGoProtos.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy