All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment Maven / Gradle / Ivy

There is a newer version: 1.0.46
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: envoy/config/endpoint/v3/endpoint.proto

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(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ClusterLoadAssignment( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); clusterName_ = s; break; } case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { endpoints_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } endpoints_.add( input.readMessage(io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.parser(), extensionRegistry)); break; } case 34: { io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.Builder subBuilder = null; if (policy_ != null) { subBuilder = policy_.toBuilder(); } policy_ = input.readMessage(io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(policy_); policy_ = subBuilder.buildPartial(); } break; } case 42: { if (!((mutable_bitField0_ & 0x00000002) != 0)) { namedEndpoints_ = com.google.protobuf.MapField.newMapField( NamedEndpointsDefaultEntryHolder.defaultEntry); mutable_bitField0_ |= 0x00000002; } com.google.protobuf.MapEntry namedEndpoints__ = input.readMessage( NamedEndpointsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); namedEndpoints_.getMutableMap().put( namedEndpoints__.getKey(), namedEndpoints__.getValue()); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { endpoints_ = java.util.Collections.unmodifiableList(endpoints_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } 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.MapField internalGetMapField( 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.
     * [#not-implemented-hide:]
     * 
* * 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.
     * [#not-implemented-hide:]
     * 
* * 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.
     * [#not-implemented-hide:]
     * 
* * 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.
     * [#not-implemented-hide:]
     * 
* * repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2; */ java.util.List 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.
     * [#not-implemented-hide:]
     * 
* * 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(); } /** *
   * Load balancing policy settings.
   * [#next-free-field: 6]
   * 
* * 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(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Policy( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { dropOverloads_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } dropOverloads_.add( input.readMessage(io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload.parser(), extensionRegistry)); break; } case 26: { com.google.protobuf.UInt32Value.Builder subBuilder = null; if (overprovisioningFactor_ != null) { subBuilder = overprovisioningFactor_.toBuilder(); } overprovisioningFactor_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(overprovisioningFactor_); overprovisioningFactor_ = subBuilder.buildPartial(); } break; } case 34: { com.google.protobuf.Duration.Builder subBuilder = null; if (endpointStaleAfter_ != null) { subBuilder = endpointStaleAfter_.toBuilder(); } endpointStaleAfter_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(endpointStaleAfter_); endpointStaleAfter_ = subBuilder.buildPartial(); } break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { dropOverloads_ = java.util.Collections.unmodifiableList(dropOverloads_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } 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(); } /** *
     * [#not-implemented-hide:]
     * 
* * 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(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private DropOverload( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); category_ = s; break; } case 18: { io.envoyproxy.envoy.type.v3.FractionalPercent.Builder subBuilder = null; if (dropPercentage_ != null) { subBuilder = dropPercentage_.toBuilder(); } dropPercentage_ = input.readMessage(io.envoyproxy.envoy.type.v3.FractionalPercent.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(dropPercentage_); dropPercentage_ = subBuilder.buildPartial(); } break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return 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); } public static final int CATEGORY_FIELD_NUMBER = 1; 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 dropPercentage_ != null; } /** *
       * 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 getDropPercentage(); } 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 (dropPercentage_ != null) { output.writeMessage(2, getDropPercentage()); } unknownFields.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 (dropPercentage_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getDropPercentage()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof 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 (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + 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) + unknownFields.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; } /** *
       * [#not-implemented-hide:]
       * 
* * 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) { } } @java.lang.Override public Builder clear() { super.clear(); category_ = ""; if (dropPercentageBuilder_ == null) { dropPercentage_ = null; } else { dropPercentage_ = null; 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); result.category_ = category_; if (dropPercentageBuilder_ == null) { result.dropPercentage_ = dropPercentage_; } else { result.dropPercentage_ = dropPercentageBuilder_.build(); } onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof 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_; onChanged(); } if (other.hasDropPercentage()) { mergeDropPercentage(other.getDropPercentage()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } 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; 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(); 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; 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 dropPercentageBuilder_ != null || dropPercentage_ != null; } /** *
         * 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; onChanged(); } else { dropPercentageBuilder_.setMessage(value); } 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(); onChanged(); } else { dropPercentageBuilder_.setMessage(builderForValue.build()); } 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 (dropPercentage_ != null) { dropPercentage_ = io.envoyproxy.envoy.type.v3.FractionalPercent.newBuilder(dropPercentage_).mergeFrom(value).buildPartial(); } else { dropPercentage_ = value; } onChanged(); } else { dropPercentageBuilder_.mergeFrom(value); } return this; } /** *
         * Percentage of traffic that should be dropped for the category.
         * 
* * .envoy.type.v3.FractionalPercent drop_percentage = 2; */ public Builder clearDropPercentage() { if (dropPercentageBuilder_ == null) { dropPercentage_ = null; onChanged(); } else { dropPercentage_ = null; dropPercentageBuilder_ = null; } 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() { 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 { return new DropOverload(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int DROP_OVERLOADS_FIELD_NUMBER = 2; 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.
     * [#not-implemented-hide:]
     * 
* * 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.
     * [#not-implemented-hide:]
     * 
* * repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2; */ @java.lang.Override public java.util.List 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.
     * [#not-implemented-hide:]
     * 
* * 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.
     * [#not-implemented-hide:]
     * 
* * 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.
     * [#not-implemented-hide:]
     * 
* * 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 overprovisioningFactor_ != null; } /** *
     * 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 getOverprovisioningFactor(); } 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 endpointStaleAfter_ != null; } /** *
     * 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 getEndpointStaleAfter(); } 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 (overprovisioningFactor_ != null) { output.writeMessage(3, getOverprovisioningFactor()); } if (endpointStaleAfter_ != null) { output.writeMessage(4, getEndpointStaleAfter()); } unknownFields.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 (overprovisioningFactor_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getOverprovisioningFactor()); } if (endpointStaleAfter_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getEndpointStaleAfter()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof 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 (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (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 = (29 * hash) + unknownFields.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: 6]
     * 
* * 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(); } } @java.lang.Override public Builder clear() { super.clear(); if (dropOverloadsBuilder_ == null) { dropOverloads_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { dropOverloadsBuilder_.clear(); } if (overprovisioningFactorBuilder_ == null) { overprovisioningFactor_ = null; } else { overprovisioningFactor_ = null; overprovisioningFactorBuilder_ = null; } if (endpointStaleAfterBuilder_ == null) { endpointStaleAfter_ = null; } else { endpointStaleAfter_ = null; endpointStaleAfterBuilder_ = 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_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); int from_bitField0_ = bitField0_; if (dropOverloadsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { dropOverloads_ = java.util.Collections.unmodifiableList(dropOverloads_); bitField0_ = (bitField0_ & ~0x00000001); } result.dropOverloads_ = dropOverloads_; } else { result.dropOverloads_ = dropOverloadsBuilder_.build(); } if (overprovisioningFactorBuilder_ == null) { result.overprovisioningFactor_ = overprovisioningFactor_; } else { result.overprovisioningFactor_ = overprovisioningFactorBuilder_.build(); } if (endpointStaleAfterBuilder_ == null) { result.endpointStaleAfter_ = endpointStaleAfter_; } else { result.endpointStaleAfter_ = endpointStaleAfterBuilder_.build(); } onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof 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()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } 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.
       * [#not-implemented-hide:]
       * 
* * 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.
       * [#not-implemented-hide:]
       * 
* * 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.
       * [#not-implemented-hide:]
       * 
* * 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.
       * [#not-implemented-hide:]
       * 
* * 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.
       * [#not-implemented-hide:]
       * 
* * 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.
       * [#not-implemented-hide:]
       * 
* * 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.
       * [#not-implemented-hide:]
       * 
* * 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.
       * [#not-implemented-hide:]
       * 
* * 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.
       * [#not-implemented-hide:]
       * 
* * 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.
       * [#not-implemented-hide:]
       * 
* * repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2; */ public Builder addAllDropOverloads( java.lang.Iterable 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.
       * [#not-implemented-hide:]
       * 
* * 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.
       * [#not-implemented-hide:]
       * 
* * 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.
       * [#not-implemented-hide:]
       * 
* * 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.
       * [#not-implemented-hide:]
       * 
* * 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.
       * [#not-implemented-hide:]
       * 
* * repeated .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload drop_overloads = 2; */ public java.util.List 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.
       * [#not-implemented-hide:]
       * 
* * 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.
       * [#not-implemented-hide:]
       * 
* * 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.
       * [#not-implemented-hide:]
       * 
* * 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 overprovisioningFactorBuilder_ != null || overprovisioningFactor_ != null; } /** *
       * 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; onChanged(); } else { overprovisioningFactorBuilder_.setMessage(value); } 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(); onChanged(); } else { overprovisioningFactorBuilder_.setMessage(builderForValue.build()); } 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 (overprovisioningFactor_ != null) { overprovisioningFactor_ = com.google.protobuf.UInt32Value.newBuilder(overprovisioningFactor_).mergeFrom(value).buildPartial(); } else { overprovisioningFactor_ = value; } onChanged(); } else { overprovisioningFactorBuilder_.mergeFrom(value); } 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() { if (overprovisioningFactorBuilder_ == null) { overprovisioningFactor_ = null; onChanged(); } else { overprovisioningFactor_ = null; overprovisioningFactorBuilder_ = null; } 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() { 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 endpointStaleAfterBuilder_ != null || endpointStaleAfter_ != null; } /** *
       * 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; onChanged(); } else { endpointStaleAfterBuilder_.setMessage(value); } 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(); onChanged(); } else { endpointStaleAfterBuilder_.setMessage(builderForValue.build()); } 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 (endpointStaleAfter_ != null) { endpointStaleAfter_ = com.google.protobuf.Duration.newBuilder(endpointStaleAfter_).mergeFrom(value).buildPartial(); } else { endpointStaleAfter_ = value; } onChanged(); } else { endpointStaleAfterBuilder_.mergeFrom(value); } 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() { if (endpointStaleAfterBuilder_ == null) { endpointStaleAfter_ = null; onChanged(); } else { endpointStaleAfter_ = null; endpointStaleAfterBuilder_ = null; } 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() { 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_; } @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 { return new Policy(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int CLUSTER_NAME_FIELD_NUMBER = 1; 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; 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 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()); } 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 io.envoyproxy.envoy.config.endpoint.v3.Endpoint getNamedEndpointsOrDefault( java.lang.String key, 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 policy_ != null; } /** *
   * 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 getPolicy(); } 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 (policy_ != null) { output.writeMessage(4, getPolicy()); } com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetNamedEndpoints(), NamedEndpointsDefaultEntryHolder.defaultEntry, 5); unknownFields.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 (policy_ != null) { 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 += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof 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 (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + 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) + unknownFields.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.MapField internalGetMapField( int number) { switch (number) { case 5: return internalGetNamedEndpoints(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMutableMapField( 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(); } } @java.lang.Override public Builder clear() { super.clear(); clusterName_ = ""; if (endpointsBuilder_ == null) { endpoints_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { endpointsBuilder_.clear(); } internalGetMutableNamedEndpoints().clear(); if (policyBuilder_ == null) { policy_ = null; } else { policy_ = null; 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); int from_bitField0_ = bitField0_; result.clusterName_ = clusterName_; if (endpointsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { endpoints_ = java.util.Collections.unmodifiableList(endpoints_); bitField0_ = (bitField0_ & ~0x00000001); } result.endpoints_ = endpoints_; } else { result.endpoints_ = endpointsBuilder_.build(); } result.namedEndpoints_ = internalGetNamedEndpoints(); result.namedEndpoints_.makeImmutable(); if (policyBuilder_ == null) { result.policy_ = policy_; } else { result.policy_ = policyBuilder_.build(); } onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof 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_; onChanged(); } if (endpointsBuilder_ == null) { if (!other.endpoints_.isEmpty()) { if (endpoints_.isEmpty()) { endpoints_ = other.endpoints_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureEndpointsIsMutable(); endpoints_.addAll(other.endpoints_); } onChanged(); } } else { if (!other.endpoints_.isEmpty()) { if (endpointsBuilder_.isEmpty()) { endpointsBuilder_.dispose(); endpointsBuilder_ = null; endpoints_ = other.endpoints_; bitField0_ = (bitField0_ & ~0x00000001); endpointsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEndpointsFieldBuilder() : null; } else { endpointsBuilder_.addAllMessages(other.endpoints_); } } } internalGetMutableNamedEndpoints().mergeFrom( other.internalGetNamedEndpoints()); if (other.hasPolicy()) { mergePolicy(other.getPolicy()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } 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; 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(); 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; onChanged(); return this; } private java.util.List endpoints_ = java.util.Collections.emptyList(); private void ensureEndpointsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { endpoints_ = new java.util.ArrayList(endpoints_); bitField0_ |= 0x00000001; } } 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 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_ & ~0x00000001); 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 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_ & 0x00000001) != 0), getParentForChildren(), isClean()); endpoints_ = null; } return endpointsBuilder_; } 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_; } private com.google.protobuf.MapField internalGetMutableNamedEndpoints() { onChanged();; if (namedEndpoints_ == null) { namedEndpoints_ = com.google.protobuf.MapField.newMapField( NamedEndpointsDefaultEntryHolder.defaultEntry); } if (!namedEndpoints_.isMutable()) { namedEndpoints_ = namedEndpoints_.copy(); } 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 io.envoyproxy.envoy.config.endpoint.v3.Endpoint getNamedEndpointsOrDefault( java.lang.String key, 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 Builder clearNamedEndpoints() { internalGetMutableNamedEndpoints().getMutableMap() .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().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableNamedEndpoints() { return internalGetMutableNamedEndpoints().getMutableMap(); } /** *
     * 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().getMutableMap() .put(key, value); 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) { internalGetMutableNamedEndpoints().getMutableMap() .putAll(values); return this; } 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 policyBuilder_ != null || policy_ != null; } /** *
     * 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; onChanged(); } else { policyBuilder_.setMessage(value); } 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(); onChanged(); } else { policyBuilder_.setMessage(builderForValue.build()); } 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 (policy_ != null) { policy_ = io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.newBuilder(policy_).mergeFrom(value).buildPartial(); } else { policy_ = value; } onChanged(); } else { policyBuilder_.mergeFrom(value); } return this; } /** *
     * Load balancing policy settings.
     * 
* * .envoy.config.endpoint.v3.ClusterLoadAssignment.Policy policy = 4; */ public Builder clearPolicy() { if (policyBuilder_ == null) { policy_ = null; onChanged(); } else { policy_ = null; policyBuilder_ = null; } 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() { 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 { return new ClusterLoadAssignment(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.envoyproxy.envoy.config.endpoint.v3.ClusterLoadAssignment getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy