All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.grpc.serviceconfig.XdsConfig Maven / Gradle / Ivy

There is a newer version: 2.50.0
Show newest version
// 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 LB policy.
 * 
* * Protobuf type {@code grpc.service_config.XdsConfig} */ public final class XdsConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:grpc.service_config.XdsConfig) XdsConfigOrBuilder { private static final long serialVersionUID = 0L; // Use XdsConfig.newBuilder() to construct. private XdsConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private XdsConfig() { balancerName_ = ""; childPolicy_ = java.util.Collections.emptyList(); fallbackPolicy_ = java.util.Collections.emptyList(); edsServiceName_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new XdsConfig(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grpc.serviceconfig.XdsConfig.class, io.grpc.serviceconfig.XdsConfig.Builder.class); } private int bitField0_; public static final int BALANCER_NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object balancerName_ = ""; /** *
   * Name of balancer to connect to.
   * 
* * string balancer_name = 1 [deprecated = true]; * @deprecated grpc.service_config.XdsConfig.balancer_name is deprecated. * See service_config.proto;l=432 * @return The balancerName. */ @java.lang.Override @java.lang.Deprecated public java.lang.String getBalancerName() { java.lang.Object ref = balancerName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); balancerName_ = s; return s; } } /** *
   * Name of balancer to connect to.
   * 
* * string balancer_name = 1 [deprecated = true]; * @deprecated grpc.service_config.XdsConfig.balancer_name is deprecated. * See service_config.proto;l=432 * @return The bytes for balancerName. */ @java.lang.Override @java.lang.Deprecated public com.google.protobuf.ByteString getBalancerNameBytes() { java.lang.Object ref = balancerName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); balancerName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CHILD_POLICY_FIELD_NUMBER = 2; @SuppressWarnings("serial") private java.util.List childPolicy_; /** *
   * Optional.  What LB policy to use for intra-locality routing.
   * If unset, will use whatever algorithm is specified by the balancer.
   * Multiple LB policies can be specified; clients will iterate through
   * the list in order and stop at the first policy that they support.
   * 
* * repeated .grpc.service_config.LoadBalancingConfig child_policy = 2; */ @java.lang.Override public java.util.List getChildPolicyList() { return childPolicy_; } /** *
   * Optional.  What LB policy to use for intra-locality routing.
   * If unset, will use whatever algorithm is specified by the balancer.
   * Multiple LB policies can be specified; clients will iterate through
   * the list in order and stop at the first policy that they support.
   * 
* * repeated .grpc.service_config.LoadBalancingConfig child_policy = 2; */ @java.lang.Override public java.util.List getChildPolicyOrBuilderList() { return childPolicy_; } /** *
   * Optional.  What LB policy to use for intra-locality routing.
   * If unset, will use whatever algorithm is specified by the balancer.
   * Multiple LB policies can be specified; clients will iterate through
   * the list in order and stop at the first policy that they support.
   * 
* * repeated .grpc.service_config.LoadBalancingConfig child_policy = 2; */ @java.lang.Override public int getChildPolicyCount() { return childPolicy_.size(); } /** *
   * Optional.  What LB policy to use for intra-locality routing.
   * If unset, will use whatever algorithm is specified by the balancer.
   * Multiple LB policies can be specified; clients will iterate through
   * the list in order and stop at the first policy that they support.
   * 
* * repeated .grpc.service_config.LoadBalancingConfig child_policy = 2; */ @java.lang.Override public io.grpc.serviceconfig.LoadBalancingConfig getChildPolicy(int index) { return childPolicy_.get(index); } /** *
   * Optional.  What LB policy to use for intra-locality routing.
   * If unset, will use whatever algorithm is specified by the balancer.
   * Multiple LB policies can be specified; clients will iterate through
   * the list in order and stop at the first policy that they support.
   * 
* * repeated .grpc.service_config.LoadBalancingConfig child_policy = 2; */ @java.lang.Override public io.grpc.serviceconfig.LoadBalancingConfigOrBuilder getChildPolicyOrBuilder( int index) { return childPolicy_.get(index); } public static final int FALLBACK_POLICY_FIELD_NUMBER = 3; @SuppressWarnings("serial") private java.util.List fallbackPolicy_; /** *
   * Optional.  What LB policy to use in fallback mode.  If not
   * specified, defaults to round_robin.
   * Multiple LB policies can be specified; clients will iterate through
   * the list in order and stop at the first policy that they support.
   * 
* * repeated .grpc.service_config.LoadBalancingConfig fallback_policy = 3; */ @java.lang.Override public java.util.List getFallbackPolicyList() { return fallbackPolicy_; } /** *
   * Optional.  What LB policy to use in fallback mode.  If not
   * specified, defaults to round_robin.
   * Multiple LB policies can be specified; clients will iterate through
   * the list in order and stop at the first policy that they support.
   * 
* * repeated .grpc.service_config.LoadBalancingConfig fallback_policy = 3; */ @java.lang.Override public java.util.List getFallbackPolicyOrBuilderList() { return fallbackPolicy_; } /** *
   * Optional.  What LB policy to use in fallback mode.  If not
   * specified, defaults to round_robin.
   * Multiple LB policies can be specified; clients will iterate through
   * the list in order and stop at the first policy that they support.
   * 
* * repeated .grpc.service_config.LoadBalancingConfig fallback_policy = 3; */ @java.lang.Override public int getFallbackPolicyCount() { return fallbackPolicy_.size(); } /** *
   * Optional.  What LB policy to use in fallback mode.  If not
   * specified, defaults to round_robin.
   * Multiple LB policies can be specified; clients will iterate through
   * the list in order and stop at the first policy that they support.
   * 
* * repeated .grpc.service_config.LoadBalancingConfig fallback_policy = 3; */ @java.lang.Override public io.grpc.serviceconfig.LoadBalancingConfig getFallbackPolicy(int index) { return fallbackPolicy_.get(index); } /** *
   * Optional.  What LB policy to use in fallback mode.  If not
   * specified, defaults to round_robin.
   * Multiple LB policies can be specified; clients will iterate through
   * the list in order and stop at the first policy that they support.
   * 
* * repeated .grpc.service_config.LoadBalancingConfig fallback_policy = 3; */ @java.lang.Override public io.grpc.serviceconfig.LoadBalancingConfigOrBuilder getFallbackPolicyOrBuilder( int index) { return fallbackPolicy_.get(index); } public static final int EDS_SERVICE_NAME_FIELD_NUMBER = 4; @SuppressWarnings("serial") private volatile java.lang.Object edsServiceName_ = ""; /** *
   * Optional.  Name to use in EDS query.  If not present, defaults to
   * the server name from the target URI.
   * 
* * string eds_service_name = 4; * @return The edsServiceName. */ @java.lang.Override public java.lang.String getEdsServiceName() { java.lang.Object ref = edsServiceName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); edsServiceName_ = s; return s; } } /** *
   * Optional.  Name to use in EDS query.  If not present, defaults to
   * the server name from the target URI.
   * 
* * string eds_service_name = 4; * @return The bytes for edsServiceName. */ @java.lang.Override public com.google.protobuf.ByteString getEdsServiceNameBytes() { java.lang.Object ref = edsServiceName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); edsServiceName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LRS_LOAD_REPORTING_SERVER_NAME_FIELD_NUMBER = 5; private com.google.protobuf.StringValue lrsLoadReportingServerName_; /** *
   * LRS server to send load reports to.
   * If not present, load reporting will be disabled.
   * If set to the empty string, load reporting will be sent to the same
   * server that we obtained CDS data from.
   * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 5; * @return Whether the lrsLoadReportingServerName field is set. */ @java.lang.Override public boolean hasLrsLoadReportingServerName() { return ((bitField0_ & 0x00000001) != 0); } /** *
   * LRS server to send load reports to.
   * If not present, load reporting will be disabled.
   * If set to the empty string, load reporting will be sent to the same
   * server that we obtained CDS data from.
   * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 5; * @return The lrsLoadReportingServerName. */ @java.lang.Override public com.google.protobuf.StringValue getLrsLoadReportingServerName() { return lrsLoadReportingServerName_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : lrsLoadReportingServerName_; } /** *
   * LRS server to send load reports to.
   * If not present, load reporting will be disabled.
   * If set to the empty string, load reporting will be sent to the same
   * server that we obtained CDS data from.
   * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 5; */ @java.lang.Override public com.google.protobuf.StringValueOrBuilder getLrsLoadReportingServerNameOrBuilder() { return lrsLoadReportingServerName_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : lrsLoadReportingServerName_; } 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(balancerName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, balancerName_); } for (int i = 0; i < childPolicy_.size(); i++) { output.writeMessage(2, childPolicy_.get(i)); } for (int i = 0; i < fallbackPolicy_.size(); i++) { output.writeMessage(3, fallbackPolicy_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(edsServiceName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, edsServiceName_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(5, getLrsLoadReportingServerName()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(balancerName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, balancerName_); } for (int i = 0; i < childPolicy_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, childPolicy_.get(i)); } for (int i = 0; i < fallbackPolicy_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, fallbackPolicy_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(edsServiceName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, edsServiceName_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, getLrsLoadReportingServerName()); } 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.XdsConfig)) { return super.equals(obj); } io.grpc.serviceconfig.XdsConfig other = (io.grpc.serviceconfig.XdsConfig) obj; if (!getBalancerName() .equals(other.getBalancerName())) return false; if (!getChildPolicyList() .equals(other.getChildPolicyList())) return false; if (!getFallbackPolicyList() .equals(other.getFallbackPolicyList())) return false; if (!getEdsServiceName() .equals(other.getEdsServiceName())) return false; if (hasLrsLoadReportingServerName() != other.hasLrsLoadReportingServerName()) return false; if (hasLrsLoadReportingServerName()) { if (!getLrsLoadReportingServerName() .equals(other.getLrsLoadReportingServerName())) 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(); hash = (37 * hash) + BALANCER_NAME_FIELD_NUMBER; hash = (53 * hash) + getBalancerName().hashCode(); if (getChildPolicyCount() > 0) { hash = (37 * hash) + CHILD_POLICY_FIELD_NUMBER; hash = (53 * hash) + getChildPolicyList().hashCode(); } if (getFallbackPolicyCount() > 0) { hash = (37 * hash) + FALLBACK_POLICY_FIELD_NUMBER; hash = (53 * hash) + getFallbackPolicyList().hashCode(); } hash = (37 * hash) + EDS_SERVICE_NAME_FIELD_NUMBER; hash = (53 * hash) + getEdsServiceName().hashCode(); if (hasLrsLoadReportingServerName()) { hash = (37 * hash) + LRS_LOAD_REPORTING_SERVER_NAME_FIELD_NUMBER; hash = (53 * hash) + getLrsLoadReportingServerName().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static io.grpc.serviceconfig.XdsConfig parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.grpc.serviceconfig.XdsConfig 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.XdsConfig parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.grpc.serviceconfig.XdsConfig 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.XdsConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.grpc.serviceconfig.XdsConfig parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.grpc.serviceconfig.XdsConfig parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.grpc.serviceconfig.XdsConfig 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.XdsConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.grpc.serviceconfig.XdsConfig 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.XdsConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.grpc.serviceconfig.XdsConfig 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.XdsConfig 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 LB policy.
   * 
* * Protobuf type {@code grpc.service_config.XdsConfig} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:grpc.service_config.XdsConfig) io.grpc.serviceconfig.XdsConfigOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grpc.serviceconfig.XdsConfig.class, io.grpc.serviceconfig.XdsConfig.Builder.class); } // Construct using io.grpc.serviceconfig.XdsConfig.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getChildPolicyFieldBuilder(); getFallbackPolicyFieldBuilder(); getLrsLoadReportingServerNameFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; balancerName_ = ""; if (childPolicyBuilder_ == null) { childPolicy_ = java.util.Collections.emptyList(); } else { childPolicy_ = null; childPolicyBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); if (fallbackPolicyBuilder_ == null) { fallbackPolicy_ = java.util.Collections.emptyList(); } else { fallbackPolicy_ = null; fallbackPolicyBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); edsServiceName_ = ""; lrsLoadReportingServerName_ = null; if (lrsLoadReportingServerNameBuilder_ != null) { lrsLoadReportingServerNameBuilder_.dispose(); lrsLoadReportingServerNameBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsConfig_descriptor; } @java.lang.Override public io.grpc.serviceconfig.XdsConfig getDefaultInstanceForType() { return io.grpc.serviceconfig.XdsConfig.getDefaultInstance(); } @java.lang.Override public io.grpc.serviceconfig.XdsConfig build() { io.grpc.serviceconfig.XdsConfig result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.grpc.serviceconfig.XdsConfig buildPartial() { io.grpc.serviceconfig.XdsConfig result = new io.grpc.serviceconfig.XdsConfig(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(io.grpc.serviceconfig.XdsConfig result) { if (childPolicyBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { childPolicy_ = java.util.Collections.unmodifiableList(childPolicy_); bitField0_ = (bitField0_ & ~0x00000002); } result.childPolicy_ = childPolicy_; } else { result.childPolicy_ = childPolicyBuilder_.build(); } if (fallbackPolicyBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0)) { fallbackPolicy_ = java.util.Collections.unmodifiableList(fallbackPolicy_); bitField0_ = (bitField0_ & ~0x00000004); } result.fallbackPolicy_ = fallbackPolicy_; } else { result.fallbackPolicy_ = fallbackPolicyBuilder_.build(); } } private void buildPartial0(io.grpc.serviceconfig.XdsConfig result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.balancerName_ = balancerName_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.edsServiceName_ = edsServiceName_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000010) != 0)) { result.lrsLoadReportingServerName_ = lrsLoadReportingServerNameBuilder_ == null ? lrsLoadReportingServerName_ : lrsLoadReportingServerNameBuilder_.build(); to_bitField0_ |= 0x00000001; } result.bitField0_ |= to_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.XdsConfig) { return mergeFrom((io.grpc.serviceconfig.XdsConfig)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.grpc.serviceconfig.XdsConfig other) { if (other == io.grpc.serviceconfig.XdsConfig.getDefaultInstance()) return this; if (!other.getBalancerName().isEmpty()) { balancerName_ = other.balancerName_; bitField0_ |= 0x00000001; onChanged(); } if (childPolicyBuilder_ == null) { if (!other.childPolicy_.isEmpty()) { if (childPolicy_.isEmpty()) { childPolicy_ = other.childPolicy_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureChildPolicyIsMutable(); childPolicy_.addAll(other.childPolicy_); } onChanged(); } } else { if (!other.childPolicy_.isEmpty()) { if (childPolicyBuilder_.isEmpty()) { childPolicyBuilder_.dispose(); childPolicyBuilder_ = null; childPolicy_ = other.childPolicy_; bitField0_ = (bitField0_ & ~0x00000002); childPolicyBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getChildPolicyFieldBuilder() : null; } else { childPolicyBuilder_.addAllMessages(other.childPolicy_); } } } if (fallbackPolicyBuilder_ == null) { if (!other.fallbackPolicy_.isEmpty()) { if (fallbackPolicy_.isEmpty()) { fallbackPolicy_ = other.fallbackPolicy_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureFallbackPolicyIsMutable(); fallbackPolicy_.addAll(other.fallbackPolicy_); } onChanged(); } } else { if (!other.fallbackPolicy_.isEmpty()) { if (fallbackPolicyBuilder_.isEmpty()) { fallbackPolicyBuilder_.dispose(); fallbackPolicyBuilder_ = null; fallbackPolicy_ = other.fallbackPolicy_; bitField0_ = (bitField0_ & ~0x00000004); fallbackPolicyBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getFallbackPolicyFieldBuilder() : null; } else { fallbackPolicyBuilder_.addAllMessages(other.fallbackPolicy_); } } } if (!other.getEdsServiceName().isEmpty()) { edsServiceName_ = other.edsServiceName_; bitField0_ |= 0x00000008; onChanged(); } if (other.hasLrsLoadReportingServerName()) { mergeLrsLoadReportingServerName(other.getLrsLoadReportingServerName()); } 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: { balancerName_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { 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 18 case 26: { io.grpc.serviceconfig.LoadBalancingConfig m = input.readMessage( io.grpc.serviceconfig.LoadBalancingConfig.parser(), extensionRegistry); if (fallbackPolicyBuilder_ == null) { ensureFallbackPolicyIsMutable(); fallbackPolicy_.add(m); } else { fallbackPolicyBuilder_.addMessage(m); } break; } // case 26 case 34: { edsServiceName_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000008; break; } // case 34 case 42: { input.readMessage( getLrsLoadReportingServerNameFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object balancerName_ = ""; /** *
     * Name of balancer to connect to.
     * 
* * string balancer_name = 1 [deprecated = true]; * @deprecated grpc.service_config.XdsConfig.balancer_name is deprecated. * See service_config.proto;l=432 * @return The balancerName. */ @java.lang.Deprecated public java.lang.String getBalancerName() { java.lang.Object ref = balancerName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); balancerName_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Name of balancer to connect to.
     * 
* * string balancer_name = 1 [deprecated = true]; * @deprecated grpc.service_config.XdsConfig.balancer_name is deprecated. * See service_config.proto;l=432 * @return The bytes for balancerName. */ @java.lang.Deprecated public com.google.protobuf.ByteString getBalancerNameBytes() { java.lang.Object ref = balancerName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); balancerName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Name of balancer to connect to.
     * 
* * string balancer_name = 1 [deprecated = true]; * @deprecated grpc.service_config.XdsConfig.balancer_name is deprecated. * See service_config.proto;l=432 * @param value The balancerName to set. * @return This builder for chaining. */ @java.lang.Deprecated public Builder setBalancerName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } balancerName_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * Name of balancer to connect to.
     * 
* * string balancer_name = 1 [deprecated = true]; * @deprecated grpc.service_config.XdsConfig.balancer_name is deprecated. * See service_config.proto;l=432 * @return This builder for chaining. */ @java.lang.Deprecated public Builder clearBalancerName() { balancerName_ = getDefaultInstance().getBalancerName(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
     * Name of balancer to connect to.
     * 
* * string balancer_name = 1 [deprecated = true]; * @deprecated grpc.service_config.XdsConfig.balancer_name is deprecated. * See service_config.proto;l=432 * @param value The bytes for balancerName to set. * @return This builder for chaining. */ @java.lang.Deprecated public Builder setBalancerNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); balancerName_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.util.List childPolicy_ = java.util.Collections.emptyList(); private void ensureChildPolicyIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { childPolicy_ = new java.util.ArrayList(childPolicy_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< io.grpc.serviceconfig.LoadBalancingConfig, io.grpc.serviceconfig.LoadBalancingConfig.Builder, io.grpc.serviceconfig.LoadBalancingConfigOrBuilder> childPolicyBuilder_; /** *
     * Optional.  What LB policy to use for intra-locality routing.
     * If unset, will use whatever algorithm is specified by the balancer.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig child_policy = 2; */ public java.util.List getChildPolicyList() { if (childPolicyBuilder_ == null) { return java.util.Collections.unmodifiableList(childPolicy_); } else { return childPolicyBuilder_.getMessageList(); } } /** *
     * Optional.  What LB policy to use for intra-locality routing.
     * If unset, will use whatever algorithm is specified by the balancer.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig child_policy = 2; */ public int getChildPolicyCount() { if (childPolicyBuilder_ == null) { return childPolicy_.size(); } else { return childPolicyBuilder_.getCount(); } } /** *
     * Optional.  What LB policy to use for intra-locality routing.
     * If unset, will use whatever algorithm is specified by the balancer.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig child_policy = 2; */ public io.grpc.serviceconfig.LoadBalancingConfig getChildPolicy(int index) { if (childPolicyBuilder_ == null) { return childPolicy_.get(index); } else { return childPolicyBuilder_.getMessage(index); } } /** *
     * Optional.  What LB policy to use for intra-locality routing.
     * If unset, will use whatever algorithm is specified by the balancer.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig child_policy = 2; */ 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; } /** *
     * Optional.  What LB policy to use for intra-locality routing.
     * If unset, will use whatever algorithm is specified by the balancer.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig child_policy = 2; */ 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; } /** *
     * Optional.  What LB policy to use for intra-locality routing.
     * If unset, will use whatever algorithm is specified by the balancer.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig child_policy = 2; */ 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; } /** *
     * Optional.  What LB policy to use for intra-locality routing.
     * If unset, will use whatever algorithm is specified by the balancer.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig child_policy = 2; */ 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; } /** *
     * Optional.  What LB policy to use for intra-locality routing.
     * If unset, will use whatever algorithm is specified by the balancer.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig child_policy = 2; */ 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; } /** *
     * Optional.  What LB policy to use for intra-locality routing.
     * If unset, will use whatever algorithm is specified by the balancer.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig child_policy = 2; */ 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; } /** *
     * Optional.  What LB policy to use for intra-locality routing.
     * If unset, will use whatever algorithm is specified by the balancer.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig child_policy = 2; */ public Builder addAllChildPolicy( java.lang.Iterable values) { if (childPolicyBuilder_ == null) { ensureChildPolicyIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, childPolicy_); onChanged(); } else { childPolicyBuilder_.addAllMessages(values); } return this; } /** *
     * Optional.  What LB policy to use for intra-locality routing.
     * If unset, will use whatever algorithm is specified by the balancer.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig child_policy = 2; */ public Builder clearChildPolicy() { if (childPolicyBuilder_ == null) { childPolicy_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { childPolicyBuilder_.clear(); } return this; } /** *
     * Optional.  What LB policy to use for intra-locality routing.
     * If unset, will use whatever algorithm is specified by the balancer.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig child_policy = 2; */ public Builder removeChildPolicy(int index) { if (childPolicyBuilder_ == null) { ensureChildPolicyIsMutable(); childPolicy_.remove(index); onChanged(); } else { childPolicyBuilder_.remove(index); } return this; } /** *
     * Optional.  What LB policy to use for intra-locality routing.
     * If unset, will use whatever algorithm is specified by the balancer.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig child_policy = 2; */ public io.grpc.serviceconfig.LoadBalancingConfig.Builder getChildPolicyBuilder( int index) { return getChildPolicyFieldBuilder().getBuilder(index); } /** *
     * Optional.  What LB policy to use for intra-locality routing.
     * If unset, will use whatever algorithm is specified by the balancer.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig child_policy = 2; */ public io.grpc.serviceconfig.LoadBalancingConfigOrBuilder getChildPolicyOrBuilder( int index) { if (childPolicyBuilder_ == null) { return childPolicy_.get(index); } else { return childPolicyBuilder_.getMessageOrBuilder(index); } } /** *
     * Optional.  What LB policy to use for intra-locality routing.
     * If unset, will use whatever algorithm is specified by the balancer.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig child_policy = 2; */ public java.util.List getChildPolicyOrBuilderList() { if (childPolicyBuilder_ != null) { return childPolicyBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(childPolicy_); } } /** *
     * Optional.  What LB policy to use for intra-locality routing.
     * If unset, will use whatever algorithm is specified by the balancer.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig child_policy = 2; */ public io.grpc.serviceconfig.LoadBalancingConfig.Builder addChildPolicyBuilder() { return getChildPolicyFieldBuilder().addBuilder( io.grpc.serviceconfig.LoadBalancingConfig.getDefaultInstance()); } /** *
     * Optional.  What LB policy to use for intra-locality routing.
     * If unset, will use whatever algorithm is specified by the balancer.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig child_policy = 2; */ public io.grpc.serviceconfig.LoadBalancingConfig.Builder addChildPolicyBuilder( int index) { return getChildPolicyFieldBuilder().addBuilder( index, io.grpc.serviceconfig.LoadBalancingConfig.getDefaultInstance()); } /** *
     * Optional.  What LB policy to use for intra-locality routing.
     * If unset, will use whatever algorithm is specified by the balancer.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig child_policy = 2; */ 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_ & 0x00000002) != 0), getParentForChildren(), isClean()); childPolicy_ = null; } return childPolicyBuilder_; } private java.util.List fallbackPolicy_ = java.util.Collections.emptyList(); private void ensureFallbackPolicyIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { fallbackPolicy_ = new java.util.ArrayList(fallbackPolicy_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilderV3< io.grpc.serviceconfig.LoadBalancingConfig, io.grpc.serviceconfig.LoadBalancingConfig.Builder, io.grpc.serviceconfig.LoadBalancingConfigOrBuilder> fallbackPolicyBuilder_; /** *
     * Optional.  What LB policy to use in fallback mode.  If not
     * specified, defaults to round_robin.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig fallback_policy = 3; */ public java.util.List getFallbackPolicyList() { if (fallbackPolicyBuilder_ == null) { return java.util.Collections.unmodifiableList(fallbackPolicy_); } else { return fallbackPolicyBuilder_.getMessageList(); } } /** *
     * Optional.  What LB policy to use in fallback mode.  If not
     * specified, defaults to round_robin.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig fallback_policy = 3; */ public int getFallbackPolicyCount() { if (fallbackPolicyBuilder_ == null) { return fallbackPolicy_.size(); } else { return fallbackPolicyBuilder_.getCount(); } } /** *
     * Optional.  What LB policy to use in fallback mode.  If not
     * specified, defaults to round_robin.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig fallback_policy = 3; */ public io.grpc.serviceconfig.LoadBalancingConfig getFallbackPolicy(int index) { if (fallbackPolicyBuilder_ == null) { return fallbackPolicy_.get(index); } else { return fallbackPolicyBuilder_.getMessage(index); } } /** *
     * Optional.  What LB policy to use in fallback mode.  If not
     * specified, defaults to round_robin.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig fallback_policy = 3; */ public Builder setFallbackPolicy( int index, io.grpc.serviceconfig.LoadBalancingConfig value) { if (fallbackPolicyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFallbackPolicyIsMutable(); fallbackPolicy_.set(index, value); onChanged(); } else { fallbackPolicyBuilder_.setMessage(index, value); } return this; } /** *
     * Optional.  What LB policy to use in fallback mode.  If not
     * specified, defaults to round_robin.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig fallback_policy = 3; */ public Builder setFallbackPolicy( int index, io.grpc.serviceconfig.LoadBalancingConfig.Builder builderForValue) { if (fallbackPolicyBuilder_ == null) { ensureFallbackPolicyIsMutable(); fallbackPolicy_.set(index, builderForValue.build()); onChanged(); } else { fallbackPolicyBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * Optional.  What LB policy to use in fallback mode.  If not
     * specified, defaults to round_robin.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig fallback_policy = 3; */ public Builder addFallbackPolicy(io.grpc.serviceconfig.LoadBalancingConfig value) { if (fallbackPolicyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFallbackPolicyIsMutable(); fallbackPolicy_.add(value); onChanged(); } else { fallbackPolicyBuilder_.addMessage(value); } return this; } /** *
     * Optional.  What LB policy to use in fallback mode.  If not
     * specified, defaults to round_robin.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig fallback_policy = 3; */ public Builder addFallbackPolicy( int index, io.grpc.serviceconfig.LoadBalancingConfig value) { if (fallbackPolicyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFallbackPolicyIsMutable(); fallbackPolicy_.add(index, value); onChanged(); } else { fallbackPolicyBuilder_.addMessage(index, value); } return this; } /** *
     * Optional.  What LB policy to use in fallback mode.  If not
     * specified, defaults to round_robin.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig fallback_policy = 3; */ public Builder addFallbackPolicy( io.grpc.serviceconfig.LoadBalancingConfig.Builder builderForValue) { if (fallbackPolicyBuilder_ == null) { ensureFallbackPolicyIsMutable(); fallbackPolicy_.add(builderForValue.build()); onChanged(); } else { fallbackPolicyBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * Optional.  What LB policy to use in fallback mode.  If not
     * specified, defaults to round_robin.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig fallback_policy = 3; */ public Builder addFallbackPolicy( int index, io.grpc.serviceconfig.LoadBalancingConfig.Builder builderForValue) { if (fallbackPolicyBuilder_ == null) { ensureFallbackPolicyIsMutable(); fallbackPolicy_.add(index, builderForValue.build()); onChanged(); } else { fallbackPolicyBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * Optional.  What LB policy to use in fallback mode.  If not
     * specified, defaults to round_robin.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig fallback_policy = 3; */ public Builder addAllFallbackPolicy( java.lang.Iterable values) { if (fallbackPolicyBuilder_ == null) { ensureFallbackPolicyIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, fallbackPolicy_); onChanged(); } else { fallbackPolicyBuilder_.addAllMessages(values); } return this; } /** *
     * Optional.  What LB policy to use in fallback mode.  If not
     * specified, defaults to round_robin.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig fallback_policy = 3; */ public Builder clearFallbackPolicy() { if (fallbackPolicyBuilder_ == null) { fallbackPolicy_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { fallbackPolicyBuilder_.clear(); } return this; } /** *
     * Optional.  What LB policy to use in fallback mode.  If not
     * specified, defaults to round_robin.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig fallback_policy = 3; */ public Builder removeFallbackPolicy(int index) { if (fallbackPolicyBuilder_ == null) { ensureFallbackPolicyIsMutable(); fallbackPolicy_.remove(index); onChanged(); } else { fallbackPolicyBuilder_.remove(index); } return this; } /** *
     * Optional.  What LB policy to use in fallback mode.  If not
     * specified, defaults to round_robin.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig fallback_policy = 3; */ public io.grpc.serviceconfig.LoadBalancingConfig.Builder getFallbackPolicyBuilder( int index) { return getFallbackPolicyFieldBuilder().getBuilder(index); } /** *
     * Optional.  What LB policy to use in fallback mode.  If not
     * specified, defaults to round_robin.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig fallback_policy = 3; */ public io.grpc.serviceconfig.LoadBalancingConfigOrBuilder getFallbackPolicyOrBuilder( int index) { if (fallbackPolicyBuilder_ == null) { return fallbackPolicy_.get(index); } else { return fallbackPolicyBuilder_.getMessageOrBuilder(index); } } /** *
     * Optional.  What LB policy to use in fallback mode.  If not
     * specified, defaults to round_robin.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig fallback_policy = 3; */ public java.util.List getFallbackPolicyOrBuilderList() { if (fallbackPolicyBuilder_ != null) { return fallbackPolicyBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(fallbackPolicy_); } } /** *
     * Optional.  What LB policy to use in fallback mode.  If not
     * specified, defaults to round_robin.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig fallback_policy = 3; */ public io.grpc.serviceconfig.LoadBalancingConfig.Builder addFallbackPolicyBuilder() { return getFallbackPolicyFieldBuilder().addBuilder( io.grpc.serviceconfig.LoadBalancingConfig.getDefaultInstance()); } /** *
     * Optional.  What LB policy to use in fallback mode.  If not
     * specified, defaults to round_robin.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig fallback_policy = 3; */ public io.grpc.serviceconfig.LoadBalancingConfig.Builder addFallbackPolicyBuilder( int index) { return getFallbackPolicyFieldBuilder().addBuilder( index, io.grpc.serviceconfig.LoadBalancingConfig.getDefaultInstance()); } /** *
     * Optional.  What LB policy to use in fallback mode.  If not
     * specified, defaults to round_robin.
     * Multiple LB policies can be specified; clients will iterate through
     * the list in order and stop at the first policy that they support.
     * 
* * repeated .grpc.service_config.LoadBalancingConfig fallback_policy = 3; */ public java.util.List getFallbackPolicyBuilderList() { return getFallbackPolicyFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< io.grpc.serviceconfig.LoadBalancingConfig, io.grpc.serviceconfig.LoadBalancingConfig.Builder, io.grpc.serviceconfig.LoadBalancingConfigOrBuilder> getFallbackPolicyFieldBuilder() { if (fallbackPolicyBuilder_ == null) { fallbackPolicyBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.grpc.serviceconfig.LoadBalancingConfig, io.grpc.serviceconfig.LoadBalancingConfig.Builder, io.grpc.serviceconfig.LoadBalancingConfigOrBuilder>( fallbackPolicy_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); fallbackPolicy_ = null; } return fallbackPolicyBuilder_; } private java.lang.Object edsServiceName_ = ""; /** *
     * Optional.  Name to use in EDS query.  If not present, defaults to
     * the server name from the target URI.
     * 
* * string eds_service_name = 4; * @return The edsServiceName. */ public java.lang.String getEdsServiceName() { java.lang.Object ref = edsServiceName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); edsServiceName_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Optional.  Name to use in EDS query.  If not present, defaults to
     * the server name from the target URI.
     * 
* * string eds_service_name = 4; * @return The bytes for edsServiceName. */ public com.google.protobuf.ByteString getEdsServiceNameBytes() { java.lang.Object ref = edsServiceName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); edsServiceName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Optional.  Name to use in EDS query.  If not present, defaults to
     * the server name from the target URI.
     * 
* * string eds_service_name = 4; * @param value The edsServiceName to set. * @return This builder for chaining. */ public Builder setEdsServiceName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } edsServiceName_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     * Optional.  Name to use in EDS query.  If not present, defaults to
     * the server name from the target URI.
     * 
* * string eds_service_name = 4; * @return This builder for chaining. */ public Builder clearEdsServiceName() { edsServiceName_ = getDefaultInstance().getEdsServiceName(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } /** *
     * Optional.  Name to use in EDS query.  If not present, defaults to
     * the server name from the target URI.
     * 
* * string eds_service_name = 4; * @param value The bytes for edsServiceName to set. * @return This builder for chaining. */ public Builder setEdsServiceNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); edsServiceName_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } private com.google.protobuf.StringValue lrsLoadReportingServerName_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> lrsLoadReportingServerNameBuilder_; /** *
     * LRS server to send load reports to.
     * If not present, load reporting will be disabled.
     * If set to the empty string, load reporting will be sent to the same
     * server that we obtained CDS data from.
     * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 5; * @return Whether the lrsLoadReportingServerName field is set. */ public boolean hasLrsLoadReportingServerName() { return ((bitField0_ & 0x00000010) != 0); } /** *
     * LRS server to send load reports to.
     * If not present, load reporting will be disabled.
     * If set to the empty string, load reporting will be sent to the same
     * server that we obtained CDS data from.
     * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 5; * @return The lrsLoadReportingServerName. */ public com.google.protobuf.StringValue getLrsLoadReportingServerName() { if (lrsLoadReportingServerNameBuilder_ == null) { return lrsLoadReportingServerName_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : lrsLoadReportingServerName_; } else { return lrsLoadReportingServerNameBuilder_.getMessage(); } } /** *
     * LRS server to send load reports to.
     * If not present, load reporting will be disabled.
     * If set to the empty string, load reporting will be sent to the same
     * server that we obtained CDS data from.
     * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 5; */ public Builder setLrsLoadReportingServerName(com.google.protobuf.StringValue value) { if (lrsLoadReportingServerNameBuilder_ == null) { if (value == null) { throw new NullPointerException(); } lrsLoadReportingServerName_ = value; } else { lrsLoadReportingServerNameBuilder_.setMessage(value); } bitField0_ |= 0x00000010; onChanged(); return this; } /** *
     * LRS server to send load reports to.
     * If not present, load reporting will be disabled.
     * If set to the empty string, load reporting will be sent to the same
     * server that we obtained CDS data from.
     * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 5; */ public Builder setLrsLoadReportingServerName( com.google.protobuf.StringValue.Builder builderForValue) { if (lrsLoadReportingServerNameBuilder_ == null) { lrsLoadReportingServerName_ = builderForValue.build(); } else { lrsLoadReportingServerNameBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000010; onChanged(); return this; } /** *
     * LRS server to send load reports to.
     * If not present, load reporting will be disabled.
     * If set to the empty string, load reporting will be sent to the same
     * server that we obtained CDS data from.
     * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 5; */ public Builder mergeLrsLoadReportingServerName(com.google.protobuf.StringValue value) { if (lrsLoadReportingServerNameBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0) && lrsLoadReportingServerName_ != null && lrsLoadReportingServerName_ != com.google.protobuf.StringValue.getDefaultInstance()) { getLrsLoadReportingServerNameBuilder().mergeFrom(value); } else { lrsLoadReportingServerName_ = value; } } else { lrsLoadReportingServerNameBuilder_.mergeFrom(value); } if (lrsLoadReportingServerName_ != null) { bitField0_ |= 0x00000010; onChanged(); } return this; } /** *
     * LRS server to send load reports to.
     * If not present, load reporting will be disabled.
     * If set to the empty string, load reporting will be sent to the same
     * server that we obtained CDS data from.
     * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 5; */ public Builder clearLrsLoadReportingServerName() { bitField0_ = (bitField0_ & ~0x00000010); lrsLoadReportingServerName_ = null; if (lrsLoadReportingServerNameBuilder_ != null) { lrsLoadReportingServerNameBuilder_.dispose(); lrsLoadReportingServerNameBuilder_ = null; } onChanged(); return this; } /** *
     * LRS server to send load reports to.
     * If not present, load reporting will be disabled.
     * If set to the empty string, load reporting will be sent to the same
     * server that we obtained CDS data from.
     * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 5; */ public com.google.protobuf.StringValue.Builder getLrsLoadReportingServerNameBuilder() { bitField0_ |= 0x00000010; onChanged(); return getLrsLoadReportingServerNameFieldBuilder().getBuilder(); } /** *
     * LRS server to send load reports to.
     * If not present, load reporting will be disabled.
     * If set to the empty string, load reporting will be sent to the same
     * server that we obtained CDS data from.
     * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 5; */ public com.google.protobuf.StringValueOrBuilder getLrsLoadReportingServerNameOrBuilder() { if (lrsLoadReportingServerNameBuilder_ != null) { return lrsLoadReportingServerNameBuilder_.getMessageOrBuilder(); } else { return lrsLoadReportingServerName_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : lrsLoadReportingServerName_; } } /** *
     * LRS server to send load reports to.
     * If not present, load reporting will be disabled.
     * If set to the empty string, load reporting will be sent to the same
     * server that we obtained CDS data from.
     * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 5; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> getLrsLoadReportingServerNameFieldBuilder() { if (lrsLoadReportingServerNameBuilder_ == null) { lrsLoadReportingServerNameBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>( getLrsLoadReportingServerName(), getParentForChildren(), isClean()); lrsLoadReportingServerName_ = null; } return lrsLoadReportingServerNameBuilder_; } @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.XdsConfig) } // @@protoc_insertion_point(class_scope:grpc.service_config.XdsConfig) private static final io.grpc.serviceconfig.XdsConfig DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.grpc.serviceconfig.XdsConfig(); } public static io.grpc.serviceconfig.XdsConfig getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public XdsConfig 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.XdsConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy