io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints 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;
/**
*
* A group of endpoints belonging to a Locality.
* One can have multiple LocalityLbEndpoints for a locality, but only if
* they have different priorities.
* [#next-free-field: 10]
*
*
* Protobuf type {@code envoy.config.endpoint.v3.LocalityLbEndpoints}
*/
public final class LocalityLbEndpoints extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.endpoint.v3.LocalityLbEndpoints)
LocalityLbEndpointsOrBuilder {
private static final long serialVersionUID = 0L;
// Use LocalityLbEndpoints.newBuilder() to construct.
private LocalityLbEndpoints(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LocalityLbEndpoints() {
lbEndpoints_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new LocalityLbEndpoints();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointComponentsProto.internal_static_envoy_config_endpoint_v3_LocalityLbEndpoints_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_LocalityLbEndpoints_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.class, io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.Builder.class);
}
public interface LbEndpointListOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
java.util.List
getLbEndpointsList();
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint getLbEndpoints(int index);
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
int getLbEndpointsCount();
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
java.util.List extends io.envoyproxy.envoy.config.endpoint.v3.LbEndpointOrBuilder>
getLbEndpointsOrBuilderList();
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
io.envoyproxy.envoy.config.endpoint.v3.LbEndpointOrBuilder getLbEndpointsOrBuilder(
int index);
}
/**
*
* [#not-implemented-hide:]
* A list of endpoints of a specific locality.
*
*
* Protobuf type {@code envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList}
*/
public static final class LbEndpointList extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList)
LbEndpointListOrBuilder {
private static final long serialVersionUID = 0L;
// Use LbEndpointList.newBuilder() to construct.
private LbEndpointList(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LbEndpointList() {
lbEndpoints_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new LbEndpointList();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointComponentsProto.internal_static_envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_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_LocalityLbEndpoints_LbEndpointList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList.class, io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList.Builder.class);
}
public static final int LB_ENDPOINTS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List lbEndpoints_;
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
@java.lang.Override
public java.util.List getLbEndpointsList() {
return lbEndpoints_;
}
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
@java.lang.Override
public java.util.List extends io.envoyproxy.envoy.config.endpoint.v3.LbEndpointOrBuilder>
getLbEndpointsOrBuilderList() {
return lbEndpoints_;
}
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
@java.lang.Override
public int getLbEndpointsCount() {
return lbEndpoints_.size();
}
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint getLbEndpoints(int index) {
return lbEndpoints_.get(index);
}
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LbEndpointOrBuilder getLbEndpointsOrBuilder(
int index) {
return lbEndpoints_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < lbEndpoints_.size(); i++) {
output.writeMessage(1, lbEndpoints_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < lbEndpoints_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, lbEndpoints_.get(i));
}
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.LocalityLbEndpoints.LbEndpointList)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList other = (io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList) obj;
if (!getLbEndpointsList()
.equals(other.getLbEndpointsList())) return false;
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();
if (getLbEndpointsCount() > 0) {
hash = (37 * hash) + LB_ENDPOINTS_FIELD_NUMBER;
hash = (53 * hash) + getLbEndpointsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList 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.LocalityLbEndpoints.LbEndpointList parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList 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.LocalityLbEndpoints.LbEndpointList parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList 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.LocalityLbEndpoints.LbEndpointList 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.LocalityLbEndpoints.LbEndpointList 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.LocalityLbEndpoints.LbEndpointList 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.LocalityLbEndpoints.LbEndpointList 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.LocalityLbEndpoints.LbEndpointList 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.LocalityLbEndpoints.LbEndpointList 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.LocalityLbEndpoints.LbEndpointList prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* [#not-implemented-hide:]
* A list of endpoints of a specific locality.
*
*
* Protobuf type {@code envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList)
io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointListOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointComponentsProto.internal_static_envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList_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_LocalityLbEndpoints_LbEndpointList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList.class, io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (lbEndpointsBuilder_ == null) {
lbEndpoints_ = java.util.Collections.emptyList();
} else {
lbEndpoints_ = null;
lbEndpointsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
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_LocalityLbEndpoints_LbEndpointList_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList build() {
io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList buildPartial() {
io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList result = new io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList result) {
if (lbEndpointsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
lbEndpoints_ = java.util.Collections.unmodifiableList(lbEndpoints_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.lbEndpoints_ = lbEndpoints_;
} else {
result.lbEndpoints_ = lbEndpointsBuilder_.build();
}
}
private void buildPartial0(io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList result) {
int from_bitField0_ = bitField0_;
}
@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.LocalityLbEndpoints.LbEndpointList) {
return mergeFrom((io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList other) {
if (other == io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList.getDefaultInstance()) return this;
if (lbEndpointsBuilder_ == null) {
if (!other.lbEndpoints_.isEmpty()) {
if (lbEndpoints_.isEmpty()) {
lbEndpoints_ = other.lbEndpoints_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureLbEndpointsIsMutable();
lbEndpoints_.addAll(other.lbEndpoints_);
}
onChanged();
}
} else {
if (!other.lbEndpoints_.isEmpty()) {
if (lbEndpointsBuilder_.isEmpty()) {
lbEndpointsBuilder_.dispose();
lbEndpointsBuilder_ = null;
lbEndpoints_ = other.lbEndpoints_;
bitField0_ = (bitField0_ & ~0x00000001);
lbEndpointsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getLbEndpointsFieldBuilder() : null;
} else {
lbEndpointsBuilder_.addAllMessages(other.lbEndpoints_);
}
}
}
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: {
io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint m =
input.readMessage(
io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.parser(),
extensionRegistry);
if (lbEndpointsBuilder_ == null) {
ensureLbEndpointsIsMutable();
lbEndpoints_.add(m);
} else {
lbEndpointsBuilder_.addMessage(m);
}
break;
} // case 10
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 bitField0_;
private java.util.List lbEndpoints_ =
java.util.Collections.emptyList();
private void ensureLbEndpointsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
lbEndpoints_ = new java.util.ArrayList(lbEndpoints_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint, io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.Builder, io.envoyproxy.envoy.config.endpoint.v3.LbEndpointOrBuilder> lbEndpointsBuilder_;
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
public java.util.List getLbEndpointsList() {
if (lbEndpointsBuilder_ == null) {
return java.util.Collections.unmodifiableList(lbEndpoints_);
} else {
return lbEndpointsBuilder_.getMessageList();
}
}
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
public int getLbEndpointsCount() {
if (lbEndpointsBuilder_ == null) {
return lbEndpoints_.size();
} else {
return lbEndpointsBuilder_.getCount();
}
}
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
public io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint getLbEndpoints(int index) {
if (lbEndpointsBuilder_ == null) {
return lbEndpoints_.get(index);
} else {
return lbEndpointsBuilder_.getMessage(index);
}
}
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
public Builder setLbEndpoints(
int index, io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint value) {
if (lbEndpointsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLbEndpointsIsMutable();
lbEndpoints_.set(index, value);
onChanged();
} else {
lbEndpointsBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
public Builder setLbEndpoints(
int index, io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.Builder builderForValue) {
if (lbEndpointsBuilder_ == null) {
ensureLbEndpointsIsMutable();
lbEndpoints_.set(index, builderForValue.build());
onChanged();
} else {
lbEndpointsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
public Builder addLbEndpoints(io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint value) {
if (lbEndpointsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLbEndpointsIsMutable();
lbEndpoints_.add(value);
onChanged();
} else {
lbEndpointsBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
public Builder addLbEndpoints(
int index, io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint value) {
if (lbEndpointsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLbEndpointsIsMutable();
lbEndpoints_.add(index, value);
onChanged();
} else {
lbEndpointsBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
public Builder addLbEndpoints(
io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.Builder builderForValue) {
if (lbEndpointsBuilder_ == null) {
ensureLbEndpointsIsMutable();
lbEndpoints_.add(builderForValue.build());
onChanged();
} else {
lbEndpointsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
public Builder addLbEndpoints(
int index, io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.Builder builderForValue) {
if (lbEndpointsBuilder_ == null) {
ensureLbEndpointsIsMutable();
lbEndpoints_.add(index, builderForValue.build());
onChanged();
} else {
lbEndpointsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
public Builder addAllLbEndpoints(
java.lang.Iterable extends io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint> values) {
if (lbEndpointsBuilder_ == null) {
ensureLbEndpointsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, lbEndpoints_);
onChanged();
} else {
lbEndpointsBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
public Builder clearLbEndpoints() {
if (lbEndpointsBuilder_ == null) {
lbEndpoints_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
lbEndpointsBuilder_.clear();
}
return this;
}
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
public Builder removeLbEndpoints(int index) {
if (lbEndpointsBuilder_ == null) {
ensureLbEndpointsIsMutable();
lbEndpoints_.remove(index);
onChanged();
} else {
lbEndpointsBuilder_.remove(index);
}
return this;
}
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
public io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.Builder getLbEndpointsBuilder(
int index) {
return getLbEndpointsFieldBuilder().getBuilder(index);
}
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
public io.envoyproxy.envoy.config.endpoint.v3.LbEndpointOrBuilder getLbEndpointsOrBuilder(
int index) {
if (lbEndpointsBuilder_ == null) {
return lbEndpoints_.get(index); } else {
return lbEndpointsBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
public java.util.List extends io.envoyproxy.envoy.config.endpoint.v3.LbEndpointOrBuilder>
getLbEndpointsOrBuilderList() {
if (lbEndpointsBuilder_ != null) {
return lbEndpointsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(lbEndpoints_);
}
}
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
public io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.Builder addLbEndpointsBuilder() {
return getLbEndpointsFieldBuilder().addBuilder(
io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.getDefaultInstance());
}
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
public io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.Builder addLbEndpointsBuilder(
int index) {
return getLbEndpointsFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.getDefaultInstance());
}
/**
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 1;
*/
public java.util.List
getLbEndpointsBuilderList() {
return getLbEndpointsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint, io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.Builder, io.envoyproxy.envoy.config.endpoint.v3.LbEndpointOrBuilder>
getLbEndpointsFieldBuilder() {
if (lbEndpointsBuilder_ == null) {
lbEndpointsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint, io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.Builder, io.envoyproxy.envoy.config.endpoint.v3.LbEndpointOrBuilder>(
lbEndpoints_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
lbEndpoints_ = null;
}
return lbEndpointsBuilder_;
}
@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.LocalityLbEndpoints.LbEndpointList)
}
// @@protoc_insertion_point(class_scope:envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList)
private static final io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList();
}
public static io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LbEndpointList 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.LocalityLbEndpoints.LbEndpointList getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
private int lbConfigCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object lbConfig_;
public enum LbConfigCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
LOAD_BALANCER_ENDPOINTS(7),
LEDS_CLUSTER_LOCALITY_CONFIG(8),
LBCONFIG_NOT_SET(0);
private final int value;
private LbConfigCase(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 LbConfigCase valueOf(int value) {
return forNumber(value);
}
public static LbConfigCase forNumber(int value) {
switch (value) {
case 7: return LOAD_BALANCER_ENDPOINTS;
case 8: return LEDS_CLUSTER_LOCALITY_CONFIG;
case 0: return LBCONFIG_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public LbConfigCase
getLbConfigCase() {
return LbConfigCase.forNumber(
lbConfigCase_);
}
public static final int LOCALITY_FIELD_NUMBER = 1;
private io.envoyproxy.envoy.config.core.v3.Locality locality_;
/**
*
* Identifies location of where the upstream hosts run.
*
*
* .envoy.config.core.v3.Locality locality = 1;
* @return Whether the locality field is set.
*/
@java.lang.Override
public boolean hasLocality() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Identifies location of where the upstream hosts run.
*
*
* .envoy.config.core.v3.Locality locality = 1;
* @return The locality.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.Locality getLocality() {
return locality_ == null ? io.envoyproxy.envoy.config.core.v3.Locality.getDefaultInstance() : locality_;
}
/**
*
* Identifies location of where the upstream hosts run.
*
*
* .envoy.config.core.v3.Locality locality = 1;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.LocalityOrBuilder getLocalityOrBuilder() {
return locality_ == null ? io.envoyproxy.envoy.config.core.v3.Locality.getDefaultInstance() : locality_;
}
public static final int METADATA_FIELD_NUMBER = 9;
private io.envoyproxy.envoy.config.core.v3.Metadata metadata_;
/**
*
* Metadata to provide additional information about the locality endpoints in aggregate.
*
*
* .envoy.config.core.v3.Metadata metadata = 9;
* @return Whether the metadata field is set.
*/
@java.lang.Override
public boolean hasMetadata() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Metadata to provide additional information about the locality endpoints in aggregate.
*
*
* .envoy.config.core.v3.Metadata metadata = 9;
* @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_;
}
/**
*
* Metadata to provide additional information about the locality endpoints in aggregate.
*
*
* .envoy.config.core.v3.Metadata metadata = 9;
*/
@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 LB_ENDPOINTS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List lbEndpoints_;
/**
*
* The group of endpoints belonging to the locality specified.
* [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be
* deprecated and replaced by ``load_balancer_endpoints``.]
*
*
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 2;
*/
@java.lang.Override
public java.util.List getLbEndpointsList() {
return lbEndpoints_;
}
/**
*
* The group of endpoints belonging to the locality specified.
* [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be
* deprecated and replaced by ``load_balancer_endpoints``.]
*
*
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 2;
*/
@java.lang.Override
public java.util.List extends io.envoyproxy.envoy.config.endpoint.v3.LbEndpointOrBuilder>
getLbEndpointsOrBuilderList() {
return lbEndpoints_;
}
/**
*
* The group of endpoints belonging to the locality specified.
* [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be
* deprecated and replaced by ``load_balancer_endpoints``.]
*
*
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 2;
*/
@java.lang.Override
public int getLbEndpointsCount() {
return lbEndpoints_.size();
}
/**
*
* The group of endpoints belonging to the locality specified.
* [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be
* deprecated and replaced by ``load_balancer_endpoints``.]
*
*
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 2;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint getLbEndpoints(int index) {
return lbEndpoints_.get(index);
}
/**
*
* The group of endpoints belonging to the locality specified.
* [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be
* deprecated and replaced by ``load_balancer_endpoints``.]
*
*
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 2;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LbEndpointOrBuilder getLbEndpointsOrBuilder(
int index) {
return lbEndpoints_.get(index);
}
public static final int LOAD_BALANCER_ENDPOINTS_FIELD_NUMBER = 7;
/**
*
* The group of endpoints belonging to the locality.
* [#comment:TODO(adisuissa): Once LEDS is implemented the ``lb_endpoints`` field
* needs to be deprecated.]
*
*
* .envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList load_balancer_endpoints = 7;
* @return Whether the loadBalancerEndpoints field is set.
*/
@java.lang.Override
public boolean hasLoadBalancerEndpoints() {
return lbConfigCase_ == 7;
}
/**
*
* The group of endpoints belonging to the locality.
* [#comment:TODO(adisuissa): Once LEDS is implemented the ``lb_endpoints`` field
* needs to be deprecated.]
*
*
* .envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList load_balancer_endpoints = 7;
* @return The loadBalancerEndpoints.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList getLoadBalancerEndpoints() {
if (lbConfigCase_ == 7) {
return (io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList) lbConfig_;
}
return io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList.getDefaultInstance();
}
/**
*
* The group of endpoints belonging to the locality.
* [#comment:TODO(adisuissa): Once LEDS is implemented the ``lb_endpoints`` field
* needs to be deprecated.]
*
*
* .envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList load_balancer_endpoints = 7;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointListOrBuilder getLoadBalancerEndpointsOrBuilder() {
if (lbConfigCase_ == 7) {
return (io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList) lbConfig_;
}
return io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList.getDefaultInstance();
}
public static final int LEDS_CLUSTER_LOCALITY_CONFIG_FIELD_NUMBER = 8;
/**
*
* LEDS Configuration for the current locality.
*
*
* .envoy.config.endpoint.v3.LedsClusterLocalityConfig leds_cluster_locality_config = 8;
* @return Whether the ledsClusterLocalityConfig field is set.
*/
@java.lang.Override
public boolean hasLedsClusterLocalityConfig() {
return lbConfigCase_ == 8;
}
/**
*
* LEDS Configuration for the current locality.
*
*
* .envoy.config.endpoint.v3.LedsClusterLocalityConfig leds_cluster_locality_config = 8;
* @return The ledsClusterLocalityConfig.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig getLedsClusterLocalityConfig() {
if (lbConfigCase_ == 8) {
return (io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig) lbConfig_;
}
return io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig.getDefaultInstance();
}
/**
*
* LEDS Configuration for the current locality.
*
*
* .envoy.config.endpoint.v3.LedsClusterLocalityConfig leds_cluster_locality_config = 8;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfigOrBuilder getLedsClusterLocalityConfigOrBuilder() {
if (lbConfigCase_ == 8) {
return (io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig) lbConfig_;
}
return io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig.getDefaultInstance();
}
public static final int LOAD_BALANCING_WEIGHT_FIELD_NUMBER = 3;
private com.google.protobuf.UInt32Value loadBalancingWeight_;
/**
*
* Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
* balancing weight for a locality is divided by the sum of the weights of all
* localities at the same priority level to produce the effective percentage
* of traffic for the locality. The sum of the weights of all localities at
* the same priority level must not exceed uint32_t maximal value (4294967295).
*
* Locality weights are only considered when :ref:`locality weighted load
* balancing <arch_overview_load_balancing_locality_weighted_lb>` is
* configured. These weights are ignored otherwise. If no weights are
* specified when locality weighted load balancing is enabled, the locality is
* assigned no load.
*
*
* .google.protobuf.UInt32Value load_balancing_weight = 3 [(.validate.rules) = { ... }
* @return Whether the loadBalancingWeight field is set.
*/
@java.lang.Override
public boolean hasLoadBalancingWeight() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
* balancing weight for a locality is divided by the sum of the weights of all
* localities at the same priority level to produce the effective percentage
* of traffic for the locality. The sum of the weights of all localities at
* the same priority level must not exceed uint32_t maximal value (4294967295).
*
* Locality weights are only considered when :ref:`locality weighted load
* balancing <arch_overview_load_balancing_locality_weighted_lb>` is
* configured. These weights are ignored otherwise. If no weights are
* specified when locality weighted load balancing is enabled, the locality is
* assigned no load.
*
*
* .google.protobuf.UInt32Value load_balancing_weight = 3 [(.validate.rules) = { ... }
* @return The loadBalancingWeight.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getLoadBalancingWeight() {
return loadBalancingWeight_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : loadBalancingWeight_;
}
/**
*
* Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
* balancing weight for a locality is divided by the sum of the weights of all
* localities at the same priority level to produce the effective percentage
* of traffic for the locality. The sum of the weights of all localities at
* the same priority level must not exceed uint32_t maximal value (4294967295).
*
* Locality weights are only considered when :ref:`locality weighted load
* balancing <arch_overview_load_balancing_locality_weighted_lb>` is
* configured. These weights are ignored otherwise. If no weights are
* specified when locality weighted load balancing is enabled, the locality is
* assigned no load.
*
*
* .google.protobuf.UInt32Value load_balancing_weight = 3 [(.validate.rules) = { ... }
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getLoadBalancingWeightOrBuilder() {
return loadBalancingWeight_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : loadBalancingWeight_;
}
public static final int PRIORITY_FIELD_NUMBER = 5;
private int priority_ = 0;
/**
*
* Optional: the priority for this LocalityLbEndpoints. If unspecified this will
* default to the highest priority (0).
*
* Under usual circumstances, Envoy will only select endpoints for the highest
* priority (0). In the event that enough endpoints for a particular priority are
* unavailable/unhealthy, Envoy will fail over to selecting endpoints for the
* next highest priority group. Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>`.
*
* Priorities should range from 0 (highest) to N (lowest) without skipping.
*
*
* uint32 priority = 5 [(.validate.rules) = { ... }
* @return The priority.
*/
@java.lang.Override
public int getPriority() {
return priority_;
}
public static final int PROXIMITY_FIELD_NUMBER = 6;
private com.google.protobuf.UInt32Value proximity_;
/**
*
* Optional: Per locality proximity value which indicates how close this
* locality is from the source locality. This value only provides ordering
* information (lower the value, closer it is to the source locality).
* This will be consumed by load balancing schemes that need proximity order
* to determine where to route the requests.
* [#not-implemented-hide:]
*
*
* .google.protobuf.UInt32Value proximity = 6;
* @return Whether the proximity field is set.
*/
@java.lang.Override
public boolean hasProximity() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Optional: Per locality proximity value which indicates how close this
* locality is from the source locality. This value only provides ordering
* information (lower the value, closer it is to the source locality).
* This will be consumed by load balancing schemes that need proximity order
* to determine where to route the requests.
* [#not-implemented-hide:]
*
*
* .google.protobuf.UInt32Value proximity = 6;
* @return The proximity.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getProximity() {
return proximity_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : proximity_;
}
/**
*
* Optional: Per locality proximity value which indicates how close this
* locality is from the source locality. This value only provides ordering
* information (lower the value, closer it is to the source locality).
* This will be consumed by load balancing schemes that need proximity order
* to determine where to route the requests.
* [#not-implemented-hide:]
*
*
* .google.protobuf.UInt32Value proximity = 6;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getProximityOrBuilder() {
return proximity_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : proximity_;
}
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 (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getLocality());
}
for (int i = 0; i < lbEndpoints_.size(); i++) {
output.writeMessage(2, lbEndpoints_.get(i));
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(3, getLoadBalancingWeight());
}
if (priority_ != 0) {
output.writeUInt32(5, priority_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(6, getProximity());
}
if (lbConfigCase_ == 7) {
output.writeMessage(7, (io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList) lbConfig_);
}
if (lbConfigCase_ == 8) {
output.writeMessage(8, (io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig) lbConfig_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(9, getMetadata());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getLocality());
}
for (int i = 0; i < lbEndpoints_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, lbEndpoints_.get(i));
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getLoadBalancingWeight());
}
if (priority_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(5, priority_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getProximity());
}
if (lbConfigCase_ == 7) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, (io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList) lbConfig_);
}
if (lbConfigCase_ == 8) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, (io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig) lbConfig_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, getMetadata());
}
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.LocalityLbEndpoints)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints other = (io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints) obj;
if (hasLocality() != other.hasLocality()) return false;
if (hasLocality()) {
if (!getLocality()
.equals(other.getLocality())) return false;
}
if (hasMetadata() != other.hasMetadata()) return false;
if (hasMetadata()) {
if (!getMetadata()
.equals(other.getMetadata())) return false;
}
if (!getLbEndpointsList()
.equals(other.getLbEndpointsList())) return false;
if (hasLoadBalancingWeight() != other.hasLoadBalancingWeight()) return false;
if (hasLoadBalancingWeight()) {
if (!getLoadBalancingWeight()
.equals(other.getLoadBalancingWeight())) return false;
}
if (getPriority()
!= other.getPriority()) return false;
if (hasProximity() != other.hasProximity()) return false;
if (hasProximity()) {
if (!getProximity()
.equals(other.getProximity())) return false;
}
if (!getLbConfigCase().equals(other.getLbConfigCase())) return false;
switch (lbConfigCase_) {
case 7:
if (!getLoadBalancerEndpoints()
.equals(other.getLoadBalancerEndpoints())) return false;
break;
case 8:
if (!getLedsClusterLocalityConfig()
.equals(other.getLedsClusterLocalityConfig())) 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();
if (hasLocality()) {
hash = (37 * hash) + LOCALITY_FIELD_NUMBER;
hash = (53 * hash) + getLocality().hashCode();
}
if (hasMetadata()) {
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + getMetadata().hashCode();
}
if (getLbEndpointsCount() > 0) {
hash = (37 * hash) + LB_ENDPOINTS_FIELD_NUMBER;
hash = (53 * hash) + getLbEndpointsList().hashCode();
}
if (hasLoadBalancingWeight()) {
hash = (37 * hash) + LOAD_BALANCING_WEIGHT_FIELD_NUMBER;
hash = (53 * hash) + getLoadBalancingWeight().hashCode();
}
hash = (37 * hash) + PRIORITY_FIELD_NUMBER;
hash = (53 * hash) + getPriority();
if (hasProximity()) {
hash = (37 * hash) + PROXIMITY_FIELD_NUMBER;
hash = (53 * hash) + getProximity().hashCode();
}
switch (lbConfigCase_) {
case 7:
hash = (37 * hash) + LOAD_BALANCER_ENDPOINTS_FIELD_NUMBER;
hash = (53 * hash) + getLoadBalancerEndpoints().hashCode();
break;
case 8:
hash = (37 * hash) + LEDS_CLUSTER_LOCALITY_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getLedsClusterLocalityConfig().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints 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.LocalityLbEndpoints 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.LocalityLbEndpoints parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints 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.LocalityLbEndpoints parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints 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.LocalityLbEndpoints parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* A group of endpoints belonging to a Locality.
* One can have multiple LocalityLbEndpoints for a locality, but only if
* they have different priorities.
* [#next-free-field: 10]
*
*
* Protobuf type {@code envoy.config.endpoint.v3.LocalityLbEndpoints}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.endpoint.v3.LocalityLbEndpoints)
io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpointsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.endpoint.v3.EndpointComponentsProto.internal_static_envoy_config_endpoint_v3_LocalityLbEndpoints_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_LocalityLbEndpoints_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.class, io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getLocalityFieldBuilder();
getMetadataFieldBuilder();
getLbEndpointsFieldBuilder();
getLoadBalancingWeightFieldBuilder();
getProximityFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
locality_ = null;
if (localityBuilder_ != null) {
localityBuilder_.dispose();
localityBuilder_ = null;
}
metadata_ = null;
if (metadataBuilder_ != null) {
metadataBuilder_.dispose();
metadataBuilder_ = null;
}
if (lbEndpointsBuilder_ == null) {
lbEndpoints_ = java.util.Collections.emptyList();
} else {
lbEndpoints_ = null;
lbEndpointsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
if (loadBalancerEndpointsBuilder_ != null) {
loadBalancerEndpointsBuilder_.clear();
}
if (ledsClusterLocalityConfigBuilder_ != null) {
ledsClusterLocalityConfigBuilder_.clear();
}
loadBalancingWeight_ = null;
if (loadBalancingWeightBuilder_ != null) {
loadBalancingWeightBuilder_.dispose();
loadBalancingWeightBuilder_ = null;
}
priority_ = 0;
proximity_ = null;
if (proximityBuilder_ != null) {
proximityBuilder_.dispose();
proximityBuilder_ = null;
}
lbConfigCase_ = 0;
lbConfig_ = 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_LocalityLbEndpoints_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints build() {
io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints buildPartial() {
io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints result = new io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartialRepeatedFields(io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints result) {
if (lbEndpointsBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
lbEndpoints_ = java.util.Collections.unmodifiableList(lbEndpoints_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.lbEndpoints_ = lbEndpoints_;
} else {
result.lbEndpoints_ = lbEndpointsBuilder_.build();
}
}
private void buildPartial0(io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.locality_ = localityBuilder_ == null
? locality_
: localityBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.metadata_ = metadataBuilder_ == null
? metadata_
: metadataBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.loadBalancingWeight_ = loadBalancingWeightBuilder_ == null
? loadBalancingWeight_
: loadBalancingWeightBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.priority_ = priority_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.proximity_ = proximityBuilder_ == null
? proximity_
: proximityBuilder_.build();
to_bitField0_ |= 0x00000008;
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints result) {
result.lbConfigCase_ = lbConfigCase_;
result.lbConfig_ = this.lbConfig_;
if (lbConfigCase_ == 7 &&
loadBalancerEndpointsBuilder_ != null) {
result.lbConfig_ = loadBalancerEndpointsBuilder_.build();
}
if (lbConfigCase_ == 8 &&
ledsClusterLocalityConfigBuilder_ != null) {
result.lbConfig_ = ledsClusterLocalityConfigBuilder_.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.LocalityLbEndpoints) {
return mergeFrom((io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints other) {
if (other == io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.getDefaultInstance()) return this;
if (other.hasLocality()) {
mergeLocality(other.getLocality());
}
if (other.hasMetadata()) {
mergeMetadata(other.getMetadata());
}
if (lbEndpointsBuilder_ == null) {
if (!other.lbEndpoints_.isEmpty()) {
if (lbEndpoints_.isEmpty()) {
lbEndpoints_ = other.lbEndpoints_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureLbEndpointsIsMutable();
lbEndpoints_.addAll(other.lbEndpoints_);
}
onChanged();
}
} else {
if (!other.lbEndpoints_.isEmpty()) {
if (lbEndpointsBuilder_.isEmpty()) {
lbEndpointsBuilder_.dispose();
lbEndpointsBuilder_ = null;
lbEndpoints_ = other.lbEndpoints_;
bitField0_ = (bitField0_ & ~0x00000004);
lbEndpointsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getLbEndpointsFieldBuilder() : null;
} else {
lbEndpointsBuilder_.addAllMessages(other.lbEndpoints_);
}
}
}
if (other.hasLoadBalancingWeight()) {
mergeLoadBalancingWeight(other.getLoadBalancingWeight());
}
if (other.getPriority() != 0) {
setPriority(other.getPriority());
}
if (other.hasProximity()) {
mergeProximity(other.getProximity());
}
switch (other.getLbConfigCase()) {
case LOAD_BALANCER_ENDPOINTS: {
mergeLoadBalancerEndpoints(other.getLoadBalancerEndpoints());
break;
}
case LEDS_CLUSTER_LOCALITY_CONFIG: {
mergeLedsClusterLocalityConfig(other.getLedsClusterLocalityConfig());
break;
}
case LBCONFIG_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(
getLocalityFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint m =
input.readMessage(
io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.parser(),
extensionRegistry);
if (lbEndpointsBuilder_ == null) {
ensureLbEndpointsIsMutable();
lbEndpoints_.add(m);
} else {
lbEndpointsBuilder_.addMessage(m);
}
break;
} // case 18
case 26: {
input.readMessage(
getLoadBalancingWeightFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 26
case 40: {
priority_ = input.readUInt32();
bitField0_ |= 0x00000040;
break;
} // case 40
case 50: {
input.readMessage(
getProximityFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000080;
break;
} // case 50
case 58: {
input.readMessage(
getLoadBalancerEndpointsFieldBuilder().getBuilder(),
extensionRegistry);
lbConfigCase_ = 7;
break;
} // case 58
case 66: {
input.readMessage(
getLedsClusterLocalityConfigFieldBuilder().getBuilder(),
extensionRegistry);
lbConfigCase_ = 8;
break;
} // case 66
case 74: {
input.readMessage(
getMetadataFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 74
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 lbConfigCase_ = 0;
private java.lang.Object lbConfig_;
public LbConfigCase
getLbConfigCase() {
return LbConfigCase.forNumber(
lbConfigCase_);
}
public Builder clearLbConfig() {
lbConfigCase_ = 0;
lbConfig_ = null;
onChanged();
return this;
}
private int bitField0_;
private io.envoyproxy.envoy.config.core.v3.Locality locality_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.Locality, io.envoyproxy.envoy.config.core.v3.Locality.Builder, io.envoyproxy.envoy.config.core.v3.LocalityOrBuilder> localityBuilder_;
/**
*
* Identifies location of where the upstream hosts run.
*
*
* .envoy.config.core.v3.Locality locality = 1;
* @return Whether the locality field is set.
*/
public boolean hasLocality() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Identifies location of where the upstream hosts run.
*
*
* .envoy.config.core.v3.Locality locality = 1;
* @return The locality.
*/
public io.envoyproxy.envoy.config.core.v3.Locality getLocality() {
if (localityBuilder_ == null) {
return locality_ == null ? io.envoyproxy.envoy.config.core.v3.Locality.getDefaultInstance() : locality_;
} else {
return localityBuilder_.getMessage();
}
}
/**
*
* Identifies location of where the upstream hosts run.
*
*
* .envoy.config.core.v3.Locality locality = 1;
*/
public Builder setLocality(io.envoyproxy.envoy.config.core.v3.Locality value) {
if (localityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
locality_ = value;
} else {
localityBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Identifies location of where the upstream hosts run.
*
*
* .envoy.config.core.v3.Locality locality = 1;
*/
public Builder setLocality(
io.envoyproxy.envoy.config.core.v3.Locality.Builder builderForValue) {
if (localityBuilder_ == null) {
locality_ = builderForValue.build();
} else {
localityBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Identifies location of where the upstream hosts run.
*
*
* .envoy.config.core.v3.Locality locality = 1;
*/
public Builder mergeLocality(io.envoyproxy.envoy.config.core.v3.Locality value) {
if (localityBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
locality_ != null &&
locality_ != io.envoyproxy.envoy.config.core.v3.Locality.getDefaultInstance()) {
getLocalityBuilder().mergeFrom(value);
} else {
locality_ = value;
}
} else {
localityBuilder_.mergeFrom(value);
}
if (locality_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* Identifies location of where the upstream hosts run.
*
*
* .envoy.config.core.v3.Locality locality = 1;
*/
public Builder clearLocality() {
bitField0_ = (bitField0_ & ~0x00000001);
locality_ = null;
if (localityBuilder_ != null) {
localityBuilder_.dispose();
localityBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Identifies location of where the upstream hosts run.
*
*
* .envoy.config.core.v3.Locality locality = 1;
*/
public io.envoyproxy.envoy.config.core.v3.Locality.Builder getLocalityBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getLocalityFieldBuilder().getBuilder();
}
/**
*
* Identifies location of where the upstream hosts run.
*
*
* .envoy.config.core.v3.Locality locality = 1;
*/
public io.envoyproxy.envoy.config.core.v3.LocalityOrBuilder getLocalityOrBuilder() {
if (localityBuilder_ != null) {
return localityBuilder_.getMessageOrBuilder();
} else {
return locality_ == null ?
io.envoyproxy.envoy.config.core.v3.Locality.getDefaultInstance() : locality_;
}
}
/**
*
* Identifies location of where the upstream hosts run.
*
*
* .envoy.config.core.v3.Locality locality = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.Locality, io.envoyproxy.envoy.config.core.v3.Locality.Builder, io.envoyproxy.envoy.config.core.v3.LocalityOrBuilder>
getLocalityFieldBuilder() {
if (localityBuilder_ == null) {
localityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.Locality, io.envoyproxy.envoy.config.core.v3.Locality.Builder, io.envoyproxy.envoy.config.core.v3.LocalityOrBuilder>(
getLocality(),
getParentForChildren(),
isClean());
locality_ = null;
}
return localityBuilder_;
}
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_;
/**
*
* Metadata to provide additional information about the locality endpoints in aggregate.
*
*
* .envoy.config.core.v3.Metadata metadata = 9;
* @return Whether the metadata field is set.
*/
public boolean hasMetadata() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Metadata to provide additional information about the locality endpoints in aggregate.
*
*
* .envoy.config.core.v3.Metadata metadata = 9;
* @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();
}
}
/**
*
* Metadata to provide additional information about the locality endpoints in aggregate.
*
*
* .envoy.config.core.v3.Metadata metadata = 9;
*/
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_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Metadata to provide additional information about the locality endpoints in aggregate.
*
*
* .envoy.config.core.v3.Metadata metadata = 9;
*/
public Builder setMetadata(
io.envoyproxy.envoy.config.core.v3.Metadata.Builder builderForValue) {
if (metadataBuilder_ == null) {
metadata_ = builderForValue.build();
} else {
metadataBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Metadata to provide additional information about the locality endpoints in aggregate.
*
*
* .envoy.config.core.v3.Metadata metadata = 9;
*/
public Builder mergeMetadata(io.envoyproxy.envoy.config.core.v3.Metadata value) {
if (metadataBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 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_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
* Metadata to provide additional information about the locality endpoints in aggregate.
*
*
* .envoy.config.core.v3.Metadata metadata = 9;
*/
public Builder clearMetadata() {
bitField0_ = (bitField0_ & ~0x00000002);
metadata_ = null;
if (metadataBuilder_ != null) {
metadataBuilder_.dispose();
metadataBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Metadata to provide additional information about the locality endpoints in aggregate.
*
*
* .envoy.config.core.v3.Metadata metadata = 9;
*/
public io.envoyproxy.envoy.config.core.v3.Metadata.Builder getMetadataBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getMetadataFieldBuilder().getBuilder();
}
/**
*
* Metadata to provide additional information about the locality endpoints in aggregate.
*
*
* .envoy.config.core.v3.Metadata metadata = 9;
*/
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_;
}
}
/**
*
* Metadata to provide additional information about the locality endpoints in aggregate.
*
*
* .envoy.config.core.v3.Metadata metadata = 9;
*/
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 java.util.List lbEndpoints_ =
java.util.Collections.emptyList();
private void ensureLbEndpointsIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
lbEndpoints_ = new java.util.ArrayList(lbEndpoints_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint, io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.Builder, io.envoyproxy.envoy.config.endpoint.v3.LbEndpointOrBuilder> lbEndpointsBuilder_;
/**
*
* The group of endpoints belonging to the locality specified.
* [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be
* deprecated and replaced by ``load_balancer_endpoints``.]
*
*
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 2;
*/
public java.util.List getLbEndpointsList() {
if (lbEndpointsBuilder_ == null) {
return java.util.Collections.unmodifiableList(lbEndpoints_);
} else {
return lbEndpointsBuilder_.getMessageList();
}
}
/**
*
* The group of endpoints belonging to the locality specified.
* [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be
* deprecated and replaced by ``load_balancer_endpoints``.]
*
*
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 2;
*/
public int getLbEndpointsCount() {
if (lbEndpointsBuilder_ == null) {
return lbEndpoints_.size();
} else {
return lbEndpointsBuilder_.getCount();
}
}
/**
*
* The group of endpoints belonging to the locality specified.
* [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be
* deprecated and replaced by ``load_balancer_endpoints``.]
*
*
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 2;
*/
public io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint getLbEndpoints(int index) {
if (lbEndpointsBuilder_ == null) {
return lbEndpoints_.get(index);
} else {
return lbEndpointsBuilder_.getMessage(index);
}
}
/**
*
* The group of endpoints belonging to the locality specified.
* [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be
* deprecated and replaced by ``load_balancer_endpoints``.]
*
*
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 2;
*/
public Builder setLbEndpoints(
int index, io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint value) {
if (lbEndpointsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLbEndpointsIsMutable();
lbEndpoints_.set(index, value);
onChanged();
} else {
lbEndpointsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The group of endpoints belonging to the locality specified.
* [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be
* deprecated and replaced by ``load_balancer_endpoints``.]
*
*
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 2;
*/
public Builder setLbEndpoints(
int index, io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.Builder builderForValue) {
if (lbEndpointsBuilder_ == null) {
ensureLbEndpointsIsMutable();
lbEndpoints_.set(index, builderForValue.build());
onChanged();
} else {
lbEndpointsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The group of endpoints belonging to the locality specified.
* [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be
* deprecated and replaced by ``load_balancer_endpoints``.]
*
*
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 2;
*/
public Builder addLbEndpoints(io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint value) {
if (lbEndpointsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLbEndpointsIsMutable();
lbEndpoints_.add(value);
onChanged();
} else {
lbEndpointsBuilder_.addMessage(value);
}
return this;
}
/**
*
* The group of endpoints belonging to the locality specified.
* [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be
* deprecated and replaced by ``load_balancer_endpoints``.]
*
*
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 2;
*/
public Builder addLbEndpoints(
int index, io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint value) {
if (lbEndpointsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLbEndpointsIsMutable();
lbEndpoints_.add(index, value);
onChanged();
} else {
lbEndpointsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The group of endpoints belonging to the locality specified.
* [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be
* deprecated and replaced by ``load_balancer_endpoints``.]
*
*
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 2;
*/
public Builder addLbEndpoints(
io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.Builder builderForValue) {
if (lbEndpointsBuilder_ == null) {
ensureLbEndpointsIsMutable();
lbEndpoints_.add(builderForValue.build());
onChanged();
} else {
lbEndpointsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The group of endpoints belonging to the locality specified.
* [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be
* deprecated and replaced by ``load_balancer_endpoints``.]
*
*
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 2;
*/
public Builder addLbEndpoints(
int index, io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.Builder builderForValue) {
if (lbEndpointsBuilder_ == null) {
ensureLbEndpointsIsMutable();
lbEndpoints_.add(index, builderForValue.build());
onChanged();
} else {
lbEndpointsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The group of endpoints belonging to the locality specified.
* [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be
* deprecated and replaced by ``load_balancer_endpoints``.]
*
*
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 2;
*/
public Builder addAllLbEndpoints(
java.lang.Iterable extends io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint> values) {
if (lbEndpointsBuilder_ == null) {
ensureLbEndpointsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, lbEndpoints_);
onChanged();
} else {
lbEndpointsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The group of endpoints belonging to the locality specified.
* [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be
* deprecated and replaced by ``load_balancer_endpoints``.]
*
*
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 2;
*/
public Builder clearLbEndpoints() {
if (lbEndpointsBuilder_ == null) {
lbEndpoints_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
lbEndpointsBuilder_.clear();
}
return this;
}
/**
*
* The group of endpoints belonging to the locality specified.
* [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be
* deprecated and replaced by ``load_balancer_endpoints``.]
*
*
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 2;
*/
public Builder removeLbEndpoints(int index) {
if (lbEndpointsBuilder_ == null) {
ensureLbEndpointsIsMutable();
lbEndpoints_.remove(index);
onChanged();
} else {
lbEndpointsBuilder_.remove(index);
}
return this;
}
/**
*
* The group of endpoints belonging to the locality specified.
* [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be
* deprecated and replaced by ``load_balancer_endpoints``.]
*
*
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 2;
*/
public io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.Builder getLbEndpointsBuilder(
int index) {
return getLbEndpointsFieldBuilder().getBuilder(index);
}
/**
*
* The group of endpoints belonging to the locality specified.
* [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be
* deprecated and replaced by ``load_balancer_endpoints``.]
*
*
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 2;
*/
public io.envoyproxy.envoy.config.endpoint.v3.LbEndpointOrBuilder getLbEndpointsOrBuilder(
int index) {
if (lbEndpointsBuilder_ == null) {
return lbEndpoints_.get(index); } else {
return lbEndpointsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The group of endpoints belonging to the locality specified.
* [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be
* deprecated and replaced by ``load_balancer_endpoints``.]
*
*
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 2;
*/
public java.util.List extends io.envoyproxy.envoy.config.endpoint.v3.LbEndpointOrBuilder>
getLbEndpointsOrBuilderList() {
if (lbEndpointsBuilder_ != null) {
return lbEndpointsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(lbEndpoints_);
}
}
/**
*
* The group of endpoints belonging to the locality specified.
* [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be
* deprecated and replaced by ``load_balancer_endpoints``.]
*
*
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 2;
*/
public io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.Builder addLbEndpointsBuilder() {
return getLbEndpointsFieldBuilder().addBuilder(
io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.getDefaultInstance());
}
/**
*
* The group of endpoints belonging to the locality specified.
* [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be
* deprecated and replaced by ``load_balancer_endpoints``.]
*
*
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 2;
*/
public io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.Builder addLbEndpointsBuilder(
int index) {
return getLbEndpointsFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.getDefaultInstance());
}
/**
*
* The group of endpoints belonging to the locality specified.
* [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be
* deprecated and replaced by ``load_balancer_endpoints``.]
*
*
* repeated .envoy.config.endpoint.v3.LbEndpoint lb_endpoints = 2;
*/
public java.util.List
getLbEndpointsBuilderList() {
return getLbEndpointsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint, io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.Builder, io.envoyproxy.envoy.config.endpoint.v3.LbEndpointOrBuilder>
getLbEndpointsFieldBuilder() {
if (lbEndpointsBuilder_ == null) {
lbEndpointsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint, io.envoyproxy.envoy.config.endpoint.v3.LbEndpoint.Builder, io.envoyproxy.envoy.config.endpoint.v3.LbEndpointOrBuilder>(
lbEndpoints_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
lbEndpoints_ = null;
}
return lbEndpointsBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList, io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList.Builder, io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointListOrBuilder> loadBalancerEndpointsBuilder_;
/**
*
* The group of endpoints belonging to the locality.
* [#comment:TODO(adisuissa): Once LEDS is implemented the ``lb_endpoints`` field
* needs to be deprecated.]
*
*
* .envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList load_balancer_endpoints = 7;
* @return Whether the loadBalancerEndpoints field is set.
*/
@java.lang.Override
public boolean hasLoadBalancerEndpoints() {
return lbConfigCase_ == 7;
}
/**
*
* The group of endpoints belonging to the locality.
* [#comment:TODO(adisuissa): Once LEDS is implemented the ``lb_endpoints`` field
* needs to be deprecated.]
*
*
* .envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList load_balancer_endpoints = 7;
* @return The loadBalancerEndpoints.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList getLoadBalancerEndpoints() {
if (loadBalancerEndpointsBuilder_ == null) {
if (lbConfigCase_ == 7) {
return (io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList) lbConfig_;
}
return io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList.getDefaultInstance();
} else {
if (lbConfigCase_ == 7) {
return loadBalancerEndpointsBuilder_.getMessage();
}
return io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList.getDefaultInstance();
}
}
/**
*
* The group of endpoints belonging to the locality.
* [#comment:TODO(adisuissa): Once LEDS is implemented the ``lb_endpoints`` field
* needs to be deprecated.]
*
*
* .envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList load_balancer_endpoints = 7;
*/
public Builder setLoadBalancerEndpoints(io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList value) {
if (loadBalancerEndpointsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
lbConfig_ = value;
onChanged();
} else {
loadBalancerEndpointsBuilder_.setMessage(value);
}
lbConfigCase_ = 7;
return this;
}
/**
*
* The group of endpoints belonging to the locality.
* [#comment:TODO(adisuissa): Once LEDS is implemented the ``lb_endpoints`` field
* needs to be deprecated.]
*
*
* .envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList load_balancer_endpoints = 7;
*/
public Builder setLoadBalancerEndpoints(
io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList.Builder builderForValue) {
if (loadBalancerEndpointsBuilder_ == null) {
lbConfig_ = builderForValue.build();
onChanged();
} else {
loadBalancerEndpointsBuilder_.setMessage(builderForValue.build());
}
lbConfigCase_ = 7;
return this;
}
/**
*
* The group of endpoints belonging to the locality.
* [#comment:TODO(adisuissa): Once LEDS is implemented the ``lb_endpoints`` field
* needs to be deprecated.]
*
*
* .envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList load_balancer_endpoints = 7;
*/
public Builder mergeLoadBalancerEndpoints(io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList value) {
if (loadBalancerEndpointsBuilder_ == null) {
if (lbConfigCase_ == 7 &&
lbConfig_ != io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList.getDefaultInstance()) {
lbConfig_ = io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList.newBuilder((io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList) lbConfig_)
.mergeFrom(value).buildPartial();
} else {
lbConfig_ = value;
}
onChanged();
} else {
if (lbConfigCase_ == 7) {
loadBalancerEndpointsBuilder_.mergeFrom(value);
} else {
loadBalancerEndpointsBuilder_.setMessage(value);
}
}
lbConfigCase_ = 7;
return this;
}
/**
*
* The group of endpoints belonging to the locality.
* [#comment:TODO(adisuissa): Once LEDS is implemented the ``lb_endpoints`` field
* needs to be deprecated.]
*
*
* .envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList load_balancer_endpoints = 7;
*/
public Builder clearLoadBalancerEndpoints() {
if (loadBalancerEndpointsBuilder_ == null) {
if (lbConfigCase_ == 7) {
lbConfigCase_ = 0;
lbConfig_ = null;
onChanged();
}
} else {
if (lbConfigCase_ == 7) {
lbConfigCase_ = 0;
lbConfig_ = null;
}
loadBalancerEndpointsBuilder_.clear();
}
return this;
}
/**
*
* The group of endpoints belonging to the locality.
* [#comment:TODO(adisuissa): Once LEDS is implemented the ``lb_endpoints`` field
* needs to be deprecated.]
*
*
* .envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList load_balancer_endpoints = 7;
*/
public io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList.Builder getLoadBalancerEndpointsBuilder() {
return getLoadBalancerEndpointsFieldBuilder().getBuilder();
}
/**
*
* The group of endpoints belonging to the locality.
* [#comment:TODO(adisuissa): Once LEDS is implemented the ``lb_endpoints`` field
* needs to be deprecated.]
*
*
* .envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList load_balancer_endpoints = 7;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointListOrBuilder getLoadBalancerEndpointsOrBuilder() {
if ((lbConfigCase_ == 7) && (loadBalancerEndpointsBuilder_ != null)) {
return loadBalancerEndpointsBuilder_.getMessageOrBuilder();
} else {
if (lbConfigCase_ == 7) {
return (io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList) lbConfig_;
}
return io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList.getDefaultInstance();
}
}
/**
*
* The group of endpoints belonging to the locality.
* [#comment:TODO(adisuissa): Once LEDS is implemented the ``lb_endpoints`` field
* needs to be deprecated.]
*
*
* .envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList load_balancer_endpoints = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList, io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList.Builder, io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointListOrBuilder>
getLoadBalancerEndpointsFieldBuilder() {
if (loadBalancerEndpointsBuilder_ == null) {
if (!(lbConfigCase_ == 7)) {
lbConfig_ = io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList.getDefaultInstance();
}
loadBalancerEndpointsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList, io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList.Builder, io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointListOrBuilder>(
(io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList) lbConfig_,
getParentForChildren(),
isClean());
lbConfig_ = null;
}
lbConfigCase_ = 7;
onChanged();
return loadBalancerEndpointsBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig, io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig.Builder, io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfigOrBuilder> ledsClusterLocalityConfigBuilder_;
/**
*
* LEDS Configuration for the current locality.
*
*
* .envoy.config.endpoint.v3.LedsClusterLocalityConfig leds_cluster_locality_config = 8;
* @return Whether the ledsClusterLocalityConfig field is set.
*/
@java.lang.Override
public boolean hasLedsClusterLocalityConfig() {
return lbConfigCase_ == 8;
}
/**
*
* LEDS Configuration for the current locality.
*
*
* .envoy.config.endpoint.v3.LedsClusterLocalityConfig leds_cluster_locality_config = 8;
* @return The ledsClusterLocalityConfig.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig getLedsClusterLocalityConfig() {
if (ledsClusterLocalityConfigBuilder_ == null) {
if (lbConfigCase_ == 8) {
return (io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig) lbConfig_;
}
return io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig.getDefaultInstance();
} else {
if (lbConfigCase_ == 8) {
return ledsClusterLocalityConfigBuilder_.getMessage();
}
return io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig.getDefaultInstance();
}
}
/**
*
* LEDS Configuration for the current locality.
*
*
* .envoy.config.endpoint.v3.LedsClusterLocalityConfig leds_cluster_locality_config = 8;
*/
public Builder setLedsClusterLocalityConfig(io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig value) {
if (ledsClusterLocalityConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
lbConfig_ = value;
onChanged();
} else {
ledsClusterLocalityConfigBuilder_.setMessage(value);
}
lbConfigCase_ = 8;
return this;
}
/**
*
* LEDS Configuration for the current locality.
*
*
* .envoy.config.endpoint.v3.LedsClusterLocalityConfig leds_cluster_locality_config = 8;
*/
public Builder setLedsClusterLocalityConfig(
io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig.Builder builderForValue) {
if (ledsClusterLocalityConfigBuilder_ == null) {
lbConfig_ = builderForValue.build();
onChanged();
} else {
ledsClusterLocalityConfigBuilder_.setMessage(builderForValue.build());
}
lbConfigCase_ = 8;
return this;
}
/**
*
* LEDS Configuration for the current locality.
*
*
* .envoy.config.endpoint.v3.LedsClusterLocalityConfig leds_cluster_locality_config = 8;
*/
public Builder mergeLedsClusterLocalityConfig(io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig value) {
if (ledsClusterLocalityConfigBuilder_ == null) {
if (lbConfigCase_ == 8 &&
lbConfig_ != io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig.getDefaultInstance()) {
lbConfig_ = io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig.newBuilder((io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig) lbConfig_)
.mergeFrom(value).buildPartial();
} else {
lbConfig_ = value;
}
onChanged();
} else {
if (lbConfigCase_ == 8) {
ledsClusterLocalityConfigBuilder_.mergeFrom(value);
} else {
ledsClusterLocalityConfigBuilder_.setMessage(value);
}
}
lbConfigCase_ = 8;
return this;
}
/**
*
* LEDS Configuration for the current locality.
*
*
* .envoy.config.endpoint.v3.LedsClusterLocalityConfig leds_cluster_locality_config = 8;
*/
public Builder clearLedsClusterLocalityConfig() {
if (ledsClusterLocalityConfigBuilder_ == null) {
if (lbConfigCase_ == 8) {
lbConfigCase_ = 0;
lbConfig_ = null;
onChanged();
}
} else {
if (lbConfigCase_ == 8) {
lbConfigCase_ = 0;
lbConfig_ = null;
}
ledsClusterLocalityConfigBuilder_.clear();
}
return this;
}
/**
*
* LEDS Configuration for the current locality.
*
*
* .envoy.config.endpoint.v3.LedsClusterLocalityConfig leds_cluster_locality_config = 8;
*/
public io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig.Builder getLedsClusterLocalityConfigBuilder() {
return getLedsClusterLocalityConfigFieldBuilder().getBuilder();
}
/**
*
* LEDS Configuration for the current locality.
*
*
* .envoy.config.endpoint.v3.LedsClusterLocalityConfig leds_cluster_locality_config = 8;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfigOrBuilder getLedsClusterLocalityConfigOrBuilder() {
if ((lbConfigCase_ == 8) && (ledsClusterLocalityConfigBuilder_ != null)) {
return ledsClusterLocalityConfigBuilder_.getMessageOrBuilder();
} else {
if (lbConfigCase_ == 8) {
return (io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig) lbConfig_;
}
return io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig.getDefaultInstance();
}
}
/**
*
* LEDS Configuration for the current locality.
*
*
* .envoy.config.endpoint.v3.LedsClusterLocalityConfig leds_cluster_locality_config = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig, io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig.Builder, io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfigOrBuilder>
getLedsClusterLocalityConfigFieldBuilder() {
if (ledsClusterLocalityConfigBuilder_ == null) {
if (!(lbConfigCase_ == 8)) {
lbConfig_ = io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig.getDefaultInstance();
}
ledsClusterLocalityConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig, io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig.Builder, io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfigOrBuilder>(
(io.envoyproxy.envoy.config.endpoint.v3.LedsClusterLocalityConfig) lbConfig_,
getParentForChildren(),
isClean());
lbConfig_ = null;
}
lbConfigCase_ = 8;
onChanged();
return ledsClusterLocalityConfigBuilder_;
}
private com.google.protobuf.UInt32Value loadBalancingWeight_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> loadBalancingWeightBuilder_;
/**
*
* Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
* balancing weight for a locality is divided by the sum of the weights of all
* localities at the same priority level to produce the effective percentage
* of traffic for the locality. The sum of the weights of all localities at
* the same priority level must not exceed uint32_t maximal value (4294967295).
*
* Locality weights are only considered when :ref:`locality weighted load
* balancing <arch_overview_load_balancing_locality_weighted_lb>` is
* configured. These weights are ignored otherwise. If no weights are
* specified when locality weighted load balancing is enabled, the locality is
* assigned no load.
*
*
* .google.protobuf.UInt32Value load_balancing_weight = 3 [(.validate.rules) = { ... }
* @return Whether the loadBalancingWeight field is set.
*/
public boolean hasLoadBalancingWeight() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
* balancing weight for a locality is divided by the sum of the weights of all
* localities at the same priority level to produce the effective percentage
* of traffic for the locality. The sum of the weights of all localities at
* the same priority level must not exceed uint32_t maximal value (4294967295).
*
* Locality weights are only considered when :ref:`locality weighted load
* balancing <arch_overview_load_balancing_locality_weighted_lb>` is
* configured. These weights are ignored otherwise. If no weights are
* specified when locality weighted load balancing is enabled, the locality is
* assigned no load.
*
*
* .google.protobuf.UInt32Value load_balancing_weight = 3 [(.validate.rules) = { ... }
* @return The loadBalancingWeight.
*/
public com.google.protobuf.UInt32Value getLoadBalancingWeight() {
if (loadBalancingWeightBuilder_ == null) {
return loadBalancingWeight_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : loadBalancingWeight_;
} else {
return loadBalancingWeightBuilder_.getMessage();
}
}
/**
*
* Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
* balancing weight for a locality is divided by the sum of the weights of all
* localities at the same priority level to produce the effective percentage
* of traffic for the locality. The sum of the weights of all localities at
* the same priority level must not exceed uint32_t maximal value (4294967295).
*
* Locality weights are only considered when :ref:`locality weighted load
* balancing <arch_overview_load_balancing_locality_weighted_lb>` is
* configured. These weights are ignored otherwise. If no weights are
* specified when locality weighted load balancing is enabled, the locality is
* assigned no load.
*
*
* .google.protobuf.UInt32Value load_balancing_weight = 3 [(.validate.rules) = { ... }
*/
public Builder setLoadBalancingWeight(com.google.protobuf.UInt32Value value) {
if (loadBalancingWeightBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
loadBalancingWeight_ = value;
} else {
loadBalancingWeightBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
* balancing weight for a locality is divided by the sum of the weights of all
* localities at the same priority level to produce the effective percentage
* of traffic for the locality. The sum of the weights of all localities at
* the same priority level must not exceed uint32_t maximal value (4294967295).
*
* Locality weights are only considered when :ref:`locality weighted load
* balancing <arch_overview_load_balancing_locality_weighted_lb>` is
* configured. These weights are ignored otherwise. If no weights are
* specified when locality weighted load balancing is enabled, the locality is
* assigned no load.
*
*
* .google.protobuf.UInt32Value load_balancing_weight = 3 [(.validate.rules) = { ... }
*/
public Builder setLoadBalancingWeight(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (loadBalancingWeightBuilder_ == null) {
loadBalancingWeight_ = builderForValue.build();
} else {
loadBalancingWeightBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
* balancing weight for a locality is divided by the sum of the weights of all
* localities at the same priority level to produce the effective percentage
* of traffic for the locality. The sum of the weights of all localities at
* the same priority level must not exceed uint32_t maximal value (4294967295).
*
* Locality weights are only considered when :ref:`locality weighted load
* balancing <arch_overview_load_balancing_locality_weighted_lb>` is
* configured. These weights are ignored otherwise. If no weights are
* specified when locality weighted load balancing is enabled, the locality is
* assigned no load.
*
*
* .google.protobuf.UInt32Value load_balancing_weight = 3 [(.validate.rules) = { ... }
*/
public Builder mergeLoadBalancingWeight(com.google.protobuf.UInt32Value value) {
if (loadBalancingWeightBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0) &&
loadBalancingWeight_ != null &&
loadBalancingWeight_ != com.google.protobuf.UInt32Value.getDefaultInstance()) {
getLoadBalancingWeightBuilder().mergeFrom(value);
} else {
loadBalancingWeight_ = value;
}
} else {
loadBalancingWeightBuilder_.mergeFrom(value);
}
if (loadBalancingWeight_ != null) {
bitField0_ |= 0x00000020;
onChanged();
}
return this;
}
/**
*
* Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
* balancing weight for a locality is divided by the sum of the weights of all
* localities at the same priority level to produce the effective percentage
* of traffic for the locality. The sum of the weights of all localities at
* the same priority level must not exceed uint32_t maximal value (4294967295).
*
* Locality weights are only considered when :ref:`locality weighted load
* balancing <arch_overview_load_balancing_locality_weighted_lb>` is
* configured. These weights are ignored otherwise. If no weights are
* specified when locality weighted load balancing is enabled, the locality is
* assigned no load.
*
*
* .google.protobuf.UInt32Value load_balancing_weight = 3 [(.validate.rules) = { ... }
*/
public Builder clearLoadBalancingWeight() {
bitField0_ = (bitField0_ & ~0x00000020);
loadBalancingWeight_ = null;
if (loadBalancingWeightBuilder_ != null) {
loadBalancingWeightBuilder_.dispose();
loadBalancingWeightBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
* balancing weight for a locality is divided by the sum of the weights of all
* localities at the same priority level to produce the effective percentage
* of traffic for the locality. The sum of the weights of all localities at
* the same priority level must not exceed uint32_t maximal value (4294967295).
*
* Locality weights are only considered when :ref:`locality weighted load
* balancing <arch_overview_load_balancing_locality_weighted_lb>` is
* configured. These weights are ignored otherwise. If no weights are
* specified when locality weighted load balancing is enabled, the locality is
* assigned no load.
*
*
* .google.protobuf.UInt32Value load_balancing_weight = 3 [(.validate.rules) = { ... }
*/
public com.google.protobuf.UInt32Value.Builder getLoadBalancingWeightBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getLoadBalancingWeightFieldBuilder().getBuilder();
}
/**
*
* Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
* balancing weight for a locality is divided by the sum of the weights of all
* localities at the same priority level to produce the effective percentage
* of traffic for the locality. The sum of the weights of all localities at
* the same priority level must not exceed uint32_t maximal value (4294967295).
*
* Locality weights are only considered when :ref:`locality weighted load
* balancing <arch_overview_load_balancing_locality_weighted_lb>` is
* configured. These weights are ignored otherwise. If no weights are
* specified when locality weighted load balancing is enabled, the locality is
* assigned no load.
*
*
* .google.protobuf.UInt32Value load_balancing_weight = 3 [(.validate.rules) = { ... }
*/
public com.google.protobuf.UInt32ValueOrBuilder getLoadBalancingWeightOrBuilder() {
if (loadBalancingWeightBuilder_ != null) {
return loadBalancingWeightBuilder_.getMessageOrBuilder();
} else {
return loadBalancingWeight_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : loadBalancingWeight_;
}
}
/**
*
* Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
* balancing weight for a locality is divided by the sum of the weights of all
* localities at the same priority level to produce the effective percentage
* of traffic for the locality. The sum of the weights of all localities at
* the same priority level must not exceed uint32_t maximal value (4294967295).
*
* Locality weights are only considered when :ref:`locality weighted load
* balancing <arch_overview_load_balancing_locality_weighted_lb>` is
* configured. These weights are ignored otherwise. If no weights are
* specified when locality weighted load balancing is enabled, the locality is
* assigned no load.
*
*
* .google.protobuf.UInt32Value load_balancing_weight = 3 [(.validate.rules) = { ... }
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getLoadBalancingWeightFieldBuilder() {
if (loadBalancingWeightBuilder_ == null) {
loadBalancingWeightBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getLoadBalancingWeight(),
getParentForChildren(),
isClean());
loadBalancingWeight_ = null;
}
return loadBalancingWeightBuilder_;
}
private int priority_ ;
/**
*
* Optional: the priority for this LocalityLbEndpoints. If unspecified this will
* default to the highest priority (0).
*
* Under usual circumstances, Envoy will only select endpoints for the highest
* priority (0). In the event that enough endpoints for a particular priority are
* unavailable/unhealthy, Envoy will fail over to selecting endpoints for the
* next highest priority group. Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>`.
*
* Priorities should range from 0 (highest) to N (lowest) without skipping.
*
*
* uint32 priority = 5 [(.validate.rules) = { ... }
* @return The priority.
*/
@java.lang.Override
public int getPriority() {
return priority_;
}
/**
*
* Optional: the priority for this LocalityLbEndpoints. If unspecified this will
* default to the highest priority (0).
*
* Under usual circumstances, Envoy will only select endpoints for the highest
* priority (0). In the event that enough endpoints for a particular priority are
* unavailable/unhealthy, Envoy will fail over to selecting endpoints for the
* next highest priority group. Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>`.
*
* Priorities should range from 0 (highest) to N (lowest) without skipping.
*
*
* uint32 priority = 5 [(.validate.rules) = { ... }
* @param value The priority to set.
* @return This builder for chaining.
*/
public Builder setPriority(int value) {
priority_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* Optional: the priority for this LocalityLbEndpoints. If unspecified this will
* default to the highest priority (0).
*
* Under usual circumstances, Envoy will only select endpoints for the highest
* priority (0). In the event that enough endpoints for a particular priority are
* unavailable/unhealthy, Envoy will fail over to selecting endpoints for the
* next highest priority group. Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>`.
*
* Priorities should range from 0 (highest) to N (lowest) without skipping.
*
*
* uint32 priority = 5 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearPriority() {
bitField0_ = (bitField0_ & ~0x00000040);
priority_ = 0;
onChanged();
return this;
}
private com.google.protobuf.UInt32Value proximity_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> proximityBuilder_;
/**
*
* Optional: Per locality proximity value which indicates how close this
* locality is from the source locality. This value only provides ordering
* information (lower the value, closer it is to the source locality).
* This will be consumed by load balancing schemes that need proximity order
* to determine where to route the requests.
* [#not-implemented-hide:]
*
*
* .google.protobuf.UInt32Value proximity = 6;
* @return Whether the proximity field is set.
*/
public boolean hasProximity() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
* Optional: Per locality proximity value which indicates how close this
* locality is from the source locality. This value only provides ordering
* information (lower the value, closer it is to the source locality).
* This will be consumed by load balancing schemes that need proximity order
* to determine where to route the requests.
* [#not-implemented-hide:]
*
*
* .google.protobuf.UInt32Value proximity = 6;
* @return The proximity.
*/
public com.google.protobuf.UInt32Value getProximity() {
if (proximityBuilder_ == null) {
return proximity_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : proximity_;
} else {
return proximityBuilder_.getMessage();
}
}
/**
*
* Optional: Per locality proximity value which indicates how close this
* locality is from the source locality. This value only provides ordering
* information (lower the value, closer it is to the source locality).
* This will be consumed by load balancing schemes that need proximity order
* to determine where to route the requests.
* [#not-implemented-hide:]
*
*
* .google.protobuf.UInt32Value proximity = 6;
*/
public Builder setProximity(com.google.protobuf.UInt32Value value) {
if (proximityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
proximity_ = value;
} else {
proximityBuilder_.setMessage(value);
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* Optional: Per locality proximity value which indicates how close this
* locality is from the source locality. This value only provides ordering
* information (lower the value, closer it is to the source locality).
* This will be consumed by load balancing schemes that need proximity order
* to determine where to route the requests.
* [#not-implemented-hide:]
*
*
* .google.protobuf.UInt32Value proximity = 6;
*/
public Builder setProximity(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (proximityBuilder_ == null) {
proximity_ = builderForValue.build();
} else {
proximityBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* Optional: Per locality proximity value which indicates how close this
* locality is from the source locality. This value only provides ordering
* information (lower the value, closer it is to the source locality).
* This will be consumed by load balancing schemes that need proximity order
* to determine where to route the requests.
* [#not-implemented-hide:]
*
*
* .google.protobuf.UInt32Value proximity = 6;
*/
public Builder mergeProximity(com.google.protobuf.UInt32Value value) {
if (proximityBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 0) &&
proximity_ != null &&
proximity_ != com.google.protobuf.UInt32Value.getDefaultInstance()) {
getProximityBuilder().mergeFrom(value);
} else {
proximity_ = value;
}
} else {
proximityBuilder_.mergeFrom(value);
}
if (proximity_ != null) {
bitField0_ |= 0x00000080;
onChanged();
}
return this;
}
/**
*
* Optional: Per locality proximity value which indicates how close this
* locality is from the source locality. This value only provides ordering
* information (lower the value, closer it is to the source locality).
* This will be consumed by load balancing schemes that need proximity order
* to determine where to route the requests.
* [#not-implemented-hide:]
*
*
* .google.protobuf.UInt32Value proximity = 6;
*/
public Builder clearProximity() {
bitField0_ = (bitField0_ & ~0x00000080);
proximity_ = null;
if (proximityBuilder_ != null) {
proximityBuilder_.dispose();
proximityBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Optional: Per locality proximity value which indicates how close this
* locality is from the source locality. This value only provides ordering
* information (lower the value, closer it is to the source locality).
* This will be consumed by load balancing schemes that need proximity order
* to determine where to route the requests.
* [#not-implemented-hide:]
*
*
* .google.protobuf.UInt32Value proximity = 6;
*/
public com.google.protobuf.UInt32Value.Builder getProximityBuilder() {
bitField0_ |= 0x00000080;
onChanged();
return getProximityFieldBuilder().getBuilder();
}
/**
*
* Optional: Per locality proximity value which indicates how close this
* locality is from the source locality. This value only provides ordering
* information (lower the value, closer it is to the source locality).
* This will be consumed by load balancing schemes that need proximity order
* to determine where to route the requests.
* [#not-implemented-hide:]
*
*
* .google.protobuf.UInt32Value proximity = 6;
*/
public com.google.protobuf.UInt32ValueOrBuilder getProximityOrBuilder() {
if (proximityBuilder_ != null) {
return proximityBuilder_.getMessageOrBuilder();
} else {
return proximity_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : proximity_;
}
}
/**
*
* Optional: Per locality proximity value which indicates how close this
* locality is from the source locality. This value only provides ordering
* information (lower the value, closer it is to the source locality).
* This will be consumed by load balancing schemes that need proximity order
* to determine where to route the requests.
* [#not-implemented-hide:]
*
*
* .google.protobuf.UInt32Value proximity = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getProximityFieldBuilder() {
if (proximityBuilder_ == null) {
proximityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getProximity(),
getParentForChildren(),
isClean());
proximity_ = null;
}
return proximityBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.config.endpoint.v3.LocalityLbEndpoints)
}
// @@protoc_insertion_point(class_scope:envoy.config.endpoint.v3.LocalityLbEndpoints)
private static final io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints();
}
public static io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LocalityLbEndpoints parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
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.LocalityLbEndpoints getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy