io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/config/endpoint/v3/endpoint_components.proto
// Protobuf Java Version: 3.25.5
package io.envoyproxy.envoy.config.endpoint.v3;
/**
*
* An Endpoint that Envoy can route traffic to.
* [#next-free-field: 6]
*
*
* Protobuf type {@code envoy.config.endpoint.v3.LbEndpoint}
*/
public final class LbEndpoint extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.endpoint.v3.LbEndpoint)
LbEndpointOrBuilder {
private static final long serialVersionUID = 0L;
// Use LbEndpoint.newBuilder() to construct.
private LbEndpoint(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LbEndpoint() {
healthStatus_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new LbEndpoint();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointComponentsProto.internal_static_envoy_config_endpoint_v3_LbEndpoint_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointComponentsProto.internal_static_envoy_config_endpoint_v3_LbEndpoint_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.class, io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.Builder.class);
}
private int bitField0_;
private int hostIdentifierCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object hostIdentifier_;
public enum HostIdentifierCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
ENDPOINT(1),
ENDPOINT_NAME(5),
HOSTIDENTIFIER_NOT_SET(0);
private final int value;
private HostIdentifierCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static HostIdentifierCase valueOf(int value) {
return forNumber(value);
}
public static HostIdentifierCase forNumber(int value) {
switch (value) {
case 1: return ENDPOINT;
case 5: return ENDPOINT_NAME;
case 0: return HOSTIDENTIFIER_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public HostIdentifierCase
getHostIdentifierCase() {
return HostIdentifierCase.forNumber(
hostIdentifierCase_);
}
public static final int ENDPOINT_FIELD_NUMBER = 1;
/**
* .envoy.config.endpoint.v3.Endpoint endpoint = 1;
* @return Whether the endpoint field is set.
*/
@java.lang.Override
public boolean hasEndpoint() {
return hostIdentifierCase_ == 1;
}
/**
* .envoy.config.endpoint.v3.Endpoint endpoint = 1;
* @return The endpoint.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.Endpoint getEndpoint() {
if (hostIdentifierCase_ == 1) {
return (io.envoyproxy.envoy.config.endpoint.v3.Endpoint) hostIdentifier_;
}
return io.envoyproxy.envoy.config.endpoint.v3.Endpoint.getDefaultInstance();
}
/**
* .envoy.config.endpoint.v3.Endpoint endpoint = 1;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.EndpointOrBuilder getEndpointOrBuilder() {
if (hostIdentifierCase_ == 1) {
return (io.envoyproxy.envoy.config.endpoint.v3.Endpoint) hostIdentifier_;
}
return io.envoyproxy.envoy.config.endpoint.v3.Endpoint.getDefaultInstance();
}
public static final int ENDPOINT_NAME_FIELD_NUMBER = 5;
/**
*
* [#not-implemented-hide:]
*
*
* string endpoint_name = 5;
* @return Whether the endpointName field is set.
*/
public boolean hasEndpointName() {
return hostIdentifierCase_ == 5;
}
/**
*
* [#not-implemented-hide:]
*
*
* string endpoint_name = 5;
* @return The endpointName.
*/
public java.lang.String getEndpointName() {
java.lang.Object ref = "";
if (hostIdentifierCase_ == 5) {
ref = hostIdentifier_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (hostIdentifierCase_ == 5) {
hostIdentifier_ = s;
}
return s;
}
}
/**
*
* [#not-implemented-hide:]
*
*
* string endpoint_name = 5;
* @return The bytes for endpointName.
*/
public com.google.protobuf.ByteString
getEndpointNameBytes() {
java.lang.Object ref = "";
if (hostIdentifierCase_ == 5) {
ref = hostIdentifier_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (hostIdentifierCase_ == 5) {
hostIdentifier_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int HEALTH_STATUS_FIELD_NUMBER = 2;
private int healthStatus_ = 0;
/**
*
* Optional health status when known and supplied by EDS server.
*
*
* .envoy.config.core.v3.HealthStatus health_status = 2;
* @return The enum numeric value on the wire for healthStatus.
*/
@java.lang.Override public int getHealthStatusValue() {
return healthStatus_;
}
/**
*
* Optional health status when known and supplied by EDS server.
*
*
* .envoy.config.core.v3.HealthStatus health_status = 2;
* @return The healthStatus.
*/
@java.lang.Override public io.envoyproxy.envoy.config.core.v3.HealthStatus getHealthStatus() {
io.envoyproxy.envoy.config.core.v3.HealthStatus result = io.envoyproxy.envoy.config.core.v3.HealthStatus.forNumber(healthStatus_);
return result == null ? io.envoyproxy.envoy.config.core.v3.HealthStatus.UNRECOGNIZED : result;
}
public static final int METADATA_FIELD_NUMBER = 3;
private io.envoyproxy.envoy.config.core.v3.Metadata metadata_;
/**
*
* The endpoint metadata specifies values that may be used by the load
* balancer to select endpoints in a cluster for a given request. The filter
* name should be specified as ``envoy.lb``. An example boolean key-value pair
* is ``canary``, providing the optional canary status of the upstream host.
* This may be matched against in a route's
* :ref:`RouteAction <envoy_v3_api_msg_config.route.v3.RouteAction>` metadata_match field
* to subset the endpoints considered in cluster load balancing.
*
*
* .envoy.config.core.v3.Metadata metadata = 3;
* @return Whether the metadata field is set.
*/
@java.lang.Override
public boolean hasMetadata() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The endpoint metadata specifies values that may be used by the load
* balancer to select endpoints in a cluster for a given request. The filter
* name should be specified as ``envoy.lb``. An example boolean key-value pair
* is ``canary``, providing the optional canary status of the upstream host.
* This may be matched against in a route's
* :ref:`RouteAction <envoy_v3_api_msg_config.route.v3.RouteAction>` metadata_match field
* to subset the endpoints considered in cluster load balancing.
*
*
* .envoy.config.core.v3.Metadata metadata = 3;
* @return The metadata.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.Metadata getMetadata() {
return metadata_ == null ? io.envoyproxy.envoy.config.core.v3.Metadata.getDefaultInstance() : metadata_;
}
/**
*
* The endpoint metadata specifies values that may be used by the load
* balancer to select endpoints in a cluster for a given request. The filter
* name should be specified as ``envoy.lb``. An example boolean key-value pair
* is ``canary``, providing the optional canary status of the upstream host.
* This may be matched against in a route's
* :ref:`RouteAction <envoy_v3_api_msg_config.route.v3.RouteAction>` metadata_match field
* to subset the endpoints considered in cluster load balancing.
*
*
* .envoy.config.core.v3.Metadata metadata = 3;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.MetadataOrBuilder getMetadataOrBuilder() {
return metadata_ == null ? io.envoyproxy.envoy.config.core.v3.Metadata.getDefaultInstance() : metadata_;
}
public static final int LOAD_BALANCING_WEIGHT_FIELD_NUMBER = 4;
private com.google.protobuf.UInt32Value loadBalancingWeight_;
/**
*
* The optional load balancing weight of the upstream host; at least 1.
* Envoy uses the load balancing weight in some of the built in load
* balancers. The load balancing weight for an endpoint is divided by the sum
* of the weights of all endpoints in the endpoint's locality to produce a
* percentage of traffic for the endpoint. This percentage is then further
* weighted by the endpoint's locality's load balancing weight from
* LocalityLbEndpoints. If unspecified, will be treated as 1. The sum
* of the weights of all endpoints in the endpoint's locality must not
* exceed uint32_t maximal value (4294967295).
*
*
* .google.protobuf.UInt32Value load_balancing_weight = 4 [(.validate.rules) = { ... }
* @return Whether the loadBalancingWeight field is set.
*/
@java.lang.Override
public boolean hasLoadBalancingWeight() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* The optional load balancing weight of the upstream host; at least 1.
* Envoy uses the load balancing weight in some of the built in load
* balancers. The load balancing weight for an endpoint is divided by the sum
* of the weights of all endpoints in the endpoint's locality to produce a
* percentage of traffic for the endpoint. This percentage is then further
* weighted by the endpoint's locality's load balancing weight from
* LocalityLbEndpoints. If unspecified, will be treated as 1. The sum
* of the weights of all endpoints in the endpoint's locality must not
* exceed uint32_t maximal value (4294967295).
*
*
* .google.protobuf.UInt32Value load_balancing_weight = 4 [(.validate.rules) = { ... }
* @return The loadBalancingWeight.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getLoadBalancingWeight() {
return loadBalancingWeight_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : loadBalancingWeight_;
}
/**
*
* The optional load balancing weight of the upstream host; at least 1.
* Envoy uses the load balancing weight in some of the built in load
* balancers. The load balancing weight for an endpoint is divided by the sum
* of the weights of all endpoints in the endpoint's locality to produce a
* percentage of traffic for the endpoint. This percentage is then further
* weighted by the endpoint's locality's load balancing weight from
* LocalityLbEndpoints. If unspecified, will be treated as 1. The sum
* of the weights of all endpoints in the endpoint's locality must not
* exceed uint32_t maximal value (4294967295).
*
*
* .google.protobuf.UInt32Value load_balancing_weight = 4 [(.validate.rules) = { ... }
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getLoadBalancingWeightOrBuilder() {
return loadBalancingWeight_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : loadBalancingWeight_;
}
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 (hostIdentifierCase_ == 1) {
output.writeMessage(1, (io.envoyproxy.envoy.config.endpoint.v3.Endpoint) hostIdentifier_);
}
if (healthStatus_ != io.envoyproxy.envoy.config.core.v3.HealthStatus.UNKNOWN.getNumber()) {
output.writeEnum(2, healthStatus_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(3, getMetadata());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(4, getLoadBalancingWeight());
}
if (hostIdentifierCase_ == 5) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, hostIdentifier_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (hostIdentifierCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (io.envoyproxy.envoy.config.endpoint.v3.Endpoint) hostIdentifier_);
}
if (healthStatus_ != io.envoyproxy.envoy.config.core.v3.HealthStatus.UNKNOWN.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, healthStatus_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getMetadata());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getLoadBalancingWeight());
}
if (hostIdentifierCase_ == 5) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, hostIdentifier_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint other = (io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint) obj;
if (healthStatus_ != other.healthStatus_) return false;
if (hasMetadata() != other.hasMetadata()) return false;
if (hasMetadata()) {
if (!getMetadata()
.equals(other.getMetadata())) return false;
}
if (hasLoadBalancingWeight() != other.hasLoadBalancingWeight()) return false;
if (hasLoadBalancingWeight()) {
if (!getLoadBalancingWeight()
.equals(other.getLoadBalancingWeight())) return false;
}
if (!getHostIdentifierCase().equals(other.getHostIdentifierCase())) return false;
switch (hostIdentifierCase_) {
case 1:
if (!getEndpoint()
.equals(other.getEndpoint())) return false;
break;
case 5:
if (!getEndpointName()
.equals(other.getEndpointName())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + HEALTH_STATUS_FIELD_NUMBER;
hash = (53 * hash) + healthStatus_;
if (hasMetadata()) {
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + getMetadata().hashCode();
}
if (hasLoadBalancingWeight()) {
hash = (37 * hash) + LOAD_BALANCING_WEIGHT_FIELD_NUMBER;
hash = (53 * hash) + getLoadBalancingWeight().hashCode();
}
switch (hostIdentifierCase_) {
case 1:
hash = (37 * hash) + ENDPOINT_FIELD_NUMBER;
hash = (53 * hash) + getEndpoint().hashCode();
break;
case 5:
hash = (37 * hash) + ENDPOINT_NAME_FIELD_NUMBER;
hash = (53 * hash) + getEndpointName().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint 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.LbEndpoint parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint 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.LbEndpoint parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint 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.LbEndpoint 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.LbEndpoint 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.LbEndpoint 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.LbEndpoint 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.LbEndpoint 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.LbEndpoint 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.LbEndpoint 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;
}
/**
*
* An Endpoint that Envoy can route traffic to.
* [#next-free-field: 6]
*
*
* Protobuf type {@code envoy.config.endpoint.v3.LbEndpoint}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.endpoint.v3.LbEndpoint)
io.envoyproxy.envoy.config.endpoint.v3.LbEndpointOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointComponentsProto.internal_static_envoy_config_endpoint_v3_LbEndpoint_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointComponentsProto.internal_static_envoy_config_endpoint_v3_LbEndpoint_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.class, io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getMetadataFieldBuilder();
getLoadBalancingWeightFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (endpointBuilder_ != null) {
endpointBuilder_.clear();
}
healthStatus_ = 0;
metadata_ = null;
if (metadataBuilder_ != null) {
metadataBuilder_.dispose();
metadataBuilder_ = null;
}
loadBalancingWeight_ = null;
if (loadBalancingWeightBuilder_ != null) {
loadBalancingWeightBuilder_.dispose();
loadBalancingWeightBuilder_ = null;
}
hostIdentifierCase_ = 0;
hostIdentifier_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointComponentsProto.internal_static_envoy_config_endpoint_v3_LbEndpoint_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint build() {
io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint buildPartial() {
io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint result = new io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.healthStatus_ = healthStatus_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000008) != 0)) {
result.metadata_ = metadataBuilder_ == null
? metadata_
: metadataBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.loadBalancingWeight_ = loadBalancingWeightBuilder_ == null
? loadBalancingWeight_
: loadBalancingWeightBuilder_.build();
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint result) {
result.hostIdentifierCase_ = hostIdentifierCase_;
result.hostIdentifier_ = this.hostIdentifier_;
if (hostIdentifierCase_ == 1 &&
endpointBuilder_ != null) {
result.hostIdentifier_ = endpointBuilder_.build();
}
}
@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.LbEndpoint) {
return mergeFrom((io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint other) {
if (other == io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.getDefaultInstance()) return this;
if (other.healthStatus_ != 0) {
setHealthStatusValue(other.getHealthStatusValue());
}
if (other.hasMetadata()) {
mergeMetadata(other.getMetadata());
}
if (other.hasLoadBalancingWeight()) {
mergeLoadBalancingWeight(other.getLoadBalancingWeight());
}
switch (other.getHostIdentifierCase()) {
case ENDPOINT: {
mergeEndpoint(other.getEndpoint());
break;
}
case ENDPOINT_NAME: {
hostIdentifierCase_ = 5;
hostIdentifier_ = other.hostIdentifier_;
onChanged();
break;
}
case HOSTIDENTIFIER_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
input.readMessage(
getEndpointFieldBuilder().getBuilder(),
extensionRegistry);
hostIdentifierCase_ = 1;
break;
} // case 10
case 16: {
healthStatus_ = input.readEnum();
bitField0_ |= 0x00000004;
break;
} // case 16
case 26: {
input.readMessage(
getMetadataFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 26
case 34: {
input.readMessage(
getLoadBalancingWeightFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 34
case 42: {
java.lang.String s = input.readStringRequireUtf8();
hostIdentifierCase_ = 5;
hostIdentifier_ = s;
break;
} // case 42
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int hostIdentifierCase_ = 0;
private java.lang.Object hostIdentifier_;
public HostIdentifierCase
getHostIdentifierCase() {
return HostIdentifierCase.forNumber(
hostIdentifierCase_);
}
public Builder clearHostIdentifier() {
hostIdentifierCase_ = 0;
hostIdentifier_ = null;
onChanged();
return this;
}
private int bitField0_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.Endpoint, io.envoyproxy.envoy.config.endpoint.v3.Endpoint.Builder, io.envoyproxy.envoy.config.endpoint.v3.EndpointOrBuilder> endpointBuilder_;
/**
* .envoy.config.endpoint.v3.Endpoint endpoint = 1;
* @return Whether the endpoint field is set.
*/
@java.lang.Override
public boolean hasEndpoint() {
return hostIdentifierCase_ == 1;
}
/**
* .envoy.config.endpoint.v3.Endpoint endpoint = 1;
* @return The endpoint.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.Endpoint getEndpoint() {
if (endpointBuilder_ == null) {
if (hostIdentifierCase_ == 1) {
return (io.envoyproxy.envoy.config.endpoint.v3.Endpoint) hostIdentifier_;
}
return io.envoyproxy.envoy.config.endpoint.v3.Endpoint.getDefaultInstance();
} else {
if (hostIdentifierCase_ == 1) {
return endpointBuilder_.getMessage();
}
return io.envoyproxy.envoy.config.endpoint.v3.Endpoint.getDefaultInstance();
}
}
/**
* .envoy.config.endpoint.v3.Endpoint endpoint = 1;
*/
public Builder setEndpoint(io.envoyproxy.envoy.config.endpoint.v3.Endpoint value) {
if (endpointBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
hostIdentifier_ = value;
onChanged();
} else {
endpointBuilder_.setMessage(value);
}
hostIdentifierCase_ = 1;
return this;
}
/**
* .envoy.config.endpoint.v3.Endpoint endpoint = 1;
*/
public Builder setEndpoint(
io.envoyproxy.envoy.config.endpoint.v3.Endpoint.Builder builderForValue) {
if (endpointBuilder_ == null) {
hostIdentifier_ = builderForValue.build();
onChanged();
} else {
endpointBuilder_.setMessage(builderForValue.build());
}
hostIdentifierCase_ = 1;
return this;
}
/**
* .envoy.config.endpoint.v3.Endpoint endpoint = 1;
*/
public Builder mergeEndpoint(io.envoyproxy.envoy.config.endpoint.v3.Endpoint value) {
if (endpointBuilder_ == null) {
if (hostIdentifierCase_ == 1 &&
hostIdentifier_ != io.envoyproxy.envoy.config.endpoint.v3.Endpoint.getDefaultInstance()) {
hostIdentifier_ = io.envoyproxy.envoy.config.endpoint.v3.Endpoint.newBuilder((io.envoyproxy.envoy.config.endpoint.v3.Endpoint) hostIdentifier_)
.mergeFrom(value).buildPartial();
} else {
hostIdentifier_ = value;
}
onChanged();
} else {
if (hostIdentifierCase_ == 1) {
endpointBuilder_.mergeFrom(value);
} else {
endpointBuilder_.setMessage(value);
}
}
hostIdentifierCase_ = 1;
return this;
}
/**
* .envoy.config.endpoint.v3.Endpoint endpoint = 1;
*/
public Builder clearEndpoint() {
if (endpointBuilder_ == null) {
if (hostIdentifierCase_ == 1) {
hostIdentifierCase_ = 0;
hostIdentifier_ = null;
onChanged();
}
} else {
if (hostIdentifierCase_ == 1) {
hostIdentifierCase_ = 0;
hostIdentifier_ = null;
}
endpointBuilder_.clear();
}
return this;
}
/**
* .envoy.config.endpoint.v3.Endpoint endpoint = 1;
*/
public io.envoyproxy.envoy.config.endpoint.v3.Endpoint.Builder getEndpointBuilder() {
return getEndpointFieldBuilder().getBuilder();
}
/**
* .envoy.config.endpoint.v3.Endpoint endpoint = 1;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.EndpointOrBuilder getEndpointOrBuilder() {
if ((hostIdentifierCase_ == 1) && (endpointBuilder_ != null)) {
return endpointBuilder_.getMessageOrBuilder();
} else {
if (hostIdentifierCase_ == 1) {
return (io.envoyproxy.envoy.config.endpoint.v3.Endpoint) hostIdentifier_;
}
return io.envoyproxy.envoy.config.endpoint.v3.Endpoint.getDefaultInstance();
}
}
/**
* .envoy.config.endpoint.v3.Endpoint endpoint = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.Endpoint, io.envoyproxy.envoy.config.endpoint.v3.Endpoint.Builder, io.envoyproxy.envoy.config.endpoint.v3.EndpointOrBuilder>
getEndpointFieldBuilder() {
if (endpointBuilder_ == null) {
if (!(hostIdentifierCase_ == 1)) {
hostIdentifier_ = io.envoyproxy.envoy.config.endpoint.v3.Endpoint.getDefaultInstance();
}
endpointBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.Endpoint, io.envoyproxy.envoy.config.endpoint.v3.Endpoint.Builder, io.envoyproxy.envoy.config.endpoint.v3.EndpointOrBuilder>(
(io.envoyproxy.envoy.config.endpoint.v3.Endpoint) hostIdentifier_,
getParentForChildren(),
isClean());
hostIdentifier_ = null;
}
hostIdentifierCase_ = 1;
onChanged();
return endpointBuilder_;
}
/**
*
* [#not-implemented-hide:]
*
*
* string endpoint_name = 5;
* @return Whether the endpointName field is set.
*/
@java.lang.Override
public boolean hasEndpointName() {
return hostIdentifierCase_ == 5;
}
/**
*
* [#not-implemented-hide:]
*
*
* string endpoint_name = 5;
* @return The endpointName.
*/
@java.lang.Override
public java.lang.String getEndpointName() {
java.lang.Object ref = "";
if (hostIdentifierCase_ == 5) {
ref = hostIdentifier_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (hostIdentifierCase_ == 5) {
hostIdentifier_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* [#not-implemented-hide:]
*
*
* string endpoint_name = 5;
* @return The bytes for endpointName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getEndpointNameBytes() {
java.lang.Object ref = "";
if (hostIdentifierCase_ == 5) {
ref = hostIdentifier_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (hostIdentifierCase_ == 5) {
hostIdentifier_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* [#not-implemented-hide:]
*
*
* string endpoint_name = 5;
* @param value The endpointName to set.
* @return This builder for chaining.
*/
public Builder setEndpointName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
hostIdentifierCase_ = 5;
hostIdentifier_ = value;
onChanged();
return this;
}
/**
*
* [#not-implemented-hide:]
*
*
* string endpoint_name = 5;
* @return This builder for chaining.
*/
public Builder clearEndpointName() {
if (hostIdentifierCase_ == 5) {
hostIdentifierCase_ = 0;
hostIdentifier_ = null;
onChanged();
}
return this;
}
/**
*
* [#not-implemented-hide:]
*
*
* string endpoint_name = 5;
* @param value The bytes for endpointName to set.
* @return This builder for chaining.
*/
public Builder setEndpointNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
hostIdentifierCase_ = 5;
hostIdentifier_ = value;
onChanged();
return this;
}
private int healthStatus_ = 0;
/**
*
* Optional health status when known and supplied by EDS server.
*
*
* .envoy.config.core.v3.HealthStatus health_status = 2;
* @return The enum numeric value on the wire for healthStatus.
*/
@java.lang.Override public int getHealthStatusValue() {
return healthStatus_;
}
/**
*
* Optional health status when known and supplied by EDS server.
*
*
* .envoy.config.core.v3.HealthStatus health_status = 2;
* @param value The enum numeric value on the wire for healthStatus to set.
* @return This builder for chaining.
*/
public Builder setHealthStatusValue(int value) {
healthStatus_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Optional health status when known and supplied by EDS server.
*
*
* .envoy.config.core.v3.HealthStatus health_status = 2;
* @return The healthStatus.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.HealthStatus getHealthStatus() {
io.envoyproxy.envoy.config.core.v3.HealthStatus result = io.envoyproxy.envoy.config.core.v3.HealthStatus.forNumber(healthStatus_);
return result == null ? io.envoyproxy.envoy.config.core.v3.HealthStatus.UNRECOGNIZED : result;
}
/**
*
* Optional health status when known and supplied by EDS server.
*
*
* .envoy.config.core.v3.HealthStatus health_status = 2;
* @param value The healthStatus to set.
* @return This builder for chaining.
*/
public Builder setHealthStatus(io.envoyproxy.envoy.config.core.v3.HealthStatus value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
healthStatus_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Optional health status when known and supplied by EDS server.
*
*
* .envoy.config.core.v3.HealthStatus health_status = 2;
* @return This builder for chaining.
*/
public Builder clearHealthStatus() {
bitField0_ = (bitField0_ & ~0x00000004);
healthStatus_ = 0;
onChanged();
return this;
}
private io.envoyproxy.envoy.config.core.v3.Metadata metadata_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.Metadata, io.envoyproxy.envoy.config.core.v3.Metadata.Builder, io.envoyproxy.envoy.config.core.v3.MetadataOrBuilder> metadataBuilder_;
/**
*
* The endpoint metadata specifies values that may be used by the load
* balancer to select endpoints in a cluster for a given request. The filter
* name should be specified as ``envoy.lb``. An example boolean key-value pair
* is ``canary``, providing the optional canary status of the upstream host.
* This may be matched against in a route's
* :ref:`RouteAction <envoy_v3_api_msg_config.route.v3.RouteAction>` metadata_match field
* to subset the endpoints considered in cluster load balancing.
*
*
* .envoy.config.core.v3.Metadata metadata = 3;
* @return Whether the metadata field is set.
*/
public boolean hasMetadata() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* The endpoint metadata specifies values that may be used by the load
* balancer to select endpoints in a cluster for a given request. The filter
* name should be specified as ``envoy.lb``. An example boolean key-value pair
* is ``canary``, providing the optional canary status of the upstream host.
* This may be matched against in a route's
* :ref:`RouteAction <envoy_v3_api_msg_config.route.v3.RouteAction>` metadata_match field
* to subset the endpoints considered in cluster load balancing.
*
*
* .envoy.config.core.v3.Metadata metadata = 3;
* @return The metadata.
*/
public io.envoyproxy.envoy.config.core.v3.Metadata getMetadata() {
if (metadataBuilder_ == null) {
return metadata_ == null ? io.envoyproxy.envoy.config.core.v3.Metadata.getDefaultInstance() : metadata_;
} else {
return metadataBuilder_.getMessage();
}
}
/**
*
* The endpoint metadata specifies values that may be used by the load
* balancer to select endpoints in a cluster for a given request. The filter
* name should be specified as ``envoy.lb``. An example boolean key-value pair
* is ``canary``, providing the optional canary status of the upstream host.
* This may be matched against in a route's
* :ref:`RouteAction <envoy_v3_api_msg_config.route.v3.RouteAction>` metadata_match field
* to subset the endpoints considered in cluster load balancing.
*
*
* .envoy.config.core.v3.Metadata metadata = 3;
*/
public Builder setMetadata(io.envoyproxy.envoy.config.core.v3.Metadata value) {
if (metadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
metadata_ = value;
} else {
metadataBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* The endpoint metadata specifies values that may be used by the load
* balancer to select endpoints in a cluster for a given request. The filter
* name should be specified as ``envoy.lb``. An example boolean key-value pair
* is ``canary``, providing the optional canary status of the upstream host.
* This may be matched against in a route's
* :ref:`RouteAction <envoy_v3_api_msg_config.route.v3.RouteAction>` metadata_match field
* to subset the endpoints considered in cluster load balancing.
*
*
* .envoy.config.core.v3.Metadata metadata = 3;
*/
public Builder setMetadata(
io.envoyproxy.envoy.config.core.v3.Metadata.Builder builderForValue) {
if (metadataBuilder_ == null) {
metadata_ = builderForValue.build();
} else {
metadataBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* The endpoint metadata specifies values that may be used by the load
* balancer to select endpoints in a cluster for a given request. The filter
* name should be specified as ``envoy.lb``. An example boolean key-value pair
* is ``canary``, providing the optional canary status of the upstream host.
* This may be matched against in a route's
* :ref:`RouteAction <envoy_v3_api_msg_config.route.v3.RouteAction>` metadata_match field
* to subset the endpoints considered in cluster load balancing.
*
*
* .envoy.config.core.v3.Metadata metadata = 3;
*/
public Builder mergeMetadata(io.envoyproxy.envoy.config.core.v3.Metadata value) {
if (metadataBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
metadata_ != null &&
metadata_ != io.envoyproxy.envoy.config.core.v3.Metadata.getDefaultInstance()) {
getMetadataBuilder().mergeFrom(value);
} else {
metadata_ = value;
}
} else {
metadataBuilder_.mergeFrom(value);
}
if (metadata_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
* The endpoint metadata specifies values that may be used by the load
* balancer to select endpoints in a cluster for a given request. The filter
* name should be specified as ``envoy.lb``. An example boolean key-value pair
* is ``canary``, providing the optional canary status of the upstream host.
* This may be matched against in a route's
* :ref:`RouteAction <envoy_v3_api_msg_config.route.v3.RouteAction>` metadata_match field
* to subset the endpoints considered in cluster load balancing.
*
*
* .envoy.config.core.v3.Metadata metadata = 3;
*/
public Builder clearMetadata() {
bitField0_ = (bitField0_ & ~0x00000008);
metadata_ = null;
if (metadataBuilder_ != null) {
metadataBuilder_.dispose();
metadataBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* The endpoint metadata specifies values that may be used by the load
* balancer to select endpoints in a cluster for a given request. The filter
* name should be specified as ``envoy.lb``. An example boolean key-value pair
* is ``canary``, providing the optional canary status of the upstream host.
* This may be matched against in a route's
* :ref:`RouteAction <envoy_v3_api_msg_config.route.v3.RouteAction>` metadata_match field
* to subset the endpoints considered in cluster load balancing.
*
*
* .envoy.config.core.v3.Metadata metadata = 3;
*/
public io.envoyproxy.envoy.config.core.v3.Metadata.Builder getMetadataBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getMetadataFieldBuilder().getBuilder();
}
/**
*
* The endpoint metadata specifies values that may be used by the load
* balancer to select endpoints in a cluster for a given request. The filter
* name should be specified as ``envoy.lb``. An example boolean key-value pair
* is ``canary``, providing the optional canary status of the upstream host.
* This may be matched against in a route's
* :ref:`RouteAction <envoy_v3_api_msg_config.route.v3.RouteAction>` metadata_match field
* to subset the endpoints considered in cluster load balancing.
*
*
* .envoy.config.core.v3.Metadata metadata = 3;
*/
public io.envoyproxy.envoy.config.core.v3.MetadataOrBuilder getMetadataOrBuilder() {
if (metadataBuilder_ != null) {
return metadataBuilder_.getMessageOrBuilder();
} else {
return metadata_ == null ?
io.envoyproxy.envoy.config.core.v3.Metadata.getDefaultInstance() : metadata_;
}
}
/**
*
* The endpoint metadata specifies values that may be used by the load
* balancer to select endpoints in a cluster for a given request. The filter
* name should be specified as ``envoy.lb``. An example boolean key-value pair
* is ``canary``, providing the optional canary status of the upstream host.
* This may be matched against in a route's
* :ref:`RouteAction <envoy_v3_api_msg_config.route.v3.RouteAction>` metadata_match field
* to subset the endpoints considered in cluster load balancing.
*
*
* .envoy.config.core.v3.Metadata metadata = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.Metadata, io.envoyproxy.envoy.config.core.v3.Metadata.Builder, io.envoyproxy.envoy.config.core.v3.MetadataOrBuilder>
getMetadataFieldBuilder() {
if (metadataBuilder_ == null) {
metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.Metadata, io.envoyproxy.envoy.config.core.v3.Metadata.Builder, io.envoyproxy.envoy.config.core.v3.MetadataOrBuilder>(
getMetadata(),
getParentForChildren(),
isClean());
metadata_ = null;
}
return metadataBuilder_;
}
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_;
/**
*
* The optional load balancing weight of the upstream host; at least 1.
* Envoy uses the load balancing weight in some of the built in load
* balancers. The load balancing weight for an endpoint is divided by the sum
* of the weights of all endpoints in the endpoint's locality to produce a
* percentage of traffic for the endpoint. This percentage is then further
* weighted by the endpoint's locality's load balancing weight from
* LocalityLbEndpoints. If unspecified, will be treated as 1. The sum
* of the weights of all endpoints in the endpoint's locality must not
* exceed uint32_t maximal value (4294967295).
*
*
* .google.protobuf.UInt32Value load_balancing_weight = 4 [(.validate.rules) = { ... }
* @return Whether the loadBalancingWeight field is set.
*/
public boolean hasLoadBalancingWeight() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* The optional load balancing weight of the upstream host; at least 1.
* Envoy uses the load balancing weight in some of the built in load
* balancers. The load balancing weight for an endpoint is divided by the sum
* of the weights of all endpoints in the endpoint's locality to produce a
* percentage of traffic for the endpoint. This percentage is then further
* weighted by the endpoint's locality's load balancing weight from
* LocalityLbEndpoints. If unspecified, will be treated as 1. The sum
* of the weights of all endpoints in the endpoint's locality must not
* exceed uint32_t maximal value (4294967295).
*
*
* .google.protobuf.UInt32Value load_balancing_weight = 4 [(.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();
}
}
/**
*
* The optional load balancing weight of the upstream host; at least 1.
* Envoy uses the load balancing weight in some of the built in load
* balancers. The load balancing weight for an endpoint is divided by the sum
* of the weights of all endpoints in the endpoint's locality to produce a
* percentage of traffic for the endpoint. This percentage is then further
* weighted by the endpoint's locality's load balancing weight from
* LocalityLbEndpoints. If unspecified, will be treated as 1. The sum
* of the weights of all endpoints in the endpoint's locality must not
* exceed uint32_t maximal value (4294967295).
*
*
* .google.protobuf.UInt32Value load_balancing_weight = 4 [(.validate.rules) = { ... }
*/
public Builder setLoadBalancingWeight(com.google.protobuf.UInt32Value value) {
if (loadBalancingWeightBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
loadBalancingWeight_ = value;
} else {
loadBalancingWeightBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* The optional load balancing weight of the upstream host; at least 1.
* Envoy uses the load balancing weight in some of the built in load
* balancers. The load balancing weight for an endpoint is divided by the sum
* of the weights of all endpoints in the endpoint's locality to produce a
* percentage of traffic for the endpoint. This percentage is then further
* weighted by the endpoint's locality's load balancing weight from
* LocalityLbEndpoints. If unspecified, will be treated as 1. The sum
* of the weights of all endpoints in the endpoint's locality must not
* exceed uint32_t maximal value (4294967295).
*
*
* .google.protobuf.UInt32Value load_balancing_weight = 4 [(.validate.rules) = { ... }
*/
public Builder setLoadBalancingWeight(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (loadBalancingWeightBuilder_ == null) {
loadBalancingWeight_ = builderForValue.build();
} else {
loadBalancingWeightBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* The optional load balancing weight of the upstream host; at least 1.
* Envoy uses the load balancing weight in some of the built in load
* balancers. The load balancing weight for an endpoint is divided by the sum
* of the weights of all endpoints in the endpoint's locality to produce a
* percentage of traffic for the endpoint. This percentage is then further
* weighted by the endpoint's locality's load balancing weight from
* LocalityLbEndpoints. If unspecified, will be treated as 1. The sum
* of the weights of all endpoints in the endpoint's locality must not
* exceed uint32_t maximal value (4294967295).
*
*
* .google.protobuf.UInt32Value load_balancing_weight = 4 [(.validate.rules) = { ... }
*/
public Builder mergeLoadBalancingWeight(com.google.protobuf.UInt32Value value) {
if (loadBalancingWeightBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0) &&
loadBalancingWeight_ != null &&
loadBalancingWeight_ != com.google.protobuf.UInt32Value.getDefaultInstance()) {
getLoadBalancingWeightBuilder().mergeFrom(value);
} else {
loadBalancingWeight_ = value;
}
} else {
loadBalancingWeightBuilder_.mergeFrom(value);
}
if (loadBalancingWeight_ != null) {
bitField0_ |= 0x00000010;
onChanged();
}
return this;
}
/**
*
* The optional load balancing weight of the upstream host; at least 1.
* Envoy uses the load balancing weight in some of the built in load
* balancers. The load balancing weight for an endpoint is divided by the sum
* of the weights of all endpoints in the endpoint's locality to produce a
* percentage of traffic for the endpoint. This percentage is then further
* weighted by the endpoint's locality's load balancing weight from
* LocalityLbEndpoints. If unspecified, will be treated as 1. The sum
* of the weights of all endpoints in the endpoint's locality must not
* exceed uint32_t maximal value (4294967295).
*
*
* .google.protobuf.UInt32Value load_balancing_weight = 4 [(.validate.rules) = { ... }
*/
public Builder clearLoadBalancingWeight() {
bitField0_ = (bitField0_ & ~0x00000010);
loadBalancingWeight_ = null;
if (loadBalancingWeightBuilder_ != null) {
loadBalancingWeightBuilder_.dispose();
loadBalancingWeightBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* The optional load balancing weight of the upstream host; at least 1.
* Envoy uses the load balancing weight in some of the built in load
* balancers. The load balancing weight for an endpoint is divided by the sum
* of the weights of all endpoints in the endpoint's locality to produce a
* percentage of traffic for the endpoint. This percentage is then further
* weighted by the endpoint's locality's load balancing weight from
* LocalityLbEndpoints. If unspecified, will be treated as 1. The sum
* of the weights of all endpoints in the endpoint's locality must not
* exceed uint32_t maximal value (4294967295).
*
*
* .google.protobuf.UInt32Value load_balancing_weight = 4 [(.validate.rules) = { ... }
*/
public com.google.protobuf.UInt32Value.Builder getLoadBalancingWeightBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getLoadBalancingWeightFieldBuilder().getBuilder();
}
/**
*
* The optional load balancing weight of the upstream host; at least 1.
* Envoy uses the load balancing weight in some of the built in load
* balancers. The load balancing weight for an endpoint is divided by the sum
* of the weights of all endpoints in the endpoint's locality to produce a
* percentage of traffic for the endpoint. This percentage is then further
* weighted by the endpoint's locality's load balancing weight from
* LocalityLbEndpoints. If unspecified, will be treated as 1. The sum
* of the weights of all endpoints in the endpoint's locality must not
* exceed uint32_t maximal value (4294967295).
*
*
* .google.protobuf.UInt32Value load_balancing_weight = 4 [(.validate.rules) = { ... }
*/
public com.google.protobuf.UInt32ValueOrBuilder getLoadBalancingWeightOrBuilder() {
if (loadBalancingWeightBuilder_ != null) {
return loadBalancingWeightBuilder_.getMessageOrBuilder();
} else {
return loadBalancingWeight_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : loadBalancingWeight_;
}
}
/**
*
* The optional load balancing weight of the upstream host; at least 1.
* Envoy uses the load balancing weight in some of the built in load
* balancers. The load balancing weight for an endpoint is divided by the sum
* of the weights of all endpoints in the endpoint's locality to produce a
* percentage of traffic for the endpoint. This percentage is then further
* weighted by the endpoint's locality's load balancing weight from
* LocalityLbEndpoints. If unspecified, will be treated as 1. The sum
* of the weights of all endpoints in the endpoint's locality must not
* exceed uint32_t maximal value (4294967295).
*
*
* .google.protobuf.UInt32Value load_balancing_weight = 4 [(.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_;
}
@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.LbEndpoint)
}
// @@protoc_insertion_point(class_scope:envoy.config.endpoint.v3.LbEndpoint)
private static final io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint();
}
public static io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LbEndpoint parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy