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;
}
}