
io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/config/endpoint/v3/endpoint_components.proto
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();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private LbEndpoint(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
io.envoyproxy.envoy.config.endpoint.v3.Endpoint.Builder subBuilder = null;
if (hostIdentifierCase_ == 1) {
subBuilder = ((io.envoyproxy.envoy.config.endpoint.v3.Endpoint) hostIdentifier_).toBuilder();
}
hostIdentifier_ =
input.readMessage(io.envoyproxy.envoy.config.endpoint.v3.Endpoint.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.envoyproxy.envoy.config.endpoint.v3.Endpoint) hostIdentifier_);
hostIdentifier_ = subBuilder.buildPartial();
}
hostIdentifierCase_ = 1;
break;
}
case 16: {
int rawValue = input.readEnum();
healthStatus_ = rawValue;
break;
}
case 26: {
io.envoyproxy.envoy.config.core.v3.Metadata.Builder subBuilder = null;
if (metadata_ != null) {
subBuilder = metadata_.toBuilder();
}
metadata_ = input.readMessage(io.envoyproxy.envoy.config.core.v3.Metadata.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(metadata_);
metadata_ = subBuilder.buildPartial();
}
break;
}
case 34: {
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 42: {
java.lang.String s = input.readStringRequireUtf8();
hostIdentifierCase_ = 5;
hostIdentifier_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.endpoint.v3.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 hostIdentifierCase_ = 0;
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_;
/**
*
* 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() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.config.core.v3.HealthStatus result = io.envoyproxy.envoy.config.core.v3.HealthStatus.valueOf(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 metadata_ != null;
}
/**
*
* 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 getMetadata();
}
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 loadBalancingWeight_ != null;
}
/**
*
* 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 getLoadBalancingWeight();
}
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 (metadata_ != null) {
output.writeMessage(3, getMetadata());
}
if (loadBalancingWeight_ != null) {
output.writeMessage(4, getLoadBalancingWeight());
}
if (hostIdentifierCase_ == 5) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, hostIdentifier_);
}
unknownFields.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 (metadata_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getMetadata());
}
if (loadBalancingWeight_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getLoadBalancingWeight());
}
if (hostIdentifierCase_ == 5) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, hostIdentifier_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.config.endpoint.v3.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 (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + 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) + unknownFields.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) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
healthStatus_ = 0;
if (metadataBuilder_ == null) {
metadata_ = null;
} else {
metadata_ = null;
metadataBuilder_ = null;
}
if (loadBalancingWeightBuilder_ == null) {
loadBalancingWeight_ = null;
} else {
loadBalancingWeight_ = null;
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 (hostIdentifierCase_ == 1) {
if (endpointBuilder_ == null) {
result.hostIdentifier_ = hostIdentifier_;
} else {
result.hostIdentifier_ = endpointBuilder_.build();
}
}
if (hostIdentifierCase_ == 5) {
result.hostIdentifier_ = hostIdentifier_;
}
result.healthStatus_ = healthStatus_;
if (metadataBuilder_ == null) {
result.metadata_ = metadata_;
} else {
result.metadata_ = metadataBuilder_.build();
}
if (loadBalancingWeightBuilder_ == null) {
result.loadBalancingWeight_ = loadBalancingWeight_;
} else {
result.loadBalancingWeight_ = loadBalancingWeightBuilder_.build();
}
result.hostIdentifierCase_ = hostIdentifierCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.envoyproxy.envoy.config.endpoint.v3.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.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
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 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;
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() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.config.core.v3.HealthStatus result = io.envoyproxy.envoy.config.core.v3.HealthStatus.valueOf(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();
}
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() {
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 metadataBuilder_ != null || metadata_ != null;
}
/**
*
* 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;
onChanged();
} else {
metadataBuilder_.setMessage(value);
}
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();
onChanged();
} else {
metadataBuilder_.setMessage(builderForValue.build());
}
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 (metadata_ != null) {
metadata_ =
io.envoyproxy.envoy.config.core.v3.Metadata.newBuilder(metadata_).mergeFrom(value).buildPartial();
} else {
metadata_ = value;
}
onChanged();
} else {
metadataBuilder_.mergeFrom(value);
}
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() {
if (metadataBuilder_ == null) {
metadata_ = null;
onChanged();
} else {
metadata_ = null;
metadataBuilder_ = null;
}
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() {
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 loadBalancingWeightBuilder_ != null || loadBalancingWeight_ != null;
}
/**
*
* 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;
onChanged();
} else {
loadBalancingWeightBuilder_.setMessage(value);
}
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();
onChanged();
} else {
loadBalancingWeightBuilder_.setMessage(builderForValue.build());
}
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 (loadBalancingWeight_ != null) {
loadBalancingWeight_ =
com.google.protobuf.UInt32Value.newBuilder(loadBalancingWeight_).mergeFrom(value).buildPartial();
} else {
loadBalancingWeight_ = value;
}
onChanged();
} else {
loadBalancingWeightBuilder_.mergeFrom(value);
}
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() {
if (loadBalancingWeightBuilder_ == null) {
loadBalancingWeight_ = null;
onChanged();
} else {
loadBalancingWeight_ = null;
loadBalancingWeightBuilder_ = null;
}
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() {
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 {
return new LbEndpoint(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy