![JAR search and dependency download from the Maven repository](/logo.png)
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/config/endpoint/v3/endpoint.proto
// Protobuf Java Version: 3.25.5
package io.envoyproxy.envoy.config.endpoint.v3;
/**
*
* Each route from RDS will map to a single cluster or traffic split across
* clusters using weights expressed in the RDS WeightedCluster.
*
* With EDS, each cluster is treated independently from a LB perspective, with
* LB taking place between the Localities within a cluster and at a finer
* granularity between the hosts within a locality. The percentage of traffic
* for each endpoint is determined by both its load_balancing_weight, and the
* load_balancing_weight of its locality. First, a locality will be selected,
* then an endpoint within that locality will be chose based on its weight.
* [#next-free-field: 6]
*
*
* Protobuf type {@code envoy.config.endpoint.v3.ClusterLoadAssignment}
*/
public final class ClusterLoadAssignment extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.endpoint.v3.ClusterLoadAssignment)
ClusterLoadAssignmentOrBuilder {
private static final long serialVersionUID = 0L;
// Use ClusterLoadAssignment.newBuilder() to construct.
private ClusterLoadAssignment(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ClusterLoadAssignment() {
clusterName_ = "";
endpoints_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ClusterLoadAssignment();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointProto.internal_static_envoy_config_endpoint_v3_ClusterLoadAssignment_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 5:
return internalGetNamedEndpoints();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointProto.internal_static_envoy_config_endpoint_v3_ClusterLoadAssignment_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.class, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Builder.class);
}
public interface PolicyOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.endpoint.v3.ClusterLoadAssignment.Policy)
com.google.protobuf.MessageOrBuilder {
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
java.util.List
getDropOverloadsList();
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload getDropOverloads(int index);
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
int getDropOverloadsCount();
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
java.util.List extends io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverloadOrBuilder>
getDropOverloadsOrBuilderList();
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverloadOrBuilder getDropOverloadsOrBuilder(
int index);
/**
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
*
* .. code-block:: json
*
* { "overprovisioning_factor": 100 }
*
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* .google.protobuf.UInt32Value overprovisioning_factor = 3 [(.validate.rules) = { ... }
* @return Whether the overprovisioningFactor field is set.
*/
boolean hasOverprovisioningFactor();
/**
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
*
* .. code-block:: json
*
* { "overprovisioning_factor": 100 }
*
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* .google.protobuf.UInt32Value overprovisioning_factor = 3 [(.validate.rules) = { ... }
* @return The overprovisioningFactor.
*/
com.google.protobuf.UInt32Value getOverprovisioningFactor();
/**
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
*
* .. code-block:: json
*
* { "overprovisioning_factor": 100 }
*
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* .google.protobuf.UInt32Value overprovisioning_factor = 3 [(.validate.rules) = { ... }
*/
com.google.protobuf.UInt32ValueOrBuilder getOverprovisioningFactorOrBuilder();
/**
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
*
* .google.protobuf.Duration endpoint_stale_after = 4 [(.validate.rules) = { ... }
* @return Whether the endpointStaleAfter field is set.
*/
boolean hasEndpointStaleAfter();
/**
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
*
* .google.protobuf.Duration endpoint_stale_after = 4 [(.validate.rules) = { ... }
* @return The endpointStaleAfter.
*/
com.google.protobuf.Duration getEndpointStaleAfter();
/**
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
*
* .google.protobuf.Duration endpoint_stale_after = 4 [(.validate.rules) = { ... }
*/
com.google.protobuf.DurationOrBuilder getEndpointStaleAfterOrBuilder();
/**
*
* If true, use the :ref:`load balancing weight
* <envoy_v3_api_field_config.endpoint.v3.LbEndpoint.load_balancing_weight>` of healthy and unhealthy
* hosts to determine the health of the priority level. If false, use the number of healthy and unhealthy hosts
* to determine the health of the priority level, or in other words assume each host has a weight of 1 for
* this calculation.
*
* Note: this is not currently implemented for
* :ref:`locality weighted load balancing <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* bool weighted_priority_health = 6;
* @return The weightedPriorityHealth.
*/
boolean getWeightedPriorityHealth();
}
/**
*
* Load balancing policy settings.
* [#next-free-field: 7]
*
*
* Protobuf type {@code envoy.config.endpoint.v3.ClusterLoadAssignment.Policy}
*/
public static final class Policy extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.endpoint.v3.ClusterLoadAssignment.Policy)
PolicyOrBuilder {
private static final long serialVersionUID = 0L;
// Use Policy.newBuilder() to construct.
private Policy(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Policy() {
dropOverloads_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Policy();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointProto.internal_static_envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointProto.internal_static_envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.class, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.Builder.class);
}
public interface DropOverloadOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload)
com.google.protobuf.MessageOrBuilder {
/**
*
* Identifier for the policy specifying the drop.
*
*
* string category = 1 [(.validate.rules) = { ... }
* @return The category.
*/
java.lang.String getCategory();
/**
*
* Identifier for the policy specifying the drop.
*
*
* string category = 1 [(.validate.rules) = { ... }
* @return The bytes for category.
*/
com.google.protobuf.ByteString
getCategoryBytes();
/**
*
* Percentage of traffic that should be dropped for the category.
*
*
* .envoy.type.v3.FractionalPercent drop_percentage = 2;
* @return Whether the dropPercentage field is set.
*/
boolean hasDropPercentage();
/**
*
* Percentage of traffic that should be dropped for the category.
*
*
* .envoy.type.v3.FractionalPercent drop_percentage = 2;
* @return The dropPercentage.
*/
io.envoyproxy.envoy.type.v3.FractionalPercent getDropPercentage();
/**
*
* Percentage of traffic that should be dropped for the category.
*
*
* .envoy.type.v3.FractionalPercent drop_percentage = 2;
*/
io.envoyproxy.envoy.type.v3.FractionalPercentOrBuilder getDropPercentageOrBuilder();
}
/**
* Protobuf type {@code envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload}
*/
public static final class DropOverload extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload)
DropOverloadOrBuilder {
private static final long serialVersionUID = 0L;
// Use DropOverload.newBuilder() to construct.
private DropOverload(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DropOverload() {
category_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DropOverload();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointProto.internal_static_envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointProto.internal_static_envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload.class, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload.Builder.class);
}
private int bitField0_;
public static final int CATEGORY_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object category_ = "";
/**
*
* Identifier for the policy specifying the drop.
*
*
* string category = 1 [(.validate.rules) = { ... }
* @return The category.
*/
@java.lang.Override
public java.lang.String getCategory() {
java.lang.Object ref = category_;
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();
category_ = s;
return s;
}
}
/**
*
* Identifier for the policy specifying the drop.
*
*
* string category = 1 [(.validate.rules) = { ... }
* @return The bytes for category.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getCategoryBytes() {
java.lang.Object ref = category_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
category_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DROP_PERCENTAGE_FIELD_NUMBER = 2;
private io.envoyproxy.envoy.type.v3.FractionalPercent dropPercentage_;
/**
*
* Percentage of traffic that should be dropped for the category.
*
*
* .envoy.type.v3.FractionalPercent drop_percentage = 2;
* @return Whether the dropPercentage field is set.
*/
@java.lang.Override
public boolean hasDropPercentage() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Percentage of traffic that should be dropped for the category.
*
*
* .envoy.type.v3.FractionalPercent drop_percentage = 2;
* @return The dropPercentage.
*/
@java.lang.Override
public io.envoyproxy.envoy.type.v3.FractionalPercent getDropPercentage() {
return dropPercentage_ == null ? io.envoyproxy.envoy.type.v3.FractionalPercent.getDefaultInstance() : dropPercentage_;
}
/**
*
* Percentage of traffic that should be dropped for the category.
*
*
* .envoy.type.v3.FractionalPercent drop_percentage = 2;
*/
@java.lang.Override
public io.envoyproxy.envoy.type.v3.FractionalPercentOrBuilder getDropPercentageOrBuilder() {
return dropPercentage_ == null ? io.envoyproxy.envoy.type.v3.FractionalPercent.getDefaultInstance() : dropPercentage_;
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(category_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, category_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getDropPercentage());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(category_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, category_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getDropPercentage());
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload other = (io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload) obj;
if (!getCategory()
.equals(other.getCategory())) return false;
if (hasDropPercentage() != other.hasDropPercentage()) return false;
if (hasDropPercentage()) {
if (!getDropPercentage()
.equals(other.getDropPercentage())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) 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) + CATEGORY_FIELD_NUMBER;
hash = (53 * hash) + getCategory().hashCode();
if (hasDropPercentage()) {
hash = (37 * hash) + DROP_PERCENTAGE_FIELD_NUMBER;
hash = (53 * hash) + getDropPercentage().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload 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 io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload 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 io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload 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(io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload 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;
}
/**
* Protobuf type {@code envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload)
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverloadOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointProto.internal_static_envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointProto.internal_static_envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload.class, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getDropPercentageFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
category_ = "";
dropPercentage_ = null;
if (dropPercentageBuilder_ != null) {
dropPercentageBuilder_.dispose();
dropPercentageBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointProto.internal_static_envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload build() {
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload buildPartial() {
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload result = new io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.category_ = category_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.dropPercentage_ = dropPercentageBuilder_ == null
? dropPercentage_
: dropPercentageBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@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 io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload) {
return mergeFrom((io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload other) {
if (other == io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload.getDefaultInstance()) return this;
if (!other.getCategory().isEmpty()) {
category_ = other.category_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasDropPercentage()) {
mergeDropPercentage(other.getDropPercentage());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
category_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
input.readMessage(
getDropPercentageFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object category_ = "";
/**
*
* Identifier for the policy specifying the drop.
*
*
* string category = 1 [(.validate.rules) = { ... }
* @return The category.
*/
public java.lang.String getCategory() {
java.lang.Object ref = category_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
category_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Identifier for the policy specifying the drop.
*
*
* string category = 1 [(.validate.rules) = { ... }
* @return The bytes for category.
*/
public com.google.protobuf.ByteString
getCategoryBytes() {
java.lang.Object ref = category_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
category_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Identifier for the policy specifying the drop.
*
*
* string category = 1 [(.validate.rules) = { ... }
* @param value The category to set.
* @return This builder for chaining.
*/
public Builder setCategory(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
category_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Identifier for the policy specifying the drop.
*
*
* string category = 1 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearCategory() {
category_ = getDefaultInstance().getCategory();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Identifier for the policy specifying the drop.
*
*
* string category = 1 [(.validate.rules) = { ... }
* @param value The bytes for category to set.
* @return This builder for chaining.
*/
public Builder setCategoryBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
category_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private io.envoyproxy.envoy.type.v3.FractionalPercent dropPercentage_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.type.v3.FractionalPercent, io.envoyproxy.envoy.type.v3.FractionalPercent.Builder, io.envoyproxy.envoy.type.v3.FractionalPercentOrBuilder> dropPercentageBuilder_;
/**
*
* Percentage of traffic that should be dropped for the category.
*
*
* .envoy.type.v3.FractionalPercent drop_percentage = 2;
* @return Whether the dropPercentage field is set.
*/
public boolean hasDropPercentage() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Percentage of traffic that should be dropped for the category.
*
*
* .envoy.type.v3.FractionalPercent drop_percentage = 2;
* @return The dropPercentage.
*/
public io.envoyproxy.envoy.type.v3.FractionalPercent getDropPercentage() {
if (dropPercentageBuilder_ == null) {
return dropPercentage_ == null ? io.envoyproxy.envoy.type.v3.FractionalPercent.getDefaultInstance() : dropPercentage_;
} else {
return dropPercentageBuilder_.getMessage();
}
}
/**
*
* Percentage of traffic that should be dropped for the category.
*
*
* .envoy.type.v3.FractionalPercent drop_percentage = 2;
*/
public Builder setDropPercentage(io.envoyproxy.envoy.type.v3.FractionalPercent value) {
if (dropPercentageBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
dropPercentage_ = value;
} else {
dropPercentageBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Percentage of traffic that should be dropped for the category.
*
*
* .envoy.type.v3.FractionalPercent drop_percentage = 2;
*/
public Builder setDropPercentage(
io.envoyproxy.envoy.type.v3.FractionalPercent.Builder builderForValue) {
if (dropPercentageBuilder_ == null) {
dropPercentage_ = builderForValue.build();
} else {
dropPercentageBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Percentage of traffic that should be dropped for the category.
*
*
* .envoy.type.v3.FractionalPercent drop_percentage = 2;
*/
public Builder mergeDropPercentage(io.envoyproxy.envoy.type.v3.FractionalPercent value) {
if (dropPercentageBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
dropPercentage_ != null &&
dropPercentage_ != io.envoyproxy.envoy.type.v3.FractionalPercent.getDefaultInstance()) {
getDropPercentageBuilder().mergeFrom(value);
} else {
dropPercentage_ = value;
}
} else {
dropPercentageBuilder_.mergeFrom(value);
}
if (dropPercentage_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
* Percentage of traffic that should be dropped for the category.
*
*
* .envoy.type.v3.FractionalPercent drop_percentage = 2;
*/
public Builder clearDropPercentage() {
bitField0_ = (bitField0_ & ~0x00000002);
dropPercentage_ = null;
if (dropPercentageBuilder_ != null) {
dropPercentageBuilder_.dispose();
dropPercentageBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Percentage of traffic that should be dropped for the category.
*
*
* .envoy.type.v3.FractionalPercent drop_percentage = 2;
*/
public io.envoyproxy.envoy.type.v3.FractionalPercent.Builder getDropPercentageBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getDropPercentageFieldBuilder().getBuilder();
}
/**
*
* Percentage of traffic that should be dropped for the category.
*
*
* .envoy.type.v3.FractionalPercent drop_percentage = 2;
*/
public io.envoyproxy.envoy.type.v3.FractionalPercentOrBuilder getDropPercentageOrBuilder() {
if (dropPercentageBuilder_ != null) {
return dropPercentageBuilder_.getMessageOrBuilder();
} else {
return dropPercentage_ == null ?
io.envoyproxy.envoy.type.v3.FractionalPercent.getDefaultInstance() : dropPercentage_;
}
}
/**
*
* Percentage of traffic that should be dropped for the category.
*
*
* .envoy.type.v3.FractionalPercent drop_percentage = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.type.v3.FractionalPercent, io.envoyproxy.envoy.type.v3.FractionalPercent.Builder, io.envoyproxy.envoy.type.v3.FractionalPercentOrBuilder>
getDropPercentageFieldBuilder() {
if (dropPercentageBuilder_ == null) {
dropPercentageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.type.v3.FractionalPercent, io.envoyproxy.envoy.type.v3.FractionalPercent.Builder, io.envoyproxy.envoy.type.v3.FractionalPercentOrBuilder>(
getDropPercentage(),
getParentForChildren(),
isClean());
dropPercentage_ = null;
}
return dropPercentageBuilder_;
}
@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:envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload)
}
// @@protoc_insertion_point(class_scope:envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload)
private static final io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload();
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DropOverload parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int DROP_OVERLOADS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List dropOverloads_;
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
@java.lang.Override
public java.util.List getDropOverloadsList() {
return dropOverloads_;
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
@java.lang.Override
public java.util.List extends io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverloadOrBuilder>
getDropOverloadsOrBuilderList() {
return dropOverloads_;
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
@java.lang.Override
public int getDropOverloadsCount() {
return dropOverloads_.size();
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload getDropOverloads(int index) {
return dropOverloads_.get(index);
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverloadOrBuilder getDropOverloadsOrBuilder(
int index) {
return dropOverloads_.get(index);
}
public static final int OVERPROVISIONING_FACTOR_FIELD_NUMBER = 3;
private com.google.protobuf.UInt32Value overprovisioningFactor_;
/**
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
*
* .. code-block:: json
*
* { "overprovisioning_factor": 100 }
*
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* .google.protobuf.UInt32Value overprovisioning_factor = 3 [(.validate.rules) = { ... }
* @return Whether the overprovisioningFactor field is set.
*/
@java.lang.Override
public boolean hasOverprovisioningFactor() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
*
* .. code-block:: json
*
* { "overprovisioning_factor": 100 }
*
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* .google.protobuf.UInt32Value overprovisioning_factor = 3 [(.validate.rules) = { ... }
* @return The overprovisioningFactor.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getOverprovisioningFactor() {
return overprovisioningFactor_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : overprovisioningFactor_;
}
/**
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
*
* .. code-block:: json
*
* { "overprovisioning_factor": 100 }
*
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* .google.protobuf.UInt32Value overprovisioning_factor = 3 [(.validate.rules) = { ... }
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getOverprovisioningFactorOrBuilder() {
return overprovisioningFactor_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : overprovisioningFactor_;
}
public static final int ENDPOINT_STALE_AFTER_FIELD_NUMBER = 4;
private com.google.protobuf.Duration endpointStaleAfter_;
/**
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
*
* .google.protobuf.Duration endpoint_stale_after = 4 [(.validate.rules) = { ... }
* @return Whether the endpointStaleAfter field is set.
*/
@java.lang.Override
public boolean hasEndpointStaleAfter() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
*
* .google.protobuf.Duration endpoint_stale_after = 4 [(.validate.rules) = { ... }
* @return The endpointStaleAfter.
*/
@java.lang.Override
public com.google.protobuf.Duration getEndpointStaleAfter() {
return endpointStaleAfter_ == null ? com.google.protobuf.Duration.getDefaultInstance() : endpointStaleAfter_;
}
/**
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
*
* .google.protobuf.Duration endpoint_stale_after = 4 [(.validate.rules) = { ... }
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getEndpointStaleAfterOrBuilder() {
return endpointStaleAfter_ == null ? com.google.protobuf.Duration.getDefaultInstance() : endpointStaleAfter_;
}
public static final int WEIGHTED_PRIORITY_HEALTH_FIELD_NUMBER = 6;
private boolean weightedPriorityHealth_ = false;
/**
*
* If true, use the :ref:`load balancing weight
* <envoy_v3_api_field_config.endpoint.v3.LbEndpoint.load_balancing_weight>` of healthy and unhealthy
* hosts to determine the health of the priority level. If false, use the number of healthy and unhealthy hosts
* to determine the health of the priority level, or in other words assume each host has a weight of 1 for
* this calculation.
*
* Note: this is not currently implemented for
* :ref:`locality weighted load balancing <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* bool weighted_priority_health = 6;
* @return The weightedPriorityHealth.
*/
@java.lang.Override
public boolean getWeightedPriorityHealth() {
return weightedPriorityHealth_;
}
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 < dropOverloads_.size(); i++) {
output.writeMessage(2, dropOverloads_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(3, getOverprovisioningFactor());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(4, getEndpointStaleAfter());
}
if (weightedPriorityHealth_ != false) {
output.writeBool(6, weightedPriorityHealth_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < dropOverloads_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, dropOverloads_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getOverprovisioningFactor());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getEndpointStaleAfter());
}
if (weightedPriorityHealth_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, weightedPriorityHealth_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy other = (io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy) obj;
if (!getDropOverloadsList()
.equals(other.getDropOverloadsList())) return false;
if (hasOverprovisioningFactor() != other.hasOverprovisioningFactor()) return false;
if (hasOverprovisioningFactor()) {
if (!getOverprovisioningFactor()
.equals(other.getOverprovisioningFactor())) return false;
}
if (hasEndpointStaleAfter() != other.hasEndpointStaleAfter()) return false;
if (hasEndpointStaleAfter()) {
if (!getEndpointStaleAfter()
.equals(other.getEndpointStaleAfter())) return false;
}
if (getWeightedPriorityHealth()
!= other.getWeightedPriorityHealth()) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getDropOverloadsCount() > 0) {
hash = (37 * hash) + DROP_OVERLOADS_FIELD_NUMBER;
hash = (53 * hash) + getDropOverloadsList().hashCode();
}
if (hasOverprovisioningFactor()) {
hash = (37 * hash) + OVERPROVISIONING_FACTOR_FIELD_NUMBER;
hash = (53 * hash) + getOverprovisioningFactor().hashCode();
}
if (hasEndpointStaleAfter()) {
hash = (37 * hash) + ENDPOINT_STALE_AFTER_FIELD_NUMBER;
hash = (53 * hash) + getEndpointStaleAfter().hashCode();
}
hash = (37 * hash) + WEIGHTED_PRIORITY_HEALTH_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getWeightedPriorityHealth());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy 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 io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy 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 io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy 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(io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy 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 policy settings.
* [#next-free-field: 7]
*
*
* Protobuf type {@code envoy.config.endpoint.v3.ClusterLoadAssignment.Policy}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.endpoint.v3.ClusterLoadAssignment.Policy)
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.PolicyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointProto.internal_static_envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointProto.internal_static_envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.class, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getDropOverloadsFieldBuilder();
getOverprovisioningFactorFieldBuilder();
getEndpointStaleAfterFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (dropOverloadsBuilder_ == null) {
dropOverloads_ = java.util.Collections.emptyList();
} else {
dropOverloads_ = null;
dropOverloadsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
overprovisioningFactor_ = null;
if (overprovisioningFactorBuilder_ != null) {
overprovisioningFactorBuilder_.dispose();
overprovisioningFactorBuilder_ = null;
}
endpointStaleAfter_ = null;
if (endpointStaleAfterBuilder_ != null) {
endpointStaleAfterBuilder_.dispose();
endpointStaleAfterBuilder_ = null;
}
weightedPriorityHealth_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointProto.internal_static_envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy build() {
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy buildPartial() {
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy result = new io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy result) {
if (dropOverloadsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
dropOverloads_ = java.util.Collections.unmodifiableList(dropOverloads_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.dropOverloads_ = dropOverloads_;
} else {
result.dropOverloads_ = dropOverloadsBuilder_.build();
}
}
private void buildPartial0(io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.overprovisioningFactor_ = overprovisioningFactorBuilder_ == null
? overprovisioningFactor_
: overprovisioningFactorBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.endpointStaleAfter_ = endpointStaleAfterBuilder_ == null
? endpointStaleAfter_
: endpointStaleAfterBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.weightedPriorityHealth_ = weightedPriorityHealth_;
}
result.bitField0_ |= to_bitField0_;
}
@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 io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy) {
return mergeFrom((io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy other) {
if (other == io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.getDefaultInstance()) return this;
if (dropOverloadsBuilder_ == null) {
if (!other.dropOverloads_.isEmpty()) {
if (dropOverloads_.isEmpty()) {
dropOverloads_ = other.dropOverloads_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureDropOverloadsIsMutable();
dropOverloads_.addAll(other.dropOverloads_);
}
onChanged();
}
} else {
if (!other.dropOverloads_.isEmpty()) {
if (dropOverloadsBuilder_.isEmpty()) {
dropOverloadsBuilder_.dispose();
dropOverloadsBuilder_ = null;
dropOverloads_ = other.dropOverloads_;
bitField0_ = (bitField0_ & ~0x00000001);
dropOverloadsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getDropOverloadsFieldBuilder() : null;
} else {
dropOverloadsBuilder_.addAllMessages(other.dropOverloads_);
}
}
}
if (other.hasOverprovisioningFactor()) {
mergeOverprovisioningFactor(other.getOverprovisioningFactor());
}
if (other.hasEndpointStaleAfter()) {
mergeEndpointStaleAfter(other.getEndpointStaleAfter());
}
if (other.getWeightedPriorityHealth() != false) {
setWeightedPriorityHealth(other.getWeightedPriorityHealth());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 18: {
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload m =
input.readMessage(
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload.parser(),
extensionRegistry);
if (dropOverloadsBuilder_ == null) {
ensureDropOverloadsIsMutable();
dropOverloads_.add(m);
} else {
dropOverloadsBuilder_.addMessage(m);
}
break;
} // case 18
case 26: {
input.readMessage(
getOverprovisioningFactorFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 26
case 34: {
input.readMessage(
getEndpointStaleAfterFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 34
case 48: {
weightedPriorityHealth_ = input.readBool();
bitField0_ |= 0x00000008;
break;
} // case 48
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.util.List dropOverloads_ =
java.util.Collections.emptyList();
private void ensureDropOverloadsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
dropOverloads_ = new java.util.ArrayList(dropOverloads_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload.Builder, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverloadOrBuilder> dropOverloadsBuilder_;
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
public java.util.List getDropOverloadsList() {
if (dropOverloadsBuilder_ == null) {
return java.util.Collections.unmodifiableList(dropOverloads_);
} else {
return dropOverloadsBuilder_.getMessageList();
}
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
public int getDropOverloadsCount() {
if (dropOverloadsBuilder_ == null) {
return dropOverloads_.size();
} else {
return dropOverloadsBuilder_.getCount();
}
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload getDropOverloads(int index) {
if (dropOverloadsBuilder_ == null) {
return dropOverloads_.get(index);
} else {
return dropOverloadsBuilder_.getMessage(index);
}
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
public Builder setDropOverloads(
int index, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload value) {
if (dropOverloadsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDropOverloadsIsMutable();
dropOverloads_.set(index, value);
onChanged();
} else {
dropOverloadsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
public Builder setDropOverloads(
int index, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload.Builder builderForValue) {
if (dropOverloadsBuilder_ == null) {
ensureDropOverloadsIsMutable();
dropOverloads_.set(index, builderForValue.build());
onChanged();
} else {
dropOverloadsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
public Builder addDropOverloads(io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload value) {
if (dropOverloadsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDropOverloadsIsMutable();
dropOverloads_.add(value);
onChanged();
} else {
dropOverloadsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
public Builder addDropOverloads(
int index, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload value) {
if (dropOverloadsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDropOverloadsIsMutable();
dropOverloads_.add(index, value);
onChanged();
} else {
dropOverloadsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
public Builder addDropOverloads(
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload.Builder builderForValue) {
if (dropOverloadsBuilder_ == null) {
ensureDropOverloadsIsMutable();
dropOverloads_.add(builderForValue.build());
onChanged();
} else {
dropOverloadsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
public Builder addDropOverloads(
int index, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload.Builder builderForValue) {
if (dropOverloadsBuilder_ == null) {
ensureDropOverloadsIsMutable();
dropOverloads_.add(index, builderForValue.build());
onChanged();
} else {
dropOverloadsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
public Builder addAllDropOverloads(
java.lang.Iterable extends io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload> values) {
if (dropOverloadsBuilder_ == null) {
ensureDropOverloadsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, dropOverloads_);
onChanged();
} else {
dropOverloadsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
public Builder clearDropOverloads() {
if (dropOverloadsBuilder_ == null) {
dropOverloads_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
dropOverloadsBuilder_.clear();
}
return this;
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
public Builder removeDropOverloads(int index) {
if (dropOverloadsBuilder_ == null) {
ensureDropOverloadsIsMutable();
dropOverloads_.remove(index);
onChanged();
} else {
dropOverloadsBuilder_.remove(index);
}
return this;
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload.Builder getDropOverloadsBuilder(
int index) {
return getDropOverloadsFieldBuilder().getBuilder(index);
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverloadOrBuilder getDropOverloadsOrBuilder(
int index) {
if (dropOverloadsBuilder_ == null) {
return dropOverloads_.get(index); } else {
return dropOverloadsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
public java.util.List extends io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverloadOrBuilder>
getDropOverloadsOrBuilderList() {
if (dropOverloadsBuilder_ != null) {
return dropOverloadsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(dropOverloads_);
}
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload.Builder addDropOverloadsBuilder() {
return getDropOverloadsFieldBuilder().addBuilder(
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload.getDefaultInstance());
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload.Builder addDropOverloadsBuilder(
int index) {
return getDropOverloadsFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload.getDefaultInstance());
}
/**
*
* Action to trim the overall incoming traffic to protect the upstream
* hosts. This action allows protection in case the hosts are unable to
* recover from an outage, or unable to autoscale or unable to handle
* incoming traffic volume for any reason.
*
* At the client each category is applied one after the other to generate
* the 'actual' drop percentage on all outgoing traffic. For example:
*
* .. code-block:: json
*
* { "drop_overloads": [
* { "category": "throttle", "drop_percentage": 60 }
* { "category": "lb", "drop_percentage": 50 }
* ]}
*
* The actual drop percentages applied to the traffic at the clients will be
* "throttle"_drop = 60%
* "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
* actual_outgoing_load = 20% // remaining after applying all categories.
*
* Envoy supports only one element and will NACK if more than one element is present.
* Other xDS-capable data planes will not necessarily have this limitation.
*
* In Envoy, this ``drop_overloads`` config can be overridden by a runtime key
* "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
* any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
* When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit"
* setting are in place, the min of these two wins.
*
*
* repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2;
*/
public java.util.List
getDropOverloadsBuilderList() {
return getDropOverloadsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload.Builder, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverloadOrBuilder>
getDropOverloadsFieldBuilder() {
if (dropOverloadsBuilder_ == null) {
dropOverloadsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload.Builder, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverloadOrBuilder>(
dropOverloads_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
dropOverloads_ = null;
}
return dropOverloadsBuilder_;
}
private com.google.protobuf.UInt32Value overprovisioningFactor_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> overprovisioningFactorBuilder_;
/**
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
*
* .. code-block:: json
*
* { "overprovisioning_factor": 100 }
*
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* .google.protobuf.UInt32Value overprovisioning_factor = 3 [(.validate.rules) = { ... }
* @return Whether the overprovisioningFactor field is set.
*/
public boolean hasOverprovisioningFactor() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
*
* .. code-block:: json
*
* { "overprovisioning_factor": 100 }
*
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* .google.protobuf.UInt32Value overprovisioning_factor = 3 [(.validate.rules) = { ... }
* @return The overprovisioningFactor.
*/
public com.google.protobuf.UInt32Value getOverprovisioningFactor() {
if (overprovisioningFactorBuilder_ == null) {
return overprovisioningFactor_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : overprovisioningFactor_;
} else {
return overprovisioningFactorBuilder_.getMessage();
}
}
/**
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
*
* .. code-block:: json
*
* { "overprovisioning_factor": 100 }
*
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* .google.protobuf.UInt32Value overprovisioning_factor = 3 [(.validate.rules) = { ... }
*/
public Builder setOverprovisioningFactor(com.google.protobuf.UInt32Value value) {
if (overprovisioningFactorBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
overprovisioningFactor_ = value;
} else {
overprovisioningFactorBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
*
* .. code-block:: json
*
* { "overprovisioning_factor": 100 }
*
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* .google.protobuf.UInt32Value overprovisioning_factor = 3 [(.validate.rules) = { ... }
*/
public Builder setOverprovisioningFactor(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (overprovisioningFactorBuilder_ == null) {
overprovisioningFactor_ = builderForValue.build();
} else {
overprovisioningFactorBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
*
* .. code-block:: json
*
* { "overprovisioning_factor": 100 }
*
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* .google.protobuf.UInt32Value overprovisioning_factor = 3 [(.validate.rules) = { ... }
*/
public Builder mergeOverprovisioningFactor(com.google.protobuf.UInt32Value value) {
if (overprovisioningFactorBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
overprovisioningFactor_ != null &&
overprovisioningFactor_ != com.google.protobuf.UInt32Value.getDefaultInstance()) {
getOverprovisioningFactorBuilder().mergeFrom(value);
} else {
overprovisioningFactor_ = value;
}
} else {
overprovisioningFactorBuilder_.mergeFrom(value);
}
if (overprovisioningFactor_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
*
* .. code-block:: json
*
* { "overprovisioning_factor": 100 }
*
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* .google.protobuf.UInt32Value overprovisioning_factor = 3 [(.validate.rules) = { ... }
*/
public Builder clearOverprovisioningFactor() {
bitField0_ = (bitField0_ & ~0x00000002);
overprovisioningFactor_ = null;
if (overprovisioningFactorBuilder_ != null) {
overprovisioningFactorBuilder_.dispose();
overprovisioningFactorBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
*
* .. code-block:: json
*
* { "overprovisioning_factor": 100 }
*
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* .google.protobuf.UInt32Value overprovisioning_factor = 3 [(.validate.rules) = { ... }
*/
public com.google.protobuf.UInt32Value.Builder getOverprovisioningFactorBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getOverprovisioningFactorFieldBuilder().getBuilder();
}
/**
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
*
* .. code-block:: json
*
* { "overprovisioning_factor": 100 }
*
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* .google.protobuf.UInt32Value overprovisioning_factor = 3 [(.validate.rules) = { ... }
*/
public com.google.protobuf.UInt32ValueOrBuilder getOverprovisioningFactorOrBuilder() {
if (overprovisioningFactorBuilder_ != null) {
return overprovisioningFactorBuilder_.getMessageOrBuilder();
} else {
return overprovisioningFactor_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : overprovisioningFactor_;
}
}
/**
*
* Priority levels and localities are considered overprovisioned with this
* factor (in percentage). This means that we don't consider a priority
* level or locality unhealthy until the fraction of healthy hosts
* multiplied by the overprovisioning factor drops below 100.
* With the default value 140(1.4), Envoy doesn't consider a priority level
* or a locality unhealthy until their percentage of healthy hosts drops
* below 72%. For example:
*
* .. code-block:: json
*
* { "overprovisioning_factor": 100 }
*
* Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
* :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* .google.protobuf.UInt32Value overprovisioning_factor = 3 [(.validate.rules) = { ... }
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getOverprovisioningFactorFieldBuilder() {
if (overprovisioningFactorBuilder_ == null) {
overprovisioningFactorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getOverprovisioningFactor(),
getParentForChildren(),
isClean());
overprovisioningFactor_ = null;
}
return overprovisioningFactorBuilder_;
}
private com.google.protobuf.Duration endpointStaleAfter_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> endpointStaleAfterBuilder_;
/**
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
*
* .google.protobuf.Duration endpoint_stale_after = 4 [(.validate.rules) = { ... }
* @return Whether the endpointStaleAfter field is set.
*/
public boolean hasEndpointStaleAfter() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
*
* .google.protobuf.Duration endpoint_stale_after = 4 [(.validate.rules) = { ... }
* @return The endpointStaleAfter.
*/
public com.google.protobuf.Duration getEndpointStaleAfter() {
if (endpointStaleAfterBuilder_ == null) {
return endpointStaleAfter_ == null ? com.google.protobuf.Duration.getDefaultInstance() : endpointStaleAfter_;
} else {
return endpointStaleAfterBuilder_.getMessage();
}
}
/**
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
*
* .google.protobuf.Duration endpoint_stale_after = 4 [(.validate.rules) = { ... }
*/
public Builder setEndpointStaleAfter(com.google.protobuf.Duration value) {
if (endpointStaleAfterBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
endpointStaleAfter_ = value;
} else {
endpointStaleAfterBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
*
* .google.protobuf.Duration endpoint_stale_after = 4 [(.validate.rules) = { ... }
*/
public Builder setEndpointStaleAfter(
com.google.protobuf.Duration.Builder builderForValue) {
if (endpointStaleAfterBuilder_ == null) {
endpointStaleAfter_ = builderForValue.build();
} else {
endpointStaleAfterBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
*
* .google.protobuf.Duration endpoint_stale_after = 4 [(.validate.rules) = { ... }
*/
public Builder mergeEndpointStaleAfter(com.google.protobuf.Duration value) {
if (endpointStaleAfterBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
endpointStaleAfter_ != null &&
endpointStaleAfter_ != com.google.protobuf.Duration.getDefaultInstance()) {
getEndpointStaleAfterBuilder().mergeFrom(value);
} else {
endpointStaleAfter_ = value;
}
} else {
endpointStaleAfterBuilder_.mergeFrom(value);
}
if (endpointStaleAfter_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
*
* .google.protobuf.Duration endpoint_stale_after = 4 [(.validate.rules) = { ... }
*/
public Builder clearEndpointStaleAfter() {
bitField0_ = (bitField0_ & ~0x00000004);
endpointStaleAfter_ = null;
if (endpointStaleAfterBuilder_ != null) {
endpointStaleAfterBuilder_.dispose();
endpointStaleAfterBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
*
* .google.protobuf.Duration endpoint_stale_after = 4 [(.validate.rules) = { ... }
*/
public com.google.protobuf.Duration.Builder getEndpointStaleAfterBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getEndpointStaleAfterFieldBuilder().getBuilder();
}
/**
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
*
* .google.protobuf.Duration endpoint_stale_after = 4 [(.validate.rules) = { ... }
*/
public com.google.protobuf.DurationOrBuilder getEndpointStaleAfterOrBuilder() {
if (endpointStaleAfterBuilder_ != null) {
return endpointStaleAfterBuilder_.getMessageOrBuilder();
} else {
return endpointStaleAfter_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : endpointStaleAfter_;
}
}
/**
*
* The max time until which the endpoints from this assignment can be used.
* If no new assignments are received before this time expires the endpoints
* are considered stale and should be marked unhealthy.
* Defaults to 0 which means endpoints never go stale.
*
*
* .google.protobuf.Duration endpoint_stale_after = 4 [(.validate.rules) = { ... }
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getEndpointStaleAfterFieldBuilder() {
if (endpointStaleAfterBuilder_ == null) {
endpointStaleAfterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getEndpointStaleAfter(),
getParentForChildren(),
isClean());
endpointStaleAfter_ = null;
}
return endpointStaleAfterBuilder_;
}
private boolean weightedPriorityHealth_ ;
/**
*
* If true, use the :ref:`load balancing weight
* <envoy_v3_api_field_config.endpoint.v3.LbEndpoint.load_balancing_weight>` of healthy and unhealthy
* hosts to determine the health of the priority level. If false, use the number of healthy and unhealthy hosts
* to determine the health of the priority level, or in other words assume each host has a weight of 1 for
* this calculation.
*
* Note: this is not currently implemented for
* :ref:`locality weighted load balancing <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* bool weighted_priority_health = 6;
* @return The weightedPriorityHealth.
*/
@java.lang.Override
public boolean getWeightedPriorityHealth() {
return weightedPriorityHealth_;
}
/**
*
* If true, use the :ref:`load balancing weight
* <envoy_v3_api_field_config.endpoint.v3.LbEndpoint.load_balancing_weight>` of healthy and unhealthy
* hosts to determine the health of the priority level. If false, use the number of healthy and unhealthy hosts
* to determine the health of the priority level, or in other words assume each host has a weight of 1 for
* this calculation.
*
* Note: this is not currently implemented for
* :ref:`locality weighted load balancing <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* bool weighted_priority_health = 6;
* @param value The weightedPriorityHealth to set.
* @return This builder for chaining.
*/
public Builder setWeightedPriorityHealth(boolean value) {
weightedPriorityHealth_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* If true, use the :ref:`load balancing weight
* <envoy_v3_api_field_config.endpoint.v3.LbEndpoint.load_balancing_weight>` of healthy and unhealthy
* hosts to determine the health of the priority level. If false, use the number of healthy and unhealthy hosts
* to determine the health of the priority level, or in other words assume each host has a weight of 1 for
* this calculation.
*
* Note: this is not currently implemented for
* :ref:`locality weighted load balancing <arch_overview_load_balancing_locality_weighted_lb>`.
*
*
* bool weighted_priority_health = 6;
* @return This builder for chaining.
*/
public Builder clearWeightedPriorityHealth() {
bitField0_ = (bitField0_ & ~0x00000008);
weightedPriorityHealth_ = 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:envoy.config.endpoint.v3.ClusterLoadAssignment.Policy)
}
// @@protoc_insertion_point(class_scope:envoy.config.endpoint.v3.ClusterLoadAssignment.Policy)
private static final io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy();
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Policy parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int CLUSTER_NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object clusterName_ = "";
/**
*
* Name of the cluster. This will be the :ref:`service_name
* <envoy_v3_api_field_config.cluster.v3.Cluster.EdsClusterConfig.service_name>` value if specified
* in the cluster :ref:`EdsClusterConfig
* <envoy_v3_api_msg_config.cluster.v3.Cluster.EdsClusterConfig>`.
*
*
* string cluster_name = 1 [(.validate.rules) = { ... }
* @return The clusterName.
*/
@java.lang.Override
public java.lang.String getClusterName() {
java.lang.Object ref = clusterName_;
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();
clusterName_ = s;
return s;
}
}
/**
*
* Name of the cluster. This will be the :ref:`service_name
* <envoy_v3_api_field_config.cluster.v3.Cluster.EdsClusterConfig.service_name>` value if specified
* in the cluster :ref:`EdsClusterConfig
* <envoy_v3_api_msg_config.cluster.v3.Cluster.EdsClusterConfig>`.
*
*
* string cluster_name = 1 [(.validate.rules) = { ... }
* @return The bytes for clusterName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getClusterNameBytes() {
java.lang.Object ref = clusterName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
clusterName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ENDPOINTS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List endpoints_;
/**
*
* List of endpoints to load balance to.
*
*
* repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
*/
@java.lang.Override
public java.util.List getEndpointsList() {
return endpoints_;
}
/**
*
* List of endpoints to load balance to.
*
*
* repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
*/
@java.lang.Override
public java.util.List extends io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpointsOrBuilder>
getEndpointsOrBuilderList() {
return endpoints_;
}
/**
*
* List of endpoints to load balance to.
*
*
* repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
*/
@java.lang.Override
public int getEndpointsCount() {
return endpoints_.size();
}
/**
*
* List of endpoints to load balance to.
*
*
* repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints getEndpoints(int index) {
return endpoints_.get(index);
}
/**
*
* List of endpoints to load balance to.
*
*
* repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpointsOrBuilder getEndpointsOrBuilder(
int index) {
return endpoints_.get(index);
}
public static final int NAMED_ENDPOINTS_FIELD_NUMBER = 5;
private static final class NamedEndpointsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, io.envoyproxy.envoy.config.endpoint.v3.Endpoint> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
io.envoyproxy.envoy.config.endpoint.v3.EndpointProto.internal_static_envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
io.envoyproxy.envoy.config.endpoint.v3.Endpoint.getDefaultInstance());
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.String, io.envoyproxy.envoy.config.endpoint.v3.Endpoint> namedEndpoints_;
private com.google.protobuf.MapField
internalGetNamedEndpoints() {
if (namedEndpoints_ == null) {
return com.google.protobuf.MapField.emptyMapField(
NamedEndpointsDefaultEntryHolder.defaultEntry);
}
return namedEndpoints_;
}
public int getNamedEndpointsCount() {
return internalGetNamedEndpoints().getMap().size();
}
/**
*
* Map of named endpoints that can be referenced in LocalityLbEndpoints.
* [#not-implemented-hide:]
*
*
* map<string, .envoy.config.endpoint.v3.Endpoint> named_endpoints = 5;
*/
@java.lang.Override
public boolean containsNamedEndpoints(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetNamedEndpoints().getMap().containsKey(key);
}
/**
* Use {@link #getNamedEndpointsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getNamedEndpoints() {
return getNamedEndpointsMap();
}
/**
*
* Map of named endpoints that can be referenced in LocalityLbEndpoints.
* [#not-implemented-hide:]
*
*
* map<string, .envoy.config.endpoint.v3.Endpoint> named_endpoints = 5;
*/
@java.lang.Override
public java.util.Map getNamedEndpointsMap() {
return internalGetNamedEndpoints().getMap();
}
/**
*
* Map of named endpoints that can be referenced in LocalityLbEndpoints.
* [#not-implemented-hide:]
*
*
* map<string, .envoy.config.endpoint.v3.Endpoint> named_endpoints = 5;
*/
@java.lang.Override
public /* nullable */
io.envoyproxy.envoy.config.endpoint.v3.Endpoint getNamedEndpointsOrDefault(
java.lang.String key,
/* nullable */
io.envoyproxy.envoy.config.endpoint.v3.Endpoint defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetNamedEndpoints().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Map of named endpoints that can be referenced in LocalityLbEndpoints.
* [#not-implemented-hide:]
*
*
* map<string, .envoy.config.endpoint.v3.Endpoint> named_endpoints = 5;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.Endpoint getNamedEndpointsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetNamedEndpoints().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int POLICY_FIELD_NUMBER = 4;
private io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy_;
/**
*
* Load balancing policy settings.
*
*
* .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
* @return Whether the policy field is set.
*/
@java.lang.Override
public boolean hasPolicy() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Load balancing policy settings.
*
*
* .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
* @return The policy.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy getPolicy() {
return policy_ == null ? io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.getDefaultInstance() : policy_;
}
/**
*
* Load balancing policy settings.
*
*
* .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.PolicyOrBuilder getPolicyOrBuilder() {
return policy_ == null ? io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.getDefaultInstance() : policy_;
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clusterName_);
}
for (int i = 0; i < endpoints_.size(); i++) {
output.writeMessage(2, endpoints_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(4, getPolicy());
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetNamedEndpoints(),
NamedEndpointsDefaultEntryHolder.defaultEntry,
5);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, clusterName_);
}
for (int i = 0; i < endpoints_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, endpoints_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getPolicy());
}
for (java.util.Map.Entry entry
: internalGetNamedEndpoints().getMap().entrySet()) {
com.google.protobuf.MapEntry
namedEndpoints__ = NamedEndpointsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, namedEndpoints__);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment other = (io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment) obj;
if (!getClusterName()
.equals(other.getClusterName())) return false;
if (!getEndpointsList()
.equals(other.getEndpointsList())) return false;
if (!internalGetNamedEndpoints().equals(
other.internalGetNamedEndpoints())) return false;
if (hasPolicy() != other.hasPolicy()) return false;
if (hasPolicy()) {
if (!getPolicy()
.equals(other.getPolicy())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) 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) + CLUSTER_NAME_FIELD_NUMBER;
hash = (53 * hash) + getClusterName().hashCode();
if (getEndpointsCount() > 0) {
hash = (37 * hash) + ENDPOINTS_FIELD_NUMBER;
hash = (53 * hash) + getEndpointsList().hashCode();
}
if (!internalGetNamedEndpoints().getMap().isEmpty()) {
hash = (37 * hash) + NAMED_ENDPOINTS_FIELD_NUMBER;
hash = (53 * hash) + internalGetNamedEndpoints().hashCode();
}
if (hasPolicy()) {
hash = (37 * hash) + POLICY_FIELD_NUMBER;
hash = (53 * hash) + getPolicy().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment 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 io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment 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 io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment 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(io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment 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;
}
/**
*
* Each route from RDS will map to a single cluster or traffic split across
* clusters using weights expressed in the RDS WeightedCluster.
*
* With EDS, each cluster is treated independently from a LB perspective, with
* LB taking place between the Localities within a cluster and at a finer
* granularity between the hosts within a locality. The percentage of traffic
* for each endpoint is determined by both its load_balancing_weight, and the
* load_balancing_weight of its locality. First, a locality will be selected,
* then an endpoint within that locality will be chose based on its weight.
* [#next-free-field: 6]
*
*
* Protobuf type {@code envoy.config.endpoint.v3.ClusterLoadAssignment}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.endpoint.v3.ClusterLoadAssignment)
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignmentOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointProto.internal_static_envoy_config_endpoint_v3_ClusterLoadAssignment_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 5:
return internalGetNamedEndpoints();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 5:
return internalGetMutableNamedEndpoints();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointProto.internal_static_envoy_config_endpoint_v3_ClusterLoadAssignment_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.class, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getEndpointsFieldBuilder();
getPolicyFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
clusterName_ = "";
if (endpointsBuilder_ == null) {
endpoints_ = java.util.Collections.emptyList();
} else {
endpoints_ = null;
endpointsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
internalGetMutableNamedEndpoints().clear();
policy_ = null;
if (policyBuilder_ != null) {
policyBuilder_.dispose();
policyBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointProto.internal_static_envoy_config_endpoint_v3_ClusterLoadAssignment_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment build() {
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment buildPartial() {
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment result = new io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment result) {
if (endpointsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
endpoints_ = java.util.Collections.unmodifiableList(endpoints_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.endpoints_ = endpoints_;
} else {
result.endpoints_ = endpointsBuilder_.build();
}
}
private void buildPartial0(io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.clusterName_ = clusterName_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.namedEndpoints_ = internalGetNamedEndpoints().build(NamedEndpointsDefaultEntryHolder.defaultEntry);
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000008) != 0)) {
result.policy_ = policyBuilder_ == null
? policy_
: policyBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@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 io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment) {
return mergeFrom((io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment other) {
if (other == io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.getDefaultInstance()) return this;
if (!other.getClusterName().isEmpty()) {
clusterName_ = other.clusterName_;
bitField0_ |= 0x00000001;
onChanged();
}
if (endpointsBuilder_ == null) {
if (!other.endpoints_.isEmpty()) {
if (endpoints_.isEmpty()) {
endpoints_ = other.endpoints_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureEndpointsIsMutable();
endpoints_.addAll(other.endpoints_);
}
onChanged();
}
} else {
if (!other.endpoints_.isEmpty()) {
if (endpointsBuilder_.isEmpty()) {
endpointsBuilder_.dispose();
endpointsBuilder_ = null;
endpoints_ = other.endpoints_;
bitField0_ = (bitField0_ & ~0x00000002);
endpointsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getEndpointsFieldBuilder() : null;
} else {
endpointsBuilder_.addAllMessages(other.endpoints_);
}
}
}
internalGetMutableNamedEndpoints().mergeFrom(
other.internalGetNamedEndpoints());
bitField0_ |= 0x00000004;
if (other.hasPolicy()) {
mergePolicy(other.getPolicy());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
clusterName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints m =
input.readMessage(
io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.parser(),
extensionRegistry);
if (endpointsBuilder_ == null) {
ensureEndpointsIsMutable();
endpoints_.add(m);
} else {
endpointsBuilder_.addMessage(m);
}
break;
} // case 18
case 34: {
input.readMessage(
getPolicyFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 42: {
com.google.protobuf.MapEntry
namedEndpoints__ = input.readMessage(
NamedEndpointsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableNamedEndpoints().ensureBuilderMap().put(
namedEndpoints__.getKey(), namedEndpoints__.getValue());
bitField0_ |= 0x00000004;
break;
} // case 42
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object clusterName_ = "";
/**
*
* Name of the cluster. This will be the :ref:`service_name
* <envoy_v3_api_field_config.cluster.v3.Cluster.EdsClusterConfig.service_name>` value if specified
* in the cluster :ref:`EdsClusterConfig
* <envoy_v3_api_msg_config.cluster.v3.Cluster.EdsClusterConfig>`.
*
*
* string cluster_name = 1 [(.validate.rules) = { ... }
* @return The clusterName.
*/
public java.lang.String getClusterName() {
java.lang.Object ref = clusterName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
clusterName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Name of the cluster. This will be the :ref:`service_name
* <envoy_v3_api_field_config.cluster.v3.Cluster.EdsClusterConfig.service_name>` value if specified
* in the cluster :ref:`EdsClusterConfig
* <envoy_v3_api_msg_config.cluster.v3.Cluster.EdsClusterConfig>`.
*
*
* string cluster_name = 1 [(.validate.rules) = { ... }
* @return The bytes for clusterName.
*/
public com.google.protobuf.ByteString
getClusterNameBytes() {
java.lang.Object ref = clusterName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
clusterName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Name of the cluster. This will be the :ref:`service_name
* <envoy_v3_api_field_config.cluster.v3.Cluster.EdsClusterConfig.service_name>` value if specified
* in the cluster :ref:`EdsClusterConfig
* <envoy_v3_api_msg_config.cluster.v3.Cluster.EdsClusterConfig>`.
*
*
* string cluster_name = 1 [(.validate.rules) = { ... }
* @param value The clusterName to set.
* @return This builder for chaining.
*/
public Builder setClusterName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
clusterName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Name of the cluster. This will be the :ref:`service_name
* <envoy_v3_api_field_config.cluster.v3.Cluster.EdsClusterConfig.service_name>` value if specified
* in the cluster :ref:`EdsClusterConfig
* <envoy_v3_api_msg_config.cluster.v3.Cluster.EdsClusterConfig>`.
*
*
* string cluster_name = 1 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearClusterName() {
clusterName_ = getDefaultInstance().getClusterName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Name of the cluster. This will be the :ref:`service_name
* <envoy_v3_api_field_config.cluster.v3.Cluster.EdsClusterConfig.service_name>` value if specified
* in the cluster :ref:`EdsClusterConfig
* <envoy_v3_api_msg_config.cluster.v3.Cluster.EdsClusterConfig>`.
*
*
* string cluster_name = 1 [(.validate.rules) = { ... }
* @param value The bytes for clusterName to set.
* @return This builder for chaining.
*/
public Builder setClusterNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
clusterName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.util.List endpoints_ =
java.util.Collections.emptyList();
private void ensureEndpointsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
endpoints_ = new java.util.ArrayList(endpoints_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints, io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.Builder, io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpointsOrBuilder> endpointsBuilder_;
/**
*
* List of endpoints to load balance to.
*
*
* repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
*/
public java.util.List getEndpointsList() {
if (endpointsBuilder_ == null) {
return java.util.Collections.unmodifiableList(endpoints_);
} else {
return endpointsBuilder_.getMessageList();
}
}
/**
*
* List of endpoints to load balance to.
*
*
* repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
*/
public int getEndpointsCount() {
if (endpointsBuilder_ == null) {
return endpoints_.size();
} else {
return endpointsBuilder_.getCount();
}
}
/**
*
* List of endpoints to load balance to.
*
*
* repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
*/
public io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints getEndpoints(int index) {
if (endpointsBuilder_ == null) {
return endpoints_.get(index);
} else {
return endpointsBuilder_.getMessage(index);
}
}
/**
*
* List of endpoints to load balance to.
*
*
* repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
*/
public Builder setEndpoints(
int index, io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints value) {
if (endpointsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEndpointsIsMutable();
endpoints_.set(index, value);
onChanged();
} else {
endpointsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* List of endpoints to load balance to.
*
*
* repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
*/
public Builder setEndpoints(
int index, io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.Builder builderForValue) {
if (endpointsBuilder_ == null) {
ensureEndpointsIsMutable();
endpoints_.set(index, builderForValue.build());
onChanged();
} else {
endpointsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* List of endpoints to load balance to.
*
*
* repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
*/
public Builder addEndpoints(io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints value) {
if (endpointsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEndpointsIsMutable();
endpoints_.add(value);
onChanged();
} else {
endpointsBuilder_.addMessage(value);
}
return this;
}
/**
*
* List of endpoints to load balance to.
*
*
* repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
*/
public Builder addEndpoints(
int index, io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints value) {
if (endpointsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEndpointsIsMutable();
endpoints_.add(index, value);
onChanged();
} else {
endpointsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* List of endpoints to load balance to.
*
*
* repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
*/
public Builder addEndpoints(
io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.Builder builderForValue) {
if (endpointsBuilder_ == null) {
ensureEndpointsIsMutable();
endpoints_.add(builderForValue.build());
onChanged();
} else {
endpointsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* List of endpoints to load balance to.
*
*
* repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
*/
public Builder addEndpoints(
int index, io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.Builder builderForValue) {
if (endpointsBuilder_ == null) {
ensureEndpointsIsMutable();
endpoints_.add(index, builderForValue.build());
onChanged();
} else {
endpointsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* List of endpoints to load balance to.
*
*
* repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
*/
public Builder addAllEndpoints(
java.lang.Iterable extends io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints> values) {
if (endpointsBuilder_ == null) {
ensureEndpointsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, endpoints_);
onChanged();
} else {
endpointsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* List of endpoints to load balance to.
*
*
* repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
*/
public Builder clearEndpoints() {
if (endpointsBuilder_ == null) {
endpoints_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
endpointsBuilder_.clear();
}
return this;
}
/**
*
* List of endpoints to load balance to.
*
*
* repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
*/
public Builder removeEndpoints(int index) {
if (endpointsBuilder_ == null) {
ensureEndpointsIsMutable();
endpoints_.remove(index);
onChanged();
} else {
endpointsBuilder_.remove(index);
}
return this;
}
/**
*
* List of endpoints to load balance to.
*
*
* repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
*/
public io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.Builder getEndpointsBuilder(
int index) {
return getEndpointsFieldBuilder().getBuilder(index);
}
/**
*
* List of endpoints to load balance to.
*
*
* repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
*/
public io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpointsOrBuilder getEndpointsOrBuilder(
int index) {
if (endpointsBuilder_ == null) {
return endpoints_.get(index); } else {
return endpointsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* List of endpoints to load balance to.
*
*
* repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
*/
public java.util.List extends io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpointsOrBuilder>
getEndpointsOrBuilderList() {
if (endpointsBuilder_ != null) {
return endpointsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(endpoints_);
}
}
/**
*
* List of endpoints to load balance to.
*
*
* repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
*/
public io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.Builder addEndpointsBuilder() {
return getEndpointsFieldBuilder().addBuilder(
io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.getDefaultInstance());
}
/**
*
* List of endpoints to load balance to.
*
*
* repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
*/
public io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.Builder addEndpointsBuilder(
int index) {
return getEndpointsFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.getDefaultInstance());
}
/**
*
* List of endpoints to load balance to.
*
*
* repeated .envoy.config.endpoint.v3.LocalityLbEndpoints endpoints = 2;
*/
public java.util.List
getEndpointsBuilderList() {
return getEndpointsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints, io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.Builder, io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpointsOrBuilder>
getEndpointsFieldBuilder() {
if (endpointsBuilder_ == null) {
endpointsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints, io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.Builder, io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpointsOrBuilder>(
endpoints_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
endpoints_ = null;
}
return endpointsBuilder_;
}
private static final class NamedEndpointsConverter implements com.google.protobuf.MapFieldBuilder.Converter {
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.Endpoint build(io.envoyproxy.envoy.config.endpoint.v3.EndpointOrBuilder val) {
if (val instanceof io.envoyproxy.envoy.config.endpoint.v3.Endpoint) { return (io.envoyproxy.envoy.config.endpoint.v3.Endpoint) val; }
return ((io.envoyproxy.envoy.config.endpoint.v3.Endpoint.Builder) val).build();
}
@java.lang.Override
public com.google.protobuf.MapEntry defaultEntry() {
return NamedEndpointsDefaultEntryHolder.defaultEntry;
}
};
private static final NamedEndpointsConverter namedEndpointsConverter = new NamedEndpointsConverter();
private com.google.protobuf.MapFieldBuilder<
java.lang.String, io.envoyproxy.envoy.config.endpoint.v3.EndpointOrBuilder, io.envoyproxy.envoy.config.endpoint.v3.Endpoint, io.envoyproxy.envoy.config.endpoint.v3.Endpoint.Builder> namedEndpoints_;
private com.google.protobuf.MapFieldBuilder
internalGetNamedEndpoints() {
if (namedEndpoints_ == null) {
return new com.google.protobuf.MapFieldBuilder<>(namedEndpointsConverter);
}
return namedEndpoints_;
}
private com.google.protobuf.MapFieldBuilder
internalGetMutableNamedEndpoints() {
if (namedEndpoints_ == null) {
namedEndpoints_ = new com.google.protobuf.MapFieldBuilder<>(namedEndpointsConverter);
}
bitField0_ |= 0x00000004;
onChanged();
return namedEndpoints_;
}
public int getNamedEndpointsCount() {
return internalGetNamedEndpoints().ensureBuilderMap().size();
}
/**
*
* Map of named endpoints that can be referenced in LocalityLbEndpoints.
* [#not-implemented-hide:]
*
*
* map<string, .envoy.config.endpoint.v3.Endpoint> named_endpoints = 5;
*/
@java.lang.Override
public boolean containsNamedEndpoints(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetNamedEndpoints().ensureBuilderMap().containsKey(key);
}
/**
* Use {@link #getNamedEndpointsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getNamedEndpoints() {
return getNamedEndpointsMap();
}
/**
*
* Map of named endpoints that can be referenced in LocalityLbEndpoints.
* [#not-implemented-hide:]
*
*
* map<string, .envoy.config.endpoint.v3.Endpoint> named_endpoints = 5;
*/
@java.lang.Override
public java.util.Map getNamedEndpointsMap() {
return internalGetNamedEndpoints().getImmutableMap();
}
/**
*
* Map of named endpoints that can be referenced in LocalityLbEndpoints.
* [#not-implemented-hide:]
*
*
* map<string, .envoy.config.endpoint.v3.Endpoint> named_endpoints = 5;
*/
@java.lang.Override
public /* nullable */
io.envoyproxy.envoy.config.endpoint.v3.Endpoint getNamedEndpointsOrDefault(
java.lang.String key,
/* nullable */
io.envoyproxy.envoy.config.endpoint.v3.Endpoint defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map = internalGetMutableNamedEndpoints().ensureBuilderMap();
return map.containsKey(key) ? namedEndpointsConverter.build(map.get(key)) : defaultValue;
}
/**
*
* Map of named endpoints that can be referenced in LocalityLbEndpoints.
* [#not-implemented-hide:]
*
*
* map<string, .envoy.config.endpoint.v3.Endpoint> named_endpoints = 5;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.Endpoint getNamedEndpointsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map = internalGetMutableNamedEndpoints().ensureBuilderMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return namedEndpointsConverter.build(map.get(key));
}
public Builder clearNamedEndpoints() {
bitField0_ = (bitField0_ & ~0x00000004);
internalGetMutableNamedEndpoints().clear();
return this;
}
/**
*
* Map of named endpoints that can be referenced in LocalityLbEndpoints.
* [#not-implemented-hide:]
*
*
* map<string, .envoy.config.endpoint.v3.Endpoint> named_endpoints = 5;
*/
public Builder removeNamedEndpoints(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableNamedEndpoints().ensureBuilderMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableNamedEndpoints() {
bitField0_ |= 0x00000004;
return internalGetMutableNamedEndpoints().ensureMessageMap();
}
/**
*
* Map of named endpoints that can be referenced in LocalityLbEndpoints.
* [#not-implemented-hide:]
*
*
* map<string, .envoy.config.endpoint.v3.Endpoint> named_endpoints = 5;
*/
public Builder putNamedEndpoints(
java.lang.String key,
io.envoyproxy.envoy.config.endpoint.v3.Endpoint value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableNamedEndpoints().ensureBuilderMap()
.put(key, value);
bitField0_ |= 0x00000004;
return this;
}
/**
*
* Map of named endpoints that can be referenced in LocalityLbEndpoints.
* [#not-implemented-hide:]
*
*
* map<string, .envoy.config.endpoint.v3.Endpoint> named_endpoints = 5;
*/
public Builder putAllNamedEndpoints(
java.util.Map values) {
for (java.util.Map.Entry e : values.entrySet()) {
if (e.getKey() == null || e.getValue() == null) {
throw new NullPointerException();
}
}
internalGetMutableNamedEndpoints().ensureBuilderMap()
.putAll(values);
bitField0_ |= 0x00000004;
return this;
}
/**
*
* Map of named endpoints that can be referenced in LocalityLbEndpoints.
* [#not-implemented-hide:]
*
*
* map<string, .envoy.config.endpoint.v3.Endpoint> named_endpoints = 5;
*/
public io.envoyproxy.envoy.config.endpoint.v3.Endpoint.Builder putNamedEndpointsBuilderIfAbsent(
java.lang.String key) {
java.util.Map builderMap = internalGetMutableNamedEndpoints().ensureBuilderMap();
io.envoyproxy.envoy.config.endpoint.v3.EndpointOrBuilder entry = builderMap.get(key);
if (entry == null) {
entry = io.envoyproxy.envoy.config.endpoint.v3.Endpoint.newBuilder();
builderMap.put(key, entry);
}
if (entry instanceof io.envoyproxy.envoy.config.endpoint.v3.Endpoint) {
entry = ((io.envoyproxy.envoy.config.endpoint.v3.Endpoint) entry).toBuilder();
builderMap.put(key, entry);
}
return (io.envoyproxy.envoy.config.endpoint.v3.Endpoint.Builder) entry;
}
private io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.Builder, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.PolicyOrBuilder> policyBuilder_;
/**
*
* Load balancing policy settings.
*
*
* .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
* @return Whether the policy field is set.
*/
public boolean hasPolicy() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Load balancing policy settings.
*
*
* .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
* @return The policy.
*/
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy getPolicy() {
if (policyBuilder_ == null) {
return policy_ == null ? io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.getDefaultInstance() : policy_;
} else {
return policyBuilder_.getMessage();
}
}
/**
*
* Load balancing policy settings.
*
*
* .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
*/
public Builder setPolicy(io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy value) {
if (policyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
policy_ = value;
} else {
policyBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Load balancing policy settings.
*
*
* .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
*/
public Builder setPolicy(
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.Builder builderForValue) {
if (policyBuilder_ == null) {
policy_ = builderForValue.build();
} else {
policyBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Load balancing policy settings.
*
*
* .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
*/
public Builder mergePolicy(io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy value) {
if (policyBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
policy_ != null &&
policy_ != io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.getDefaultInstance()) {
getPolicyBuilder().mergeFrom(value);
} else {
policy_ = value;
}
} else {
policyBuilder_.mergeFrom(value);
}
if (policy_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
* Load balancing policy settings.
*
*
* .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
*/
public Builder clearPolicy() {
bitField0_ = (bitField0_ & ~0x00000008);
policy_ = null;
if (policyBuilder_ != null) {
policyBuilder_.dispose();
policyBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Load balancing policy settings.
*
*
* .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
*/
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.Builder getPolicyBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getPolicyFieldBuilder().getBuilder();
}
/**
*
* Load balancing policy settings.
*
*
* .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
*/
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.PolicyOrBuilder getPolicyOrBuilder() {
if (policyBuilder_ != null) {
return policyBuilder_.getMessageOrBuilder();
} else {
return policy_ == null ?
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.getDefaultInstance() : policy_;
}
}
/**
*
* Load balancing policy settings.
*
*
* .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.Builder, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.PolicyOrBuilder>
getPolicyFieldBuilder() {
if (policyBuilder_ == null) {
policyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.Builder, io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.PolicyOrBuilder>(
getPolicy(),
getParentForChildren(),
isClean());
policy_ = null;
}
return policyBuilder_;
}
@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:envoy.config.endpoint.v3.ClusterLoadAssignment)
}
// @@protoc_insertion_point(class_scope:envoy.config.endpoint.v3.ClusterLoadAssignment)
private static final io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment();
}
public static io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ClusterLoadAssignment parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy