io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: service_config.proto
// Protobuf Java Version: 3.25.4
package io.grpc.serviceconfig;
/**
*
* Configuration for xds_cluster_manager_experimental LB policy.
*
*
* Protobuf type {@code grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig}
*/
public final class XdsClusterManagerLoadBalancingPolicyConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig)
XdsClusterManagerLoadBalancingPolicyConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use XdsClusterManagerLoadBalancingPolicyConfig.newBuilder() to construct.
private XdsClusterManagerLoadBalancingPolicyConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private XdsClusterManagerLoadBalancingPolicyConfig() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new XdsClusterManagerLoadBalancingPolicyConfig();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsClusterManagerLoadBalancingPolicyConfig_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 1:
return internalGetChildren();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsClusterManagerLoadBalancingPolicyConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.class, io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Builder.class);
}
public interface ChildOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig.Child)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
java.util.List
getChildPolicyList();
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
io.grpc.serviceconfig.LoadBalancingConfig getChildPolicy(int index);
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
int getChildPolicyCount();
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
java.util.List extends io.grpc.serviceconfig.LoadBalancingConfigOrBuilder>
getChildPolicyOrBuilderList();
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
io.grpc.serviceconfig.LoadBalancingConfigOrBuilder getChildPolicyOrBuilder(
int index);
}
/**
* Protobuf type {@code grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig.Child}
*/
public static final class Child extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig.Child)
ChildOrBuilder {
private static final long serialVersionUID = 0L;
// Use Child.newBuilder() to construct.
private Child(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Child() {
childPolicy_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Child();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsClusterManagerLoadBalancingPolicyConfig_Child_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsClusterManagerLoadBalancingPolicyConfig_Child_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child.class, io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child.Builder.class);
}
public static final int CHILD_POLICY_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List childPolicy_;
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
@java.lang.Override
public java.util.List getChildPolicyList() {
return childPolicy_;
}
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
@java.lang.Override
public java.util.List extends io.grpc.serviceconfig.LoadBalancingConfigOrBuilder>
getChildPolicyOrBuilderList() {
return childPolicy_;
}
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
@java.lang.Override
public int getChildPolicyCount() {
return childPolicy_.size();
}
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
@java.lang.Override
public io.grpc.serviceconfig.LoadBalancingConfig getChildPolicy(int index) {
return childPolicy_.get(index);
}
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
@java.lang.Override
public io.grpc.serviceconfig.LoadBalancingConfigOrBuilder getChildPolicyOrBuilder(
int index) {
return childPolicy_.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 < childPolicy_.size(); i++) {
output.writeMessage(1, childPolicy_.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 < childPolicy_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, childPolicy_.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.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child)) {
return super.equals(obj);
}
io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child other = (io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child) obj;
if (!getChildPolicyList()
.equals(other.getChildPolicyList())) 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 (getChildPolicyCount() > 0) {
hash = (37 * hash) + CHILD_POLICY_FIELD_NUMBER;
hash = (53 * hash) + getChildPolicyList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child 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.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child 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.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child 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.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child 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;
}
/**
* Protobuf type {@code grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig.Child}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig.Child)
io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.ChildOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsClusterManagerLoadBalancingPolicyConfig_Child_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsClusterManagerLoadBalancingPolicyConfig_Child_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child.class, io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child.Builder.class);
}
// Construct using io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (childPolicyBuilder_ == null) {
childPolicy_ = java.util.Collections.emptyList();
} else {
childPolicy_ = null;
childPolicyBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsClusterManagerLoadBalancingPolicyConfig_Child_descriptor;
}
@java.lang.Override
public io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child getDefaultInstanceForType() {
return io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child.getDefaultInstance();
}
@java.lang.Override
public io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child build() {
io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child buildPartial() {
io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child result = new io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child result) {
if (childPolicyBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
childPolicy_ = java.util.Collections.unmodifiableList(childPolicy_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.childPolicy_ = childPolicy_;
} else {
result.childPolicy_ = childPolicyBuilder_.build();
}
}
private void buildPartial0(io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child 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.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child) {
return mergeFrom((io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child other) {
if (other == io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child.getDefaultInstance()) return this;
if (childPolicyBuilder_ == null) {
if (!other.childPolicy_.isEmpty()) {
if (childPolicy_.isEmpty()) {
childPolicy_ = other.childPolicy_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureChildPolicyIsMutable();
childPolicy_.addAll(other.childPolicy_);
}
onChanged();
}
} else {
if (!other.childPolicy_.isEmpty()) {
if (childPolicyBuilder_.isEmpty()) {
childPolicyBuilder_.dispose();
childPolicyBuilder_ = null;
childPolicy_ = other.childPolicy_;
bitField0_ = (bitField0_ & ~0x00000001);
childPolicyBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getChildPolicyFieldBuilder() : null;
} else {
childPolicyBuilder_.addAllMessages(other.childPolicy_);
}
}
}
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.grpc.serviceconfig.LoadBalancingConfig m =
input.readMessage(
io.grpc.serviceconfig.LoadBalancingConfig.parser(),
extensionRegistry);
if (childPolicyBuilder_ == null) {
ensureChildPolicyIsMutable();
childPolicy_.add(m);
} else {
childPolicyBuilder_.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 childPolicy_ =
java.util.Collections.emptyList();
private void ensureChildPolicyIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
childPolicy_ = new java.util.ArrayList(childPolicy_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.grpc.serviceconfig.LoadBalancingConfig, io.grpc.serviceconfig.LoadBalancingConfig.Builder, io.grpc.serviceconfig.LoadBalancingConfigOrBuilder> childPolicyBuilder_;
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
public java.util.List getChildPolicyList() {
if (childPolicyBuilder_ == null) {
return java.util.Collections.unmodifiableList(childPolicy_);
} else {
return childPolicyBuilder_.getMessageList();
}
}
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
public int getChildPolicyCount() {
if (childPolicyBuilder_ == null) {
return childPolicy_.size();
} else {
return childPolicyBuilder_.getCount();
}
}
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
public io.grpc.serviceconfig.LoadBalancingConfig getChildPolicy(int index) {
if (childPolicyBuilder_ == null) {
return childPolicy_.get(index);
} else {
return childPolicyBuilder_.getMessage(index);
}
}
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
public Builder setChildPolicy(
int index, io.grpc.serviceconfig.LoadBalancingConfig value) {
if (childPolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureChildPolicyIsMutable();
childPolicy_.set(index, value);
onChanged();
} else {
childPolicyBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
public Builder setChildPolicy(
int index, io.grpc.serviceconfig.LoadBalancingConfig.Builder builderForValue) {
if (childPolicyBuilder_ == null) {
ensureChildPolicyIsMutable();
childPolicy_.set(index, builderForValue.build());
onChanged();
} else {
childPolicyBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
public Builder addChildPolicy(io.grpc.serviceconfig.LoadBalancingConfig value) {
if (childPolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureChildPolicyIsMutable();
childPolicy_.add(value);
onChanged();
} else {
childPolicyBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
public Builder addChildPolicy(
int index, io.grpc.serviceconfig.LoadBalancingConfig value) {
if (childPolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureChildPolicyIsMutable();
childPolicy_.add(index, value);
onChanged();
} else {
childPolicyBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
public Builder addChildPolicy(
io.grpc.serviceconfig.LoadBalancingConfig.Builder builderForValue) {
if (childPolicyBuilder_ == null) {
ensureChildPolicyIsMutable();
childPolicy_.add(builderForValue.build());
onChanged();
} else {
childPolicyBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
public Builder addChildPolicy(
int index, io.grpc.serviceconfig.LoadBalancingConfig.Builder builderForValue) {
if (childPolicyBuilder_ == null) {
ensureChildPolicyIsMutable();
childPolicy_.add(index, builderForValue.build());
onChanged();
} else {
childPolicyBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
public Builder addAllChildPolicy(
java.lang.Iterable extends io.grpc.serviceconfig.LoadBalancingConfig> values) {
if (childPolicyBuilder_ == null) {
ensureChildPolicyIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, childPolicy_);
onChanged();
} else {
childPolicyBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
public Builder clearChildPolicy() {
if (childPolicyBuilder_ == null) {
childPolicy_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
childPolicyBuilder_.clear();
}
return this;
}
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
public Builder removeChildPolicy(int index) {
if (childPolicyBuilder_ == null) {
ensureChildPolicyIsMutable();
childPolicy_.remove(index);
onChanged();
} else {
childPolicyBuilder_.remove(index);
}
return this;
}
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
public io.grpc.serviceconfig.LoadBalancingConfig.Builder getChildPolicyBuilder(
int index) {
return getChildPolicyFieldBuilder().getBuilder(index);
}
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
public io.grpc.serviceconfig.LoadBalancingConfigOrBuilder getChildPolicyOrBuilder(
int index) {
if (childPolicyBuilder_ == null) {
return childPolicy_.get(index); } else {
return childPolicyBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
public java.util.List extends io.grpc.serviceconfig.LoadBalancingConfigOrBuilder>
getChildPolicyOrBuilderList() {
if (childPolicyBuilder_ != null) {
return childPolicyBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(childPolicy_);
}
}
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
public io.grpc.serviceconfig.LoadBalancingConfig.Builder addChildPolicyBuilder() {
return getChildPolicyFieldBuilder().addBuilder(
io.grpc.serviceconfig.LoadBalancingConfig.getDefaultInstance());
}
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
public io.grpc.serviceconfig.LoadBalancingConfig.Builder addChildPolicyBuilder(
int index) {
return getChildPolicyFieldBuilder().addBuilder(
index, io.grpc.serviceconfig.LoadBalancingConfig.getDefaultInstance());
}
/**
* repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
*/
public java.util.List
getChildPolicyBuilderList() {
return getChildPolicyFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.grpc.serviceconfig.LoadBalancingConfig, io.grpc.serviceconfig.LoadBalancingConfig.Builder, io.grpc.serviceconfig.LoadBalancingConfigOrBuilder>
getChildPolicyFieldBuilder() {
if (childPolicyBuilder_ == null) {
childPolicyBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.grpc.serviceconfig.LoadBalancingConfig, io.grpc.serviceconfig.LoadBalancingConfig.Builder, io.grpc.serviceconfig.LoadBalancingConfigOrBuilder>(
childPolicy_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
childPolicy_ = null;
}
return childPolicyBuilder_;
}
@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:grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig.Child)
}
// @@protoc_insertion_point(class_scope:grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig.Child)
private static final io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child();
}
public static io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Child 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.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int CHILDREN_FIELD_NUMBER = 1;
private static final class ChildrenDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsClusterManagerLoadBalancingPolicyConfig_ChildrenEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child.getDefaultInstance());
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.String, io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child> children_;
private com.google.protobuf.MapField
internalGetChildren() {
if (children_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ChildrenDefaultEntryHolder.defaultEntry);
}
return children_;
}
public int getChildrenCount() {
return internalGetChildren().getMap().size();
}
/**
* map<string, .grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig.Child> children = 1;
*/
@java.lang.Override
public boolean containsChildren(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetChildren().getMap().containsKey(key);
}
/**
* Use {@link #getChildrenMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getChildren() {
return getChildrenMap();
}
/**
* map<string, .grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig.Child> children = 1;
*/
@java.lang.Override
public java.util.Map getChildrenMap() {
return internalGetChildren().getMap();
}
/**
* map<string, .grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig.Child> children = 1;
*/
@java.lang.Override
public /* nullable */
io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child getChildrenOrDefault(
java.lang.String key,
/* nullable */
io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetChildren().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, .grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig.Child> children = 1;
*/
@java.lang.Override
public io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child getChildrenOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetChildren().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
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 {
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetChildren(),
ChildrenDefaultEntryHolder.defaultEntry,
1);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (java.util.Map.Entry entry
: internalGetChildren().getMap().entrySet()) {
com.google.protobuf.MapEntry
children__ = ChildrenDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, children__);
}
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.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig)) {
return super.equals(obj);
}
io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig other = (io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig) obj;
if (!internalGetChildren().equals(
other.internalGetChildren())) 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 (!internalGetChildren().getMap().isEmpty()) {
hash = (37 * hash) + CHILDREN_FIELD_NUMBER;
hash = (53 * hash) + internalGetChildren().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig 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.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig 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.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig 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.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig 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;
}
/**
*
* Configuration for xds_cluster_manager_experimental LB policy.
*
*
* Protobuf type {@code grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig)
io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsClusterManagerLoadBalancingPolicyConfig_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 1:
return internalGetChildren();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 1:
return internalGetMutableChildren();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsClusterManagerLoadBalancingPolicyConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.class, io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Builder.class);
}
// Construct using io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
internalGetMutableChildren().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsClusterManagerLoadBalancingPolicyConfig_descriptor;
}
@java.lang.Override
public io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig getDefaultInstanceForType() {
return io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.getDefaultInstance();
}
@java.lang.Override
public io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig build() {
io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig buildPartial() {
io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig result = new io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.children_ = internalGetChildren().build(ChildrenDefaultEntryHolder.defaultEntry);
}
}
@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.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig) {
return mergeFrom((io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig other) {
if (other == io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.getDefaultInstance()) return this;
internalGetMutableChildren().mergeFrom(
other.internalGetChildren());
bitField0_ |= 0x00000001;
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: {
com.google.protobuf.MapEntry
children__ = input.readMessage(
ChildrenDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableChildren().ensureBuilderMap().put(
children__.getKey(), children__.getValue());
bitField0_ |= 0x00000001;
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 static final class ChildrenConverter implements com.google.protobuf.MapFieldBuilder.Converter {
@java.lang.Override
public io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child build(io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.ChildOrBuilder val) {
if (val instanceof io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child) { return (io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child) val; }
return ((io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child.Builder) val).build();
}
@java.lang.Override
public com.google.protobuf.MapEntry defaultEntry() {
return ChildrenDefaultEntryHolder.defaultEntry;
}
};
private static final ChildrenConverter childrenConverter = new ChildrenConverter();
private com.google.protobuf.MapFieldBuilder<
java.lang.String, io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.ChildOrBuilder, io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child, io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child.Builder> children_;
private com.google.protobuf.MapFieldBuilder
internalGetChildren() {
if (children_ == null) {
return new com.google.protobuf.MapFieldBuilder<>(childrenConverter);
}
return children_;
}
private com.google.protobuf.MapFieldBuilder
internalGetMutableChildren() {
if (children_ == null) {
children_ = new com.google.protobuf.MapFieldBuilder<>(childrenConverter);
}
bitField0_ |= 0x00000001;
onChanged();
return children_;
}
public int getChildrenCount() {
return internalGetChildren().ensureBuilderMap().size();
}
/**
* map<string, .grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig.Child> children = 1;
*/
@java.lang.Override
public boolean containsChildren(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetChildren().ensureBuilderMap().containsKey(key);
}
/**
* Use {@link #getChildrenMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getChildren() {
return getChildrenMap();
}
/**
* map<string, .grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig.Child> children = 1;
*/
@java.lang.Override
public java.util.Map getChildrenMap() {
return internalGetChildren().getImmutableMap();
}
/**
* map<string, .grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig.Child> children = 1;
*/
@java.lang.Override
public /* nullable */
io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child getChildrenOrDefault(
java.lang.String key,
/* nullable */
io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map = internalGetMutableChildren().ensureBuilderMap();
return map.containsKey(key) ? childrenConverter.build(map.get(key)) : defaultValue;
}
/**
* map<string, .grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig.Child> children = 1;
*/
@java.lang.Override
public io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child getChildrenOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map = internalGetMutableChildren().ensureBuilderMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return childrenConverter.build(map.get(key));
}
public Builder clearChildren() {
bitField0_ = (bitField0_ & ~0x00000001);
internalGetMutableChildren().clear();
return this;
}
/**
* map<string, .grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig.Child> children = 1;
*/
public Builder removeChildren(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableChildren().ensureBuilderMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableChildren() {
bitField0_ |= 0x00000001;
return internalGetMutableChildren().ensureMessageMap();
}
/**
* map<string, .grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig.Child> children = 1;
*/
public Builder putChildren(
java.lang.String key,
io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableChildren().ensureBuilderMap()
.put(key, value);
bitField0_ |= 0x00000001;
return this;
}
/**
* map<string, .grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig.Child> children = 1;
*/
public Builder putAllChildren(
java.util.Map values) {
for (java.util.Map.Entry e : values.entrySet()) {
if (e.getKey() == null || e.getValue() == null) {
throw new NullPointerException();
}
}
internalGetMutableChildren().ensureBuilderMap()
.putAll(values);
bitField0_ |= 0x00000001;
return this;
}
/**
* map<string, .grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig.Child> children = 1;
*/
public io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child.Builder putChildrenBuilderIfAbsent(
java.lang.String key) {
java.util.Map builderMap = internalGetMutableChildren().ensureBuilderMap();
io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.ChildOrBuilder entry = builderMap.get(key);
if (entry == null) {
entry = io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child.newBuilder();
builderMap.put(key, entry);
}
if (entry instanceof io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child) {
entry = ((io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child) entry).toBuilder();
builderMap.put(key, entry);
}
return (io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig.Child.Builder) entry;
}
@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:grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig)
}
// @@protoc_insertion_point(class_scope:grpc.service_config.XdsClusterManagerLoadBalancingPolicyConfig)
private static final io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig();
}
public static io.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public XdsClusterManagerLoadBalancingPolicyConfig 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.grpc.serviceconfig.XdsClusterManagerLoadBalancingPolicyConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy