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

io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: envoy/api/v2/endpoint/endpoint_components.proto

package io.envoyproxy.envoy.api.v2.endpoint;

/**
 * 
 * A group of endpoints belonging to a Locality.
 * One can have multiple LocalityLbEndpoints for a locality, but this is
 * generally only done if the different groups need to have different load
 * balancing weights or different priorities.
 * [#next-free-field: 7]
 * 
* * Protobuf type {@code envoy.api.v2.endpoint.LocalityLbEndpoints} */ public final class LocalityLbEndpoints extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:envoy.api.v2.endpoint.LocalityLbEndpoints) LocalityLbEndpointsOrBuilder { private static final long serialVersionUID = 0L; // Use LocalityLbEndpoints.newBuilder() to construct. private LocalityLbEndpoints(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private LocalityLbEndpoints() { lbEndpoints_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new LocalityLbEndpoints(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private LocalityLbEndpoints( 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: { io.envoyproxy.envoy.api.v2.core.Locality.Builder subBuilder = null; if (locality_ != null) { subBuilder = locality_.toBuilder(); } locality_ = input.readMessage(io.envoyproxy.envoy.api.v2.core.Locality.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(locality_); locality_ = subBuilder.buildPartial(); } break; } case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { lbEndpoints_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } lbEndpoints_.add( input.readMessage(io.envoyproxy.envoy.api.v2.endpoint.LbEndpoint.parser(), extensionRegistry)); break; } case 26: { com.google.protobuf.UInt32Value.Builder subBuilder = null; if (loadBalancingWeight_ != null) { subBuilder = loadBalancingWeight_.toBuilder(); } loadBalancingWeight_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(loadBalancingWeight_); loadBalancingWeight_ = subBuilder.buildPartial(); } break; } case 40: { priority_ = input.readUInt32(); break; } case 50: { com.google.protobuf.UInt32Value.Builder subBuilder = null; if (proximity_ != null) { subBuilder = proximity_.toBuilder(); } proximity_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(proximity_); proximity_ = 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)) { lbEndpoints_ = java.util.Collections.unmodifiableList(lbEndpoints_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.api.v2.endpoint.EndpointComponentsProto.internal_static_envoy_api_v2_endpoint_LocalityLbEndpoints_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.api.v2.endpoint.EndpointComponentsProto.internal_static_envoy_api_v2_endpoint_LocalityLbEndpoints_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints.class, io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints.Builder.class); } public static final int LOCALITY_FIELD_NUMBER = 1; private io.envoyproxy.envoy.api.v2.core.Locality locality_; /** *
   * Identifies location of where the upstream hosts run.
   * 
* * .envoy.api.v2.core.Locality locality = 1; * @return Whether the locality field is set. */ @java.lang.Override public boolean hasLocality() { return locality_ != null; } /** *
   * Identifies location of where the upstream hosts run.
   * 
* * .envoy.api.v2.core.Locality locality = 1; * @return The locality. */ @java.lang.Override public io.envoyproxy.envoy.api.v2.core.Locality getLocality() { return locality_ == null ? io.envoyproxy.envoy.api.v2.core.Locality.getDefaultInstance() : locality_; } /** *
   * Identifies location of where the upstream hosts run.
   * 
* * .envoy.api.v2.core.Locality locality = 1; */ @java.lang.Override public io.envoyproxy.envoy.api.v2.core.LocalityOrBuilder getLocalityOrBuilder() { return getLocality(); } public static final int LB_ENDPOINTS_FIELD_NUMBER = 2; private java.util.List lbEndpoints_; /** *
   * The group of endpoints belonging to the locality specified.
   * 
* * repeated .envoy.api.v2.endpoint.LbEndpoint lb_endpoints = 2; */ @java.lang.Override public java.util.List getLbEndpointsList() { return lbEndpoints_; } /** *
   * The group of endpoints belonging to the locality specified.
   * 
* * repeated .envoy.api.v2.endpoint.LbEndpoint lb_endpoints = 2; */ @java.lang.Override public java.util.List getLbEndpointsOrBuilderList() { return lbEndpoints_; } /** *
   * The group of endpoints belonging to the locality specified.
   * 
* * repeated .envoy.api.v2.endpoint.LbEndpoint lb_endpoints = 2; */ @java.lang.Override public int getLbEndpointsCount() { return lbEndpoints_.size(); } /** *
   * The group of endpoints belonging to the locality specified.
   * 
* * repeated .envoy.api.v2.endpoint.LbEndpoint lb_endpoints = 2; */ @java.lang.Override public io.envoyproxy.envoy.api.v2.endpoint.LbEndpoint getLbEndpoints(int index) { return lbEndpoints_.get(index); } /** *
   * The group of endpoints belonging to the locality specified.
   * 
* * repeated .envoy.api.v2.endpoint.LbEndpoint lb_endpoints = 2; */ @java.lang.Override public io.envoyproxy.envoy.api.v2.endpoint.LbEndpointOrBuilder getLbEndpointsOrBuilder( int index) { return lbEndpoints_.get(index); } public static final int LOAD_BALANCING_WEIGHT_FIELD_NUMBER = 3; private com.google.protobuf.UInt32Value loadBalancingWeight_; /** *
   * Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
   * balancing weight for a locality is divided by the sum of the weights of all
   * localities  at the same priority level to produce the effective percentage
   * of traffic for the locality. The sum of the weights of all localities at
   * the same priority level must not exceed uint32_t maximal value (4294967295).
   * Locality weights are only considered when :ref:`locality weighted load
   * balancing <arch_overview_load_balancing_locality_weighted_lb>` is
   * configured. These weights are ignored otherwise. If no weights are
   * specified when locality weighted load balancing is enabled, the locality is
   * assigned no load.
   * 
* * .google.protobuf.UInt32Value load_balancing_weight = 3 [(.validate.rules) = { ... } * @return Whether the loadBalancingWeight field is set. */ @java.lang.Override public boolean hasLoadBalancingWeight() { return loadBalancingWeight_ != null; } /** *
   * Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
   * balancing weight for a locality is divided by the sum of the weights of all
   * localities  at the same priority level to produce the effective percentage
   * of traffic for the locality. The sum of the weights of all localities at
   * the same priority level must not exceed uint32_t maximal value (4294967295).
   * Locality weights are only considered when :ref:`locality weighted load
   * balancing <arch_overview_load_balancing_locality_weighted_lb>` is
   * configured. These weights are ignored otherwise. If no weights are
   * specified when locality weighted load balancing is enabled, the locality is
   * assigned no load.
   * 
* * .google.protobuf.UInt32Value load_balancing_weight = 3 [(.validate.rules) = { ... } * @return The loadBalancingWeight. */ @java.lang.Override public com.google.protobuf.UInt32Value getLoadBalancingWeight() { return loadBalancingWeight_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : loadBalancingWeight_; } /** *
   * Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
   * balancing weight for a locality is divided by the sum of the weights of all
   * localities  at the same priority level to produce the effective percentage
   * of traffic for the locality. The sum of the weights of all localities at
   * the same priority level must not exceed uint32_t maximal value (4294967295).
   * Locality weights are only considered when :ref:`locality weighted load
   * balancing <arch_overview_load_balancing_locality_weighted_lb>` is
   * configured. These weights are ignored otherwise. If no weights are
   * specified when locality weighted load balancing is enabled, the locality is
   * assigned no load.
   * 
* * .google.protobuf.UInt32Value load_balancing_weight = 3 [(.validate.rules) = { ... } */ @java.lang.Override public com.google.protobuf.UInt32ValueOrBuilder getLoadBalancingWeightOrBuilder() { return getLoadBalancingWeight(); } public static final int PRIORITY_FIELD_NUMBER = 5; private int priority_; /** *
   * Optional: the priority for this LocalityLbEndpoints. If unspecified this will
   * default to the highest priority (0).
   * Under usual circumstances, Envoy will only select endpoints for the highest
   * priority (0). In the event all endpoints for a particular priority are
   * unavailable/unhealthy, Envoy will fail over to selecting endpoints for the
   * next highest priority group.
   * Priorities should range from 0 (highest) to N (lowest) without skipping.
   * 
* * uint32 priority = 5 [(.validate.rules) = { ... } * @return The priority. */ @java.lang.Override public int getPriority() { return priority_; } public static final int PROXIMITY_FIELD_NUMBER = 6; private com.google.protobuf.UInt32Value proximity_; /** *
   * Optional: Per locality proximity value which indicates how close this
   * locality is from the source locality. This value only provides ordering
   * information (lower the value, closer it is to the source locality).
   * This will be consumed by load balancing schemes that need proximity order
   * to determine where to route the requests.
   * [#not-implemented-hide:]
   * 
* * .google.protobuf.UInt32Value proximity = 6; * @return Whether the proximity field is set. */ @java.lang.Override public boolean hasProximity() { return proximity_ != null; } /** *
   * Optional: Per locality proximity value which indicates how close this
   * locality is from the source locality. This value only provides ordering
   * information (lower the value, closer it is to the source locality).
   * This will be consumed by load balancing schemes that need proximity order
   * to determine where to route the requests.
   * [#not-implemented-hide:]
   * 
* * .google.protobuf.UInt32Value proximity = 6; * @return The proximity. */ @java.lang.Override public com.google.protobuf.UInt32Value getProximity() { return proximity_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : proximity_; } /** *
   * Optional: Per locality proximity value which indicates how close this
   * locality is from the source locality. This value only provides ordering
   * information (lower the value, closer it is to the source locality).
   * This will be consumed by load balancing schemes that need proximity order
   * to determine where to route the requests.
   * [#not-implemented-hide:]
   * 
* * .google.protobuf.UInt32Value proximity = 6; */ @java.lang.Override public com.google.protobuf.UInt32ValueOrBuilder getProximityOrBuilder() { return getProximity(); } 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 (locality_ != null) { output.writeMessage(1, getLocality()); } for (int i = 0; i < lbEndpoints_.size(); i++) { output.writeMessage(2, lbEndpoints_.get(i)); } if (loadBalancingWeight_ != null) { output.writeMessage(3, getLoadBalancingWeight()); } if (priority_ != 0) { output.writeUInt32(5, priority_); } if (proximity_ != null) { output.writeMessage(6, getProximity()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (locality_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getLocality()); } for (int i = 0; i < lbEndpoints_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, lbEndpoints_.get(i)); } if (loadBalancingWeight_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getLoadBalancingWeight()); } if (priority_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(5, priority_); } if (proximity_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, getProximity()); } 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.api.v2.endpoint.LocalityLbEndpoints)) { return super.equals(obj); } io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints other = (io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints) obj; if (hasLocality() != other.hasLocality()) return false; if (hasLocality()) { if (!getLocality() .equals(other.getLocality())) return false; } if (!getLbEndpointsList() .equals(other.getLbEndpointsList())) return false; if (hasLoadBalancingWeight() != other.hasLoadBalancingWeight()) return false; if (hasLoadBalancingWeight()) { if (!getLoadBalancingWeight() .equals(other.getLoadBalancingWeight())) return false; } if (getPriority() != other.getPriority()) return false; if (hasProximity() != other.hasProximity()) return false; if (hasProximity()) { if (!getProximity() .equals(other.getProximity())) 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 (hasLocality()) { hash = (37 * hash) + LOCALITY_FIELD_NUMBER; hash = (53 * hash) + getLocality().hashCode(); } if (getLbEndpointsCount() > 0) { hash = (37 * hash) + LB_ENDPOINTS_FIELD_NUMBER; hash = (53 * hash) + getLbEndpointsList().hashCode(); } if (hasLoadBalancingWeight()) { hash = (37 * hash) + LOAD_BALANCING_WEIGHT_FIELD_NUMBER; hash = (53 * hash) + getLoadBalancingWeight().hashCode(); } hash = (37 * hash) + PRIORITY_FIELD_NUMBER; hash = (53 * hash) + getPriority(); if (hasProximity()) { hash = (37 * hash) + PROXIMITY_FIELD_NUMBER; hash = (53 * hash) + getProximity().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints 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.api.v2.endpoint.LocalityLbEndpoints parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints 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.api.v2.endpoint.LocalityLbEndpoints parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints 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.api.v2.endpoint.LocalityLbEndpoints parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints 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.api.v2.endpoint.LocalityLbEndpoints parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints 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.api.v2.endpoint.LocalityLbEndpoints prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * A group of endpoints belonging to a Locality.
   * One can have multiple LocalityLbEndpoints for a locality, but this is
   * generally only done if the different groups need to have different load
   * balancing weights or different priorities.
   * [#next-free-field: 7]
   * 
* * Protobuf type {@code envoy.api.v2.endpoint.LocalityLbEndpoints} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:envoy.api.v2.endpoint.LocalityLbEndpoints) io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpointsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.api.v2.endpoint.EndpointComponentsProto.internal_static_envoy_api_v2_endpoint_LocalityLbEndpoints_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.api.v2.endpoint.EndpointComponentsProto.internal_static_envoy_api_v2_endpoint_LocalityLbEndpoints_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints.class, io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints.Builder.class); } // Construct using io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getLbEndpointsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); if (localityBuilder_ == null) { locality_ = null; } else { locality_ = null; localityBuilder_ = null; } if (lbEndpointsBuilder_ == null) { lbEndpoints_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { lbEndpointsBuilder_.clear(); } if (loadBalancingWeightBuilder_ == null) { loadBalancingWeight_ = null; } else { loadBalancingWeight_ = null; loadBalancingWeightBuilder_ = null; } priority_ = 0; if (proximityBuilder_ == null) { proximity_ = null; } else { proximity_ = null; proximityBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.envoyproxy.envoy.api.v2.endpoint.EndpointComponentsProto.internal_static_envoy_api_v2_endpoint_LocalityLbEndpoints_descriptor; } @java.lang.Override public io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints getDefaultInstanceForType() { return io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints.getDefaultInstance(); } @java.lang.Override public io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints build() { io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints buildPartial() { io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints result = new io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints(this); int from_bitField0_ = bitField0_; if (localityBuilder_ == null) { result.locality_ = locality_; } else { result.locality_ = localityBuilder_.build(); } if (lbEndpointsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { lbEndpoints_ = java.util.Collections.unmodifiableList(lbEndpoints_); bitField0_ = (bitField0_ & ~0x00000001); } result.lbEndpoints_ = lbEndpoints_; } else { result.lbEndpoints_ = lbEndpointsBuilder_.build(); } if (loadBalancingWeightBuilder_ == null) { result.loadBalancingWeight_ = loadBalancingWeight_; } else { result.loadBalancingWeight_ = loadBalancingWeightBuilder_.build(); } result.priority_ = priority_; if (proximityBuilder_ == null) { result.proximity_ = proximity_; } else { result.proximity_ = proximityBuilder_.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.api.v2.endpoint.LocalityLbEndpoints) { return mergeFrom((io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints other) { if (other == io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints.getDefaultInstance()) return this; if (other.hasLocality()) { mergeLocality(other.getLocality()); } if (lbEndpointsBuilder_ == null) { if (!other.lbEndpoints_.isEmpty()) { if (lbEndpoints_.isEmpty()) { lbEndpoints_ = other.lbEndpoints_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureLbEndpointsIsMutable(); lbEndpoints_.addAll(other.lbEndpoints_); } onChanged(); } } else { if (!other.lbEndpoints_.isEmpty()) { if (lbEndpointsBuilder_.isEmpty()) { lbEndpointsBuilder_.dispose(); lbEndpointsBuilder_ = null; lbEndpoints_ = other.lbEndpoints_; bitField0_ = (bitField0_ & ~0x00000001); lbEndpointsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLbEndpointsFieldBuilder() : null; } else { lbEndpointsBuilder_.addAllMessages(other.lbEndpoints_); } } } if (other.hasLoadBalancingWeight()) { mergeLoadBalancingWeight(other.getLoadBalancingWeight()); } if (other.getPriority() != 0) { setPriority(other.getPriority()); } if (other.hasProximity()) { mergeProximity(other.getProximity()); } 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.api.v2.endpoint.LocalityLbEndpoints parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private io.envoyproxy.envoy.api.v2.core.Locality locality_; private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.api.v2.core.Locality, io.envoyproxy.envoy.api.v2.core.Locality.Builder, io.envoyproxy.envoy.api.v2.core.LocalityOrBuilder> localityBuilder_; /** *
     * Identifies location of where the upstream hosts run.
     * 
* * .envoy.api.v2.core.Locality locality = 1; * @return Whether the locality field is set. */ public boolean hasLocality() { return localityBuilder_ != null || locality_ != null; } /** *
     * Identifies location of where the upstream hosts run.
     * 
* * .envoy.api.v2.core.Locality locality = 1; * @return The locality. */ public io.envoyproxy.envoy.api.v2.core.Locality getLocality() { if (localityBuilder_ == null) { return locality_ == null ? io.envoyproxy.envoy.api.v2.core.Locality.getDefaultInstance() : locality_; } else { return localityBuilder_.getMessage(); } } /** *
     * Identifies location of where the upstream hosts run.
     * 
* * .envoy.api.v2.core.Locality locality = 1; */ public Builder setLocality(io.envoyproxy.envoy.api.v2.core.Locality value) { if (localityBuilder_ == null) { if (value == null) { throw new NullPointerException(); } locality_ = value; onChanged(); } else { localityBuilder_.setMessage(value); } return this; } /** *
     * Identifies location of where the upstream hosts run.
     * 
* * .envoy.api.v2.core.Locality locality = 1; */ public Builder setLocality( io.envoyproxy.envoy.api.v2.core.Locality.Builder builderForValue) { if (localityBuilder_ == null) { locality_ = builderForValue.build(); onChanged(); } else { localityBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * Identifies location of where the upstream hosts run.
     * 
* * .envoy.api.v2.core.Locality locality = 1; */ public Builder mergeLocality(io.envoyproxy.envoy.api.v2.core.Locality value) { if (localityBuilder_ == null) { if (locality_ != null) { locality_ = io.envoyproxy.envoy.api.v2.core.Locality.newBuilder(locality_).mergeFrom(value).buildPartial(); } else { locality_ = value; } onChanged(); } else { localityBuilder_.mergeFrom(value); } return this; } /** *
     * Identifies location of where the upstream hosts run.
     * 
* * .envoy.api.v2.core.Locality locality = 1; */ public Builder clearLocality() { if (localityBuilder_ == null) { locality_ = null; onChanged(); } else { locality_ = null; localityBuilder_ = null; } return this; } /** *
     * Identifies location of where the upstream hosts run.
     * 
* * .envoy.api.v2.core.Locality locality = 1; */ public io.envoyproxy.envoy.api.v2.core.Locality.Builder getLocalityBuilder() { onChanged(); return getLocalityFieldBuilder().getBuilder(); } /** *
     * Identifies location of where the upstream hosts run.
     * 
* * .envoy.api.v2.core.Locality locality = 1; */ public io.envoyproxy.envoy.api.v2.core.LocalityOrBuilder getLocalityOrBuilder() { if (localityBuilder_ != null) { return localityBuilder_.getMessageOrBuilder(); } else { return locality_ == null ? io.envoyproxy.envoy.api.v2.core.Locality.getDefaultInstance() : locality_; } } /** *
     * Identifies location of where the upstream hosts run.
     * 
* * .envoy.api.v2.core.Locality locality = 1; */ private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.api.v2.core.Locality, io.envoyproxy.envoy.api.v2.core.Locality.Builder, io.envoyproxy.envoy.api.v2.core.LocalityOrBuilder> getLocalityFieldBuilder() { if (localityBuilder_ == null) { localityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.api.v2.core.Locality, io.envoyproxy.envoy.api.v2.core.Locality.Builder, io.envoyproxy.envoy.api.v2.core.LocalityOrBuilder>( getLocality(), getParentForChildren(), isClean()); locality_ = null; } return localityBuilder_; } private java.util.List lbEndpoints_ = java.util.Collections.emptyList(); private void ensureLbEndpointsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { lbEndpoints_ = new java.util.ArrayList(lbEndpoints_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.api.v2.endpoint.LbEndpoint, io.envoyproxy.envoy.api.v2.endpoint.LbEndpoint.Builder, io.envoyproxy.envoy.api.v2.endpoint.LbEndpointOrBuilder> lbEndpointsBuilder_; /** *
     * The group of endpoints belonging to the locality specified.
     * 
* * repeated .envoy.api.v2.endpoint.LbEndpoint lb_endpoints = 2; */ public java.util.List getLbEndpointsList() { if (lbEndpointsBuilder_ == null) { return java.util.Collections.unmodifiableList(lbEndpoints_); } else { return lbEndpointsBuilder_.getMessageList(); } } /** *
     * The group of endpoints belonging to the locality specified.
     * 
* * repeated .envoy.api.v2.endpoint.LbEndpoint lb_endpoints = 2; */ public int getLbEndpointsCount() { if (lbEndpointsBuilder_ == null) { return lbEndpoints_.size(); } else { return lbEndpointsBuilder_.getCount(); } } /** *
     * The group of endpoints belonging to the locality specified.
     * 
* * repeated .envoy.api.v2.endpoint.LbEndpoint lb_endpoints = 2; */ public io.envoyproxy.envoy.api.v2.endpoint.LbEndpoint getLbEndpoints(int index) { if (lbEndpointsBuilder_ == null) { return lbEndpoints_.get(index); } else { return lbEndpointsBuilder_.getMessage(index); } } /** *
     * The group of endpoints belonging to the locality specified.
     * 
* * repeated .envoy.api.v2.endpoint.LbEndpoint lb_endpoints = 2; */ public Builder setLbEndpoints( int index, io.envoyproxy.envoy.api.v2.endpoint.LbEndpoint value) { if (lbEndpointsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLbEndpointsIsMutable(); lbEndpoints_.set(index, value); onChanged(); } else { lbEndpointsBuilder_.setMessage(index, value); } return this; } /** *
     * The group of endpoints belonging to the locality specified.
     * 
* * repeated .envoy.api.v2.endpoint.LbEndpoint lb_endpoints = 2; */ public Builder setLbEndpoints( int index, io.envoyproxy.envoy.api.v2.endpoint.LbEndpoint.Builder builderForValue) { if (lbEndpointsBuilder_ == null) { ensureLbEndpointsIsMutable(); lbEndpoints_.set(index, builderForValue.build()); onChanged(); } else { lbEndpointsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * The group of endpoints belonging to the locality specified.
     * 
* * repeated .envoy.api.v2.endpoint.LbEndpoint lb_endpoints = 2; */ public Builder addLbEndpoints(io.envoyproxy.envoy.api.v2.endpoint.LbEndpoint value) { if (lbEndpointsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLbEndpointsIsMutable(); lbEndpoints_.add(value); onChanged(); } else { lbEndpointsBuilder_.addMessage(value); } return this; } /** *
     * The group of endpoints belonging to the locality specified.
     * 
* * repeated .envoy.api.v2.endpoint.LbEndpoint lb_endpoints = 2; */ public Builder addLbEndpoints( int index, io.envoyproxy.envoy.api.v2.endpoint.LbEndpoint value) { if (lbEndpointsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLbEndpointsIsMutable(); lbEndpoints_.add(index, value); onChanged(); } else { lbEndpointsBuilder_.addMessage(index, value); } return this; } /** *
     * The group of endpoints belonging to the locality specified.
     * 
* * repeated .envoy.api.v2.endpoint.LbEndpoint lb_endpoints = 2; */ public Builder addLbEndpoints( io.envoyproxy.envoy.api.v2.endpoint.LbEndpoint.Builder builderForValue) { if (lbEndpointsBuilder_ == null) { ensureLbEndpointsIsMutable(); lbEndpoints_.add(builderForValue.build()); onChanged(); } else { lbEndpointsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * The group of endpoints belonging to the locality specified.
     * 
* * repeated .envoy.api.v2.endpoint.LbEndpoint lb_endpoints = 2; */ public Builder addLbEndpoints( int index, io.envoyproxy.envoy.api.v2.endpoint.LbEndpoint.Builder builderForValue) { if (lbEndpointsBuilder_ == null) { ensureLbEndpointsIsMutable(); lbEndpoints_.add(index, builderForValue.build()); onChanged(); } else { lbEndpointsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * The group of endpoints belonging to the locality specified.
     * 
* * repeated .envoy.api.v2.endpoint.LbEndpoint lb_endpoints = 2; */ public Builder addAllLbEndpoints( java.lang.Iterable values) { if (lbEndpointsBuilder_ == null) { ensureLbEndpointsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, lbEndpoints_); onChanged(); } else { lbEndpointsBuilder_.addAllMessages(values); } return this; } /** *
     * The group of endpoints belonging to the locality specified.
     * 
* * repeated .envoy.api.v2.endpoint.LbEndpoint lb_endpoints = 2; */ public Builder clearLbEndpoints() { if (lbEndpointsBuilder_ == null) { lbEndpoints_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { lbEndpointsBuilder_.clear(); } return this; } /** *
     * The group of endpoints belonging to the locality specified.
     * 
* * repeated .envoy.api.v2.endpoint.LbEndpoint lb_endpoints = 2; */ public Builder removeLbEndpoints(int index) { if (lbEndpointsBuilder_ == null) { ensureLbEndpointsIsMutable(); lbEndpoints_.remove(index); onChanged(); } else { lbEndpointsBuilder_.remove(index); } return this; } /** *
     * The group of endpoints belonging to the locality specified.
     * 
* * repeated .envoy.api.v2.endpoint.LbEndpoint lb_endpoints = 2; */ public io.envoyproxy.envoy.api.v2.endpoint.LbEndpoint.Builder getLbEndpointsBuilder( int index) { return getLbEndpointsFieldBuilder().getBuilder(index); } /** *
     * The group of endpoints belonging to the locality specified.
     * 
* * repeated .envoy.api.v2.endpoint.LbEndpoint lb_endpoints = 2; */ public io.envoyproxy.envoy.api.v2.endpoint.LbEndpointOrBuilder getLbEndpointsOrBuilder( int index) { if (lbEndpointsBuilder_ == null) { return lbEndpoints_.get(index); } else { return lbEndpointsBuilder_.getMessageOrBuilder(index); } } /** *
     * The group of endpoints belonging to the locality specified.
     * 
* * repeated .envoy.api.v2.endpoint.LbEndpoint lb_endpoints = 2; */ public java.util.List getLbEndpointsOrBuilderList() { if (lbEndpointsBuilder_ != null) { return lbEndpointsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(lbEndpoints_); } } /** *
     * The group of endpoints belonging to the locality specified.
     * 
* * repeated .envoy.api.v2.endpoint.LbEndpoint lb_endpoints = 2; */ public io.envoyproxy.envoy.api.v2.endpoint.LbEndpoint.Builder addLbEndpointsBuilder() { return getLbEndpointsFieldBuilder().addBuilder( io.envoyproxy.envoy.api.v2.endpoint.LbEndpoint.getDefaultInstance()); } /** *
     * The group of endpoints belonging to the locality specified.
     * 
* * repeated .envoy.api.v2.endpoint.LbEndpoint lb_endpoints = 2; */ public io.envoyproxy.envoy.api.v2.endpoint.LbEndpoint.Builder addLbEndpointsBuilder( int index) { return getLbEndpointsFieldBuilder().addBuilder( index, io.envoyproxy.envoy.api.v2.endpoint.LbEndpoint.getDefaultInstance()); } /** *
     * The group of endpoints belonging to the locality specified.
     * 
* * repeated .envoy.api.v2.endpoint.LbEndpoint lb_endpoints = 2; */ public java.util.List getLbEndpointsBuilderList() { return getLbEndpointsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.api.v2.endpoint.LbEndpoint, io.envoyproxy.envoy.api.v2.endpoint.LbEndpoint.Builder, io.envoyproxy.envoy.api.v2.endpoint.LbEndpointOrBuilder> getLbEndpointsFieldBuilder() { if (lbEndpointsBuilder_ == null) { lbEndpointsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.envoyproxy.envoy.api.v2.endpoint.LbEndpoint, io.envoyproxy.envoy.api.v2.endpoint.LbEndpoint.Builder, io.envoyproxy.envoy.api.v2.endpoint.LbEndpointOrBuilder>( lbEndpoints_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); lbEndpoints_ = null; } return lbEndpointsBuilder_; } private com.google.protobuf.UInt32Value loadBalancingWeight_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> loadBalancingWeightBuilder_; /** *
     * Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
     * balancing weight for a locality is divided by the sum of the weights of all
     * localities  at the same priority level to produce the effective percentage
     * of traffic for the locality. The sum of the weights of all localities at
     * the same priority level must not exceed uint32_t maximal value (4294967295).
     * Locality weights are only considered when :ref:`locality weighted load
     * balancing <arch_overview_load_balancing_locality_weighted_lb>` is
     * configured. These weights are ignored otherwise. If no weights are
     * specified when locality weighted load balancing is enabled, the locality is
     * assigned no load.
     * 
* * .google.protobuf.UInt32Value load_balancing_weight = 3 [(.validate.rules) = { ... } * @return Whether the loadBalancingWeight field is set. */ public boolean hasLoadBalancingWeight() { return loadBalancingWeightBuilder_ != null || loadBalancingWeight_ != null; } /** *
     * Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
     * balancing weight for a locality is divided by the sum of the weights of all
     * localities  at the same priority level to produce the effective percentage
     * of traffic for the locality. The sum of the weights of all localities at
     * the same priority level must not exceed uint32_t maximal value (4294967295).
     * Locality weights are only considered when :ref:`locality weighted load
     * balancing <arch_overview_load_balancing_locality_weighted_lb>` is
     * configured. These weights are ignored otherwise. If no weights are
     * specified when locality weighted load balancing is enabled, the locality is
     * assigned no load.
     * 
* * .google.protobuf.UInt32Value load_balancing_weight = 3 [(.validate.rules) = { ... } * @return The loadBalancingWeight. */ public com.google.protobuf.UInt32Value getLoadBalancingWeight() { if (loadBalancingWeightBuilder_ == null) { return loadBalancingWeight_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : loadBalancingWeight_; } else { return loadBalancingWeightBuilder_.getMessage(); } } /** *
     * Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
     * balancing weight for a locality is divided by the sum of the weights of all
     * localities  at the same priority level to produce the effective percentage
     * of traffic for the locality. The sum of the weights of all localities at
     * the same priority level must not exceed uint32_t maximal value (4294967295).
     * Locality weights are only considered when :ref:`locality weighted load
     * balancing <arch_overview_load_balancing_locality_weighted_lb>` is
     * configured. These weights are ignored otherwise. If no weights are
     * specified when locality weighted load balancing is enabled, the locality is
     * assigned no load.
     * 
* * .google.protobuf.UInt32Value load_balancing_weight = 3 [(.validate.rules) = { ... } */ public Builder setLoadBalancingWeight(com.google.protobuf.UInt32Value value) { if (loadBalancingWeightBuilder_ == null) { if (value == null) { throw new NullPointerException(); } loadBalancingWeight_ = value; onChanged(); } else { loadBalancingWeightBuilder_.setMessage(value); } return this; } /** *
     * Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
     * balancing weight for a locality is divided by the sum of the weights of all
     * localities  at the same priority level to produce the effective percentage
     * of traffic for the locality. The sum of the weights of all localities at
     * the same priority level must not exceed uint32_t maximal value (4294967295).
     * Locality weights are only considered when :ref:`locality weighted load
     * balancing <arch_overview_load_balancing_locality_weighted_lb>` is
     * configured. These weights are ignored otherwise. If no weights are
     * specified when locality weighted load balancing is enabled, the locality is
     * assigned no load.
     * 
* * .google.protobuf.UInt32Value load_balancing_weight = 3 [(.validate.rules) = { ... } */ public Builder setLoadBalancingWeight( com.google.protobuf.UInt32Value.Builder builderForValue) { if (loadBalancingWeightBuilder_ == null) { loadBalancingWeight_ = builderForValue.build(); onChanged(); } else { loadBalancingWeightBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
     * balancing weight for a locality is divided by the sum of the weights of all
     * localities  at the same priority level to produce the effective percentage
     * of traffic for the locality. The sum of the weights of all localities at
     * the same priority level must not exceed uint32_t maximal value (4294967295).
     * Locality weights are only considered when :ref:`locality weighted load
     * balancing <arch_overview_load_balancing_locality_weighted_lb>` is
     * configured. These weights are ignored otherwise. If no weights are
     * specified when locality weighted load balancing is enabled, the locality is
     * assigned no load.
     * 
* * .google.protobuf.UInt32Value load_balancing_weight = 3 [(.validate.rules) = { ... } */ public Builder mergeLoadBalancingWeight(com.google.protobuf.UInt32Value value) { if (loadBalancingWeightBuilder_ == null) { if (loadBalancingWeight_ != null) { loadBalancingWeight_ = com.google.protobuf.UInt32Value.newBuilder(loadBalancingWeight_).mergeFrom(value).buildPartial(); } else { loadBalancingWeight_ = value; } onChanged(); } else { loadBalancingWeightBuilder_.mergeFrom(value); } return this; } /** *
     * Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
     * balancing weight for a locality is divided by the sum of the weights of all
     * localities  at the same priority level to produce the effective percentage
     * of traffic for the locality. The sum of the weights of all localities at
     * the same priority level must not exceed uint32_t maximal value (4294967295).
     * Locality weights are only considered when :ref:`locality weighted load
     * balancing <arch_overview_load_balancing_locality_weighted_lb>` is
     * configured. These weights are ignored otherwise. If no weights are
     * specified when locality weighted load balancing is enabled, the locality is
     * assigned no load.
     * 
* * .google.protobuf.UInt32Value load_balancing_weight = 3 [(.validate.rules) = { ... } */ public Builder clearLoadBalancingWeight() { if (loadBalancingWeightBuilder_ == null) { loadBalancingWeight_ = null; onChanged(); } else { loadBalancingWeight_ = null; loadBalancingWeightBuilder_ = null; } return this; } /** *
     * Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
     * balancing weight for a locality is divided by the sum of the weights of all
     * localities  at the same priority level to produce the effective percentage
     * of traffic for the locality. The sum of the weights of all localities at
     * the same priority level must not exceed uint32_t maximal value (4294967295).
     * Locality weights are only considered when :ref:`locality weighted load
     * balancing <arch_overview_load_balancing_locality_weighted_lb>` is
     * configured. These weights are ignored otherwise. If no weights are
     * specified when locality weighted load balancing is enabled, the locality is
     * assigned no load.
     * 
* * .google.protobuf.UInt32Value load_balancing_weight = 3 [(.validate.rules) = { ... } */ public com.google.protobuf.UInt32Value.Builder getLoadBalancingWeightBuilder() { onChanged(); return getLoadBalancingWeightFieldBuilder().getBuilder(); } /** *
     * Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
     * balancing weight for a locality is divided by the sum of the weights of all
     * localities  at the same priority level to produce the effective percentage
     * of traffic for the locality. The sum of the weights of all localities at
     * the same priority level must not exceed uint32_t maximal value (4294967295).
     * Locality weights are only considered when :ref:`locality weighted load
     * balancing <arch_overview_load_balancing_locality_weighted_lb>` is
     * configured. These weights are ignored otherwise. If no weights are
     * specified when locality weighted load balancing is enabled, the locality is
     * assigned no load.
     * 
* * .google.protobuf.UInt32Value load_balancing_weight = 3 [(.validate.rules) = { ... } */ public com.google.protobuf.UInt32ValueOrBuilder getLoadBalancingWeightOrBuilder() { if (loadBalancingWeightBuilder_ != null) { return loadBalancingWeightBuilder_.getMessageOrBuilder(); } else { return loadBalancingWeight_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : loadBalancingWeight_; } } /** *
     * Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
     * balancing weight for a locality is divided by the sum of the weights of all
     * localities  at the same priority level to produce the effective percentage
     * of traffic for the locality. The sum of the weights of all localities at
     * the same priority level must not exceed uint32_t maximal value (4294967295).
     * Locality weights are only considered when :ref:`locality weighted load
     * balancing <arch_overview_load_balancing_locality_weighted_lb>` is
     * configured. These weights are ignored otherwise. If no weights are
     * specified when locality weighted load balancing is enabled, the locality is
     * assigned no load.
     * 
* * .google.protobuf.UInt32Value load_balancing_weight = 3 [(.validate.rules) = { ... } */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> getLoadBalancingWeightFieldBuilder() { if (loadBalancingWeightBuilder_ == null) { loadBalancingWeightBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>( getLoadBalancingWeight(), getParentForChildren(), isClean()); loadBalancingWeight_ = null; } return loadBalancingWeightBuilder_; } private int priority_ ; /** *
     * Optional: the priority for this LocalityLbEndpoints. If unspecified this will
     * default to the highest priority (0).
     * Under usual circumstances, Envoy will only select endpoints for the highest
     * priority (0). In the event all endpoints for a particular priority are
     * unavailable/unhealthy, Envoy will fail over to selecting endpoints for the
     * next highest priority group.
     * Priorities should range from 0 (highest) to N (lowest) without skipping.
     * 
* * uint32 priority = 5 [(.validate.rules) = { ... } * @return The priority. */ @java.lang.Override public int getPriority() { return priority_; } /** *
     * Optional: the priority for this LocalityLbEndpoints. If unspecified this will
     * default to the highest priority (0).
     * Under usual circumstances, Envoy will only select endpoints for the highest
     * priority (0). In the event all endpoints for a particular priority are
     * unavailable/unhealthy, Envoy will fail over to selecting endpoints for the
     * next highest priority group.
     * Priorities should range from 0 (highest) to N (lowest) without skipping.
     * 
* * uint32 priority = 5 [(.validate.rules) = { ... } * @param value The priority to set. * @return This builder for chaining. */ public Builder setPriority(int value) { priority_ = value; onChanged(); return this; } /** *
     * Optional: the priority for this LocalityLbEndpoints. If unspecified this will
     * default to the highest priority (0).
     * Under usual circumstances, Envoy will only select endpoints for the highest
     * priority (0). In the event all endpoints for a particular priority are
     * unavailable/unhealthy, Envoy will fail over to selecting endpoints for the
     * next highest priority group.
     * Priorities should range from 0 (highest) to N (lowest) without skipping.
     * 
* * uint32 priority = 5 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearPriority() { priority_ = 0; onChanged(); return this; } private com.google.protobuf.UInt32Value proximity_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> proximityBuilder_; /** *
     * Optional: Per locality proximity value which indicates how close this
     * locality is from the source locality. This value only provides ordering
     * information (lower the value, closer it is to the source locality).
     * This will be consumed by load balancing schemes that need proximity order
     * to determine where to route the requests.
     * [#not-implemented-hide:]
     * 
* * .google.protobuf.UInt32Value proximity = 6; * @return Whether the proximity field is set. */ public boolean hasProximity() { return proximityBuilder_ != null || proximity_ != null; } /** *
     * Optional: Per locality proximity value which indicates how close this
     * locality is from the source locality. This value only provides ordering
     * information (lower the value, closer it is to the source locality).
     * This will be consumed by load balancing schemes that need proximity order
     * to determine where to route the requests.
     * [#not-implemented-hide:]
     * 
* * .google.protobuf.UInt32Value proximity = 6; * @return The proximity. */ public com.google.protobuf.UInt32Value getProximity() { if (proximityBuilder_ == null) { return proximity_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : proximity_; } else { return proximityBuilder_.getMessage(); } } /** *
     * Optional: Per locality proximity value which indicates how close this
     * locality is from the source locality. This value only provides ordering
     * information (lower the value, closer it is to the source locality).
     * This will be consumed by load balancing schemes that need proximity order
     * to determine where to route the requests.
     * [#not-implemented-hide:]
     * 
* * .google.protobuf.UInt32Value proximity = 6; */ public Builder setProximity(com.google.protobuf.UInt32Value value) { if (proximityBuilder_ == null) { if (value == null) { throw new NullPointerException(); } proximity_ = value; onChanged(); } else { proximityBuilder_.setMessage(value); } return this; } /** *
     * Optional: Per locality proximity value which indicates how close this
     * locality is from the source locality. This value only provides ordering
     * information (lower the value, closer it is to the source locality).
     * This will be consumed by load balancing schemes that need proximity order
     * to determine where to route the requests.
     * [#not-implemented-hide:]
     * 
* * .google.protobuf.UInt32Value proximity = 6; */ public Builder setProximity( com.google.protobuf.UInt32Value.Builder builderForValue) { if (proximityBuilder_ == null) { proximity_ = builderForValue.build(); onChanged(); } else { proximityBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * Optional: Per locality proximity value which indicates how close this
     * locality is from the source locality. This value only provides ordering
     * information (lower the value, closer it is to the source locality).
     * This will be consumed by load balancing schemes that need proximity order
     * to determine where to route the requests.
     * [#not-implemented-hide:]
     * 
* * .google.protobuf.UInt32Value proximity = 6; */ public Builder mergeProximity(com.google.protobuf.UInt32Value value) { if (proximityBuilder_ == null) { if (proximity_ != null) { proximity_ = com.google.protobuf.UInt32Value.newBuilder(proximity_).mergeFrom(value).buildPartial(); } else { proximity_ = value; } onChanged(); } else { proximityBuilder_.mergeFrom(value); } return this; } /** *
     * Optional: Per locality proximity value which indicates how close this
     * locality is from the source locality. This value only provides ordering
     * information (lower the value, closer it is to the source locality).
     * This will be consumed by load balancing schemes that need proximity order
     * to determine where to route the requests.
     * [#not-implemented-hide:]
     * 
* * .google.protobuf.UInt32Value proximity = 6; */ public Builder clearProximity() { if (proximityBuilder_ == null) { proximity_ = null; onChanged(); } else { proximity_ = null; proximityBuilder_ = null; } return this; } /** *
     * Optional: Per locality proximity value which indicates how close this
     * locality is from the source locality. This value only provides ordering
     * information (lower the value, closer it is to the source locality).
     * This will be consumed by load balancing schemes that need proximity order
     * to determine where to route the requests.
     * [#not-implemented-hide:]
     * 
* * .google.protobuf.UInt32Value proximity = 6; */ public com.google.protobuf.UInt32Value.Builder getProximityBuilder() { onChanged(); return getProximityFieldBuilder().getBuilder(); } /** *
     * Optional: Per locality proximity value which indicates how close this
     * locality is from the source locality. This value only provides ordering
     * information (lower the value, closer it is to the source locality).
     * This will be consumed by load balancing schemes that need proximity order
     * to determine where to route the requests.
     * [#not-implemented-hide:]
     * 
* * .google.protobuf.UInt32Value proximity = 6; */ public com.google.protobuf.UInt32ValueOrBuilder getProximityOrBuilder() { if (proximityBuilder_ != null) { return proximityBuilder_.getMessageOrBuilder(); } else { return proximity_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : proximity_; } } /** *
     * Optional: Per locality proximity value which indicates how close this
     * locality is from the source locality. This value only provides ordering
     * information (lower the value, closer it is to the source locality).
     * This will be consumed by load balancing schemes that need proximity order
     * to determine where to route the requests.
     * [#not-implemented-hide:]
     * 
* * .google.protobuf.UInt32Value proximity = 6; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> getProximityFieldBuilder() { if (proximityBuilder_ == null) { proximityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>( getProximity(), getParentForChildren(), isClean()); proximity_ = null; } return proximityBuilder_; } @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.api.v2.endpoint.LocalityLbEndpoints) } // @@protoc_insertion_point(class_scope:envoy.api.v2.endpoint.LocalityLbEndpoints) private static final io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints(); } public static io.envoyproxy.envoy.api.v2.endpoint.LocalityLbEndpoints getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public LocalityLbEndpoints parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new LocalityLbEndpoints(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.api.v2.endpoint.LocalityLbEndpoints getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy