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

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

There is a newer version: 2.45.0
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: service_config.proto

package io.grpc.serviceconfig;

/**
 * 
 * Configuration for xds_cluster_resolver LB policy.
 * 
* * Protobuf type {@code grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig} */ public final class XdsClusterResolverLoadBalancingPolicyConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig) XdsClusterResolverLoadBalancingPolicyConfigOrBuilder { private static final long serialVersionUID = 0L; // Use XdsClusterResolverLoadBalancingPolicyConfig.newBuilder() to construct. private XdsClusterResolverLoadBalancingPolicyConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private XdsClusterResolverLoadBalancingPolicyConfig() { discoveryMechanisms_ = java.util.Collections.emptyList(); xdsLbPolicy_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new XdsClusterResolverLoadBalancingPolicyConfig(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsClusterResolverLoadBalancingPolicyConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsClusterResolverLoadBalancingPolicyConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.class, io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.Builder.class); } public interface DiscoveryMechanismOrBuilder extends // @@protoc_insertion_point(interface_extends:grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism) com.google.protobuf.MessageOrBuilder { /** *
     * Cluster name.
     * 
* * string cluster = 1; * @return The cluster. */ java.lang.String getCluster(); /** *
     * Cluster name.
     * 
* * string cluster = 1; * @return The bytes for cluster. */ com.google.protobuf.ByteString getClusterBytes(); /** *
     * 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.
     * DEPRECATED: Use new lrs_load_reporting_server field instead.
     * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 2 [deprecated = true]; * @deprecated grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.lrs_load_reporting_server_name is deprecated. * See service_config.proto;l=285 * @return Whether the lrsLoadReportingServerName field is set. */ @java.lang.Deprecated boolean hasLrsLoadReportingServerName(); /** *
     * 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.
     * DEPRECATED: Use new lrs_load_reporting_server field instead.
     * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 2 [deprecated = true]; * @deprecated grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.lrs_load_reporting_server_name is deprecated. * See service_config.proto;l=285 * @return The lrsLoadReportingServerName. */ @java.lang.Deprecated com.google.protobuf.StringValue getLrsLoadReportingServerName(); /** *
     * 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.
     * DEPRECATED: Use new lrs_load_reporting_server field instead.
     * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 2 [deprecated = true]; */ @java.lang.Deprecated com.google.protobuf.StringValueOrBuilder getLrsLoadReportingServerNameOrBuilder(); /** *
     * LRS server to send load reports to.
     * If not present, load reporting will be disabled.
     * Supercedes lrs_load_reporting_server_name field.
     * 
* * .grpc.service_config.XdsServer lrs_load_reporting_server = 7; * @return Whether the lrsLoadReportingServer field is set. */ boolean hasLrsLoadReportingServer(); /** *
     * LRS server to send load reports to.
     * If not present, load reporting will be disabled.
     * Supercedes lrs_load_reporting_server_name field.
     * 
* * .grpc.service_config.XdsServer lrs_load_reporting_server = 7; * @return The lrsLoadReportingServer. */ io.grpc.serviceconfig.XdsServer getLrsLoadReportingServer(); /** *
     * LRS server to send load reports to.
     * If not present, load reporting will be disabled.
     * Supercedes lrs_load_reporting_server_name field.
     * 
* * .grpc.service_config.XdsServer lrs_load_reporting_server = 7; */ io.grpc.serviceconfig.XdsServerOrBuilder getLrsLoadReportingServerOrBuilder(); /** *
     * Maximum number of outstanding requests can be made to the upstream
     * cluster.  Default is 1024.
     * 
* * .google.protobuf.UInt32Value max_concurrent_requests = 3; * @return Whether the maxConcurrentRequests field is set. */ boolean hasMaxConcurrentRequests(); /** *
     * Maximum number of outstanding requests can be made to the upstream
     * cluster.  Default is 1024.
     * 
* * .google.protobuf.UInt32Value max_concurrent_requests = 3; * @return The maxConcurrentRequests. */ com.google.protobuf.UInt32Value getMaxConcurrentRequests(); /** *
     * Maximum number of outstanding requests can be made to the upstream
     * cluster.  Default is 1024.
     * 
* * .google.protobuf.UInt32Value max_concurrent_requests = 3; */ com.google.protobuf.UInt32ValueOrBuilder getMaxConcurrentRequestsOrBuilder(); /** * .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Type type = 4; * @return The enum numeric value on the wire for type. */ int getTypeValue(); /** * .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Type type = 4; * @return The type. */ io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Type getType(); /** *
     * For type EDS only.
     * EDS service name, as returned in CDS.
     * May be unset if not specified in CDS.
     * 
* * string eds_service_name = 5; * @return The edsServiceName. */ java.lang.String getEdsServiceName(); /** *
     * For type EDS only.
     * EDS service name, as returned in CDS.
     * May be unset if not specified in CDS.
     * 
* * string eds_service_name = 5; * @return The bytes for edsServiceName. */ com.google.protobuf.ByteString getEdsServiceNameBytes(); /** *
     * For type LOGICAL_DNS only.
     * DNS name to resolve in "host:port" form.
     * 
* * string dns_hostname = 6; * @return The dnsHostname. */ java.lang.String getDnsHostname(); /** *
     * For type LOGICAL_DNS only.
     * DNS name to resolve in "host:port" form.
     * 
* * string dns_hostname = 6; * @return The bytes for dnsHostname. */ com.google.protobuf.ByteString getDnsHostnameBytes(); } /** *
   * Describes a discovery mechanism instance.
   * For EDS or LOGICAL_DNS clusters, there will be exactly one
   * DiscoveryMechanism, which will describe the cluster of the parent
   * CDS policy.
   * For aggregate clusters, there will be one DiscoveryMechanism for each
   * underlying cluster.
   * 
* * Protobuf type {@code grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism} */ public static final class DiscoveryMechanism extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism) DiscoveryMechanismOrBuilder { private static final long serialVersionUID = 0L; // Use DiscoveryMechanism.newBuilder() to construct. private DiscoveryMechanism(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private DiscoveryMechanism() { cluster_ = ""; type_ = 0; edsServiceName_ = ""; dnsHostname_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new DiscoveryMechanism(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsClusterResolverLoadBalancingPolicyConfig_DiscoveryMechanism_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsClusterResolverLoadBalancingPolicyConfig_DiscoveryMechanism_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.class, io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Builder.class); } /** * Protobuf enum {@code grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Type} */ public enum Type implements com.google.protobuf.ProtocolMessageEnum { /** * UNKNOWN = 0; */ UNKNOWN(0), /** * EDS = 1; */ EDS(1), /** * LOGICAL_DNS = 2; */ LOGICAL_DNS(2), UNRECOGNIZED(-1), ; /** * UNKNOWN = 0; */ public static final int UNKNOWN_VALUE = 0; /** * EDS = 1; */ public static final int EDS_VALUE = 1; /** * LOGICAL_DNS = 2; */ public static final int LOGICAL_DNS_VALUE = 2; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Type valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static Type forNumber(int value) { switch (value) { case 0: return UNKNOWN; case 1: return EDS; case 2: return LOGICAL_DNS; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< Type> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Type findValueByNumber(int number) { return Type.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.getDescriptor().getEnumTypes().get(0); } private static final Type[] VALUES = values(); public static Type valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private Type(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Type) } public static final int CLUSTER_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object cluster_ = ""; /** *
     * Cluster name.
     * 
* * string cluster = 1; * @return The cluster. */ @java.lang.Override public java.lang.String getCluster() { java.lang.Object ref = cluster_; 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(); cluster_ = s; return s; } } /** *
     * Cluster name.
     * 
* * string cluster = 1; * @return The bytes for cluster. */ @java.lang.Override public com.google.protobuf.ByteString getClusterBytes() { java.lang.Object ref = cluster_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); cluster_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LRS_LOAD_REPORTING_SERVER_NAME_FIELD_NUMBER = 2; 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.
     * DEPRECATED: Use new lrs_load_reporting_server field instead.
     * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 2 [deprecated = true]; * @deprecated grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.lrs_load_reporting_server_name is deprecated. * See service_config.proto;l=285 * @return Whether the lrsLoadReportingServerName field is set. */ @java.lang.Override @java.lang.Deprecated public boolean hasLrsLoadReportingServerName() { return lrsLoadReportingServerName_ != null; } /** *
     * 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.
     * DEPRECATED: Use new lrs_load_reporting_server field instead.
     * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 2 [deprecated = true]; * @deprecated grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.lrs_load_reporting_server_name is deprecated. * See service_config.proto;l=285 * @return The lrsLoadReportingServerName. */ @java.lang.Override @java.lang.Deprecated 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.
     * DEPRECATED: Use new lrs_load_reporting_server field instead.
     * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 2 [deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public com.google.protobuf.StringValueOrBuilder getLrsLoadReportingServerNameOrBuilder() { return lrsLoadReportingServerName_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : lrsLoadReportingServerName_; } public static final int LRS_LOAD_REPORTING_SERVER_FIELD_NUMBER = 7; private io.grpc.serviceconfig.XdsServer lrsLoadReportingServer_; /** *
     * LRS server to send load reports to.
     * If not present, load reporting will be disabled.
     * Supercedes lrs_load_reporting_server_name field.
     * 
* * .grpc.service_config.XdsServer lrs_load_reporting_server = 7; * @return Whether the lrsLoadReportingServer field is set. */ @java.lang.Override public boolean hasLrsLoadReportingServer() { return lrsLoadReportingServer_ != null; } /** *
     * LRS server to send load reports to.
     * If not present, load reporting will be disabled.
     * Supercedes lrs_load_reporting_server_name field.
     * 
* * .grpc.service_config.XdsServer lrs_load_reporting_server = 7; * @return The lrsLoadReportingServer. */ @java.lang.Override public io.grpc.serviceconfig.XdsServer getLrsLoadReportingServer() { return lrsLoadReportingServer_ == null ? io.grpc.serviceconfig.XdsServer.getDefaultInstance() : lrsLoadReportingServer_; } /** *
     * LRS server to send load reports to.
     * If not present, load reporting will be disabled.
     * Supercedes lrs_load_reporting_server_name field.
     * 
* * .grpc.service_config.XdsServer lrs_load_reporting_server = 7; */ @java.lang.Override public io.grpc.serviceconfig.XdsServerOrBuilder getLrsLoadReportingServerOrBuilder() { return lrsLoadReportingServer_ == null ? io.grpc.serviceconfig.XdsServer.getDefaultInstance() : lrsLoadReportingServer_; } public static final int MAX_CONCURRENT_REQUESTS_FIELD_NUMBER = 3; private com.google.protobuf.UInt32Value maxConcurrentRequests_; /** *
     * Maximum number of outstanding requests can be made to the upstream
     * cluster.  Default is 1024.
     * 
* * .google.protobuf.UInt32Value max_concurrent_requests = 3; * @return Whether the maxConcurrentRequests field is set. */ @java.lang.Override public boolean hasMaxConcurrentRequests() { return maxConcurrentRequests_ != null; } /** *
     * Maximum number of outstanding requests can be made to the upstream
     * cluster.  Default is 1024.
     * 
* * .google.protobuf.UInt32Value max_concurrent_requests = 3; * @return The maxConcurrentRequests. */ @java.lang.Override public com.google.protobuf.UInt32Value getMaxConcurrentRequests() { return maxConcurrentRequests_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : maxConcurrentRequests_; } /** *
     * Maximum number of outstanding requests can be made to the upstream
     * cluster.  Default is 1024.
     * 
* * .google.protobuf.UInt32Value max_concurrent_requests = 3; */ @java.lang.Override public com.google.protobuf.UInt32ValueOrBuilder getMaxConcurrentRequestsOrBuilder() { return maxConcurrentRequests_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : maxConcurrentRequests_; } public static final int TYPE_FIELD_NUMBER = 4; private int type_ = 0; /** * .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Type type = 4; * @return The enum numeric value on the wire for type. */ @java.lang.Override public int getTypeValue() { return type_; } /** * .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Type type = 4; * @return The type. */ @java.lang.Override public io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Type getType() { io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Type result = io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Type.forNumber(type_); return result == null ? io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Type.UNRECOGNIZED : result; } public static final int EDS_SERVICE_NAME_FIELD_NUMBER = 5; @SuppressWarnings("serial") private volatile java.lang.Object edsServiceName_ = ""; /** *
     * For type EDS only.
     * EDS service name, as returned in CDS.
     * May be unset if not specified in CDS.
     * 
* * string eds_service_name = 5; * @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; } } /** *
     * For type EDS only.
     * EDS service name, as returned in CDS.
     * May be unset if not specified in CDS.
     * 
* * string eds_service_name = 5; * @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 DNS_HOSTNAME_FIELD_NUMBER = 6; @SuppressWarnings("serial") private volatile java.lang.Object dnsHostname_ = ""; /** *
     * For type LOGICAL_DNS only.
     * DNS name to resolve in "host:port" form.
     * 
* * string dns_hostname = 6; * @return The dnsHostname. */ @java.lang.Override public java.lang.String getDnsHostname() { java.lang.Object ref = dnsHostname_; 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(); dnsHostname_ = s; return s; } } /** *
     * For type LOGICAL_DNS only.
     * DNS name to resolve in "host:port" form.
     * 
* * string dns_hostname = 6; * @return The bytes for dnsHostname. */ @java.lang.Override public com.google.protobuf.ByteString getDnsHostnameBytes() { java.lang.Object ref = dnsHostname_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); dnsHostname_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } 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(cluster_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cluster_); } if (lrsLoadReportingServerName_ != null) { output.writeMessage(2, getLrsLoadReportingServerName()); } if (maxConcurrentRequests_ != null) { output.writeMessage(3, getMaxConcurrentRequests()); } if (type_ != io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Type.UNKNOWN.getNumber()) { output.writeEnum(4, type_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(edsServiceName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, edsServiceName_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dnsHostname_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, dnsHostname_); } if (lrsLoadReportingServer_ != null) { output.writeMessage(7, getLrsLoadReportingServer()); } 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(cluster_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cluster_); } if (lrsLoadReportingServerName_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getLrsLoadReportingServerName()); } if (maxConcurrentRequests_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getMaxConcurrentRequests()); } if (type_ != io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Type.UNKNOWN.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(4, type_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(edsServiceName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, edsServiceName_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dnsHostname_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, dnsHostname_); } if (lrsLoadReportingServer_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(7, getLrsLoadReportingServer()); } 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.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism)) { return super.equals(obj); } io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism other = (io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism) obj; if (!getCluster() .equals(other.getCluster())) return false; if (hasLrsLoadReportingServerName() != other.hasLrsLoadReportingServerName()) return false; if (hasLrsLoadReportingServerName()) { if (!getLrsLoadReportingServerName() .equals(other.getLrsLoadReportingServerName())) return false; } if (hasLrsLoadReportingServer() != other.hasLrsLoadReportingServer()) return false; if (hasLrsLoadReportingServer()) { if (!getLrsLoadReportingServer() .equals(other.getLrsLoadReportingServer())) return false; } if (hasMaxConcurrentRequests() != other.hasMaxConcurrentRequests()) return false; if (hasMaxConcurrentRequests()) { if (!getMaxConcurrentRequests() .equals(other.getMaxConcurrentRequests())) return false; } if (type_ != other.type_) return false; if (!getEdsServiceName() .equals(other.getEdsServiceName())) return false; if (!getDnsHostname() .equals(other.getDnsHostname())) 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) + CLUSTER_FIELD_NUMBER; hash = (53 * hash) + getCluster().hashCode(); if (hasLrsLoadReportingServerName()) { hash = (37 * hash) + LRS_LOAD_REPORTING_SERVER_NAME_FIELD_NUMBER; hash = (53 * hash) + getLrsLoadReportingServerName().hashCode(); } if (hasLrsLoadReportingServer()) { hash = (37 * hash) + LRS_LOAD_REPORTING_SERVER_FIELD_NUMBER; hash = (53 * hash) + getLrsLoadReportingServer().hashCode(); } if (hasMaxConcurrentRequests()) { hash = (37 * hash) + MAX_CONCURRENT_REQUESTS_FIELD_NUMBER; hash = (53 * hash) + getMaxConcurrentRequests().hashCode(); } hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; hash = (37 * hash) + EDS_SERVICE_NAME_FIELD_NUMBER; hash = (53 * hash) + getEdsServiceName().hashCode(); hash = (37 * hash) + DNS_HOSTNAME_FIELD_NUMBER; hash = (53 * hash) + getDnsHostname().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism 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.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism 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.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism 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.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism 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.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism 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.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism 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; } /** *
     * Describes a discovery mechanism instance.
     * For EDS or LOGICAL_DNS clusters, there will be exactly one
     * DiscoveryMechanism, which will describe the cluster of the parent
     * CDS policy.
     * For aggregate clusters, there will be one DiscoveryMechanism for each
     * underlying cluster.
     * 
* * Protobuf type {@code grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism) io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanismOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsClusterResolverLoadBalancingPolicyConfig_DiscoveryMechanism_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsClusterResolverLoadBalancingPolicyConfig_DiscoveryMechanism_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.class, io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Builder.class); } // Construct using io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; cluster_ = ""; lrsLoadReportingServerName_ = null; if (lrsLoadReportingServerNameBuilder_ != null) { lrsLoadReportingServerNameBuilder_.dispose(); lrsLoadReportingServerNameBuilder_ = null; } lrsLoadReportingServer_ = null; if (lrsLoadReportingServerBuilder_ != null) { lrsLoadReportingServerBuilder_.dispose(); lrsLoadReportingServerBuilder_ = null; } maxConcurrentRequests_ = null; if (maxConcurrentRequestsBuilder_ != null) { maxConcurrentRequestsBuilder_.dispose(); maxConcurrentRequestsBuilder_ = null; } type_ = 0; edsServiceName_ = ""; dnsHostname_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsClusterResolverLoadBalancingPolicyConfig_DiscoveryMechanism_descriptor; } @java.lang.Override public io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism getDefaultInstanceForType() { return io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.getDefaultInstance(); } @java.lang.Override public io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism build() { io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism buildPartial() { io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism result = new io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.cluster_ = cluster_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.lrsLoadReportingServerName_ = lrsLoadReportingServerNameBuilder_ == null ? lrsLoadReportingServerName_ : lrsLoadReportingServerNameBuilder_.build(); } if (((from_bitField0_ & 0x00000004) != 0)) { result.lrsLoadReportingServer_ = lrsLoadReportingServerBuilder_ == null ? lrsLoadReportingServer_ : lrsLoadReportingServerBuilder_.build(); } if (((from_bitField0_ & 0x00000008) != 0)) { result.maxConcurrentRequests_ = maxConcurrentRequestsBuilder_ == null ? maxConcurrentRequests_ : maxConcurrentRequestsBuilder_.build(); } if (((from_bitField0_ & 0x00000010) != 0)) { result.type_ = type_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.edsServiceName_ = edsServiceName_; } if (((from_bitField0_ & 0x00000040) != 0)) { result.dnsHostname_ = dnsHostname_; } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism) { return mergeFrom((io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism other) { if (other == io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.getDefaultInstance()) return this; if (!other.getCluster().isEmpty()) { cluster_ = other.cluster_; bitField0_ |= 0x00000001; onChanged(); } if (other.hasLrsLoadReportingServerName()) { mergeLrsLoadReportingServerName(other.getLrsLoadReportingServerName()); } if (other.hasLrsLoadReportingServer()) { mergeLrsLoadReportingServer(other.getLrsLoadReportingServer()); } if (other.hasMaxConcurrentRequests()) { mergeMaxConcurrentRequests(other.getMaxConcurrentRequests()); } if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } if (!other.getEdsServiceName().isEmpty()) { edsServiceName_ = other.edsServiceName_; bitField0_ |= 0x00000020; onChanged(); } if (!other.getDnsHostname().isEmpty()) { dnsHostname_ = other.dnsHostname_; bitField0_ |= 0x00000040; onChanged(); } 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: { cluster_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage( getLrsLoadReportingServerNameFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { input.readMessage( getMaxConcurrentRequestsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 26 case 32: { type_ = input.readEnum(); bitField0_ |= 0x00000010; break; } // case 32 case 42: { edsServiceName_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000020; break; } // case 42 case 50: { dnsHostname_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000040; break; } // case 50 case 58: { input.readMessage( getLrsLoadReportingServerFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 58 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 cluster_ = ""; /** *
       * Cluster name.
       * 
* * string cluster = 1; * @return The cluster. */ public java.lang.String getCluster() { java.lang.Object ref = cluster_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); cluster_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Cluster name.
       * 
* * string cluster = 1; * @return The bytes for cluster. */ public com.google.protobuf.ByteString getClusterBytes() { java.lang.Object ref = cluster_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); cluster_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Cluster name.
       * 
* * string cluster = 1; * @param value The cluster to set. * @return This builder for chaining. */ public Builder setCluster( java.lang.String value) { if (value == null) { throw new NullPointerException(); } cluster_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
       * Cluster name.
       * 
* * string cluster = 1; * @return This builder for chaining. */ public Builder clearCluster() { cluster_ = getDefaultInstance().getCluster(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
       * Cluster name.
       * 
* * string cluster = 1; * @param value The bytes for cluster to set. * @return This builder for chaining. */ public Builder setClusterBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); cluster_ = value; bitField0_ |= 0x00000001; 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.
       * DEPRECATED: Use new lrs_load_reporting_server field instead.
       * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 2 [deprecated = true]; * @deprecated grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.lrs_load_reporting_server_name is deprecated. * See service_config.proto;l=285 * @return Whether the lrsLoadReportingServerName field is set. */ @java.lang.Deprecated public boolean hasLrsLoadReportingServerName() { return ((bitField0_ & 0x00000002) != 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.
       * DEPRECATED: Use new lrs_load_reporting_server field instead.
       * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 2 [deprecated = true]; * @deprecated grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.lrs_load_reporting_server_name is deprecated. * See service_config.proto;l=285 * @return The lrsLoadReportingServerName. */ @java.lang.Deprecated 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.
       * DEPRECATED: Use new lrs_load_reporting_server field instead.
       * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 2 [deprecated = true]; */ @java.lang.Deprecated public Builder setLrsLoadReportingServerName(com.google.protobuf.StringValue value) { if (lrsLoadReportingServerNameBuilder_ == null) { if (value == null) { throw new NullPointerException(); } lrsLoadReportingServerName_ = value; } else { lrsLoadReportingServerNameBuilder_.setMessage(value); } bitField0_ |= 0x00000002; 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.
       * DEPRECATED: Use new lrs_load_reporting_server field instead.
       * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 2 [deprecated = true]; */ @java.lang.Deprecated public Builder setLrsLoadReportingServerName( com.google.protobuf.StringValue.Builder builderForValue) { if (lrsLoadReportingServerNameBuilder_ == null) { lrsLoadReportingServerName_ = builderForValue.build(); } else { lrsLoadReportingServerNameBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; 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.
       * DEPRECATED: Use new lrs_load_reporting_server field instead.
       * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 2 [deprecated = true]; */ @java.lang.Deprecated public Builder mergeLrsLoadReportingServerName(com.google.protobuf.StringValue value) { if (lrsLoadReportingServerNameBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && lrsLoadReportingServerName_ != null && lrsLoadReportingServerName_ != com.google.protobuf.StringValue.getDefaultInstance()) { getLrsLoadReportingServerNameBuilder().mergeFrom(value); } else { lrsLoadReportingServerName_ = value; } } else { lrsLoadReportingServerNameBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; 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.
       * DEPRECATED: Use new lrs_load_reporting_server field instead.
       * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 2 [deprecated = true]; */ @java.lang.Deprecated public Builder clearLrsLoadReportingServerName() { bitField0_ = (bitField0_ & ~0x00000002); 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.
       * DEPRECATED: Use new lrs_load_reporting_server field instead.
       * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 2 [deprecated = true]; */ @java.lang.Deprecated public com.google.protobuf.StringValue.Builder getLrsLoadReportingServerNameBuilder() { bitField0_ |= 0x00000002; 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.
       * DEPRECATED: Use new lrs_load_reporting_server field instead.
       * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 2 [deprecated = true]; */ @java.lang.Deprecated 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.
       * DEPRECATED: Use new lrs_load_reporting_server field instead.
       * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 2 [deprecated = true]; */ 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_; } private io.grpc.serviceconfig.XdsServer lrsLoadReportingServer_; private com.google.protobuf.SingleFieldBuilderV3< io.grpc.serviceconfig.XdsServer, io.grpc.serviceconfig.XdsServer.Builder, io.grpc.serviceconfig.XdsServerOrBuilder> lrsLoadReportingServerBuilder_; /** *
       * LRS server to send load reports to.
       * If not present, load reporting will be disabled.
       * Supercedes lrs_load_reporting_server_name field.
       * 
* * .grpc.service_config.XdsServer lrs_load_reporting_server = 7; * @return Whether the lrsLoadReportingServer field is set. */ public boolean hasLrsLoadReportingServer() { return ((bitField0_ & 0x00000004) != 0); } /** *
       * LRS server to send load reports to.
       * If not present, load reporting will be disabled.
       * Supercedes lrs_load_reporting_server_name field.
       * 
* * .grpc.service_config.XdsServer lrs_load_reporting_server = 7; * @return The lrsLoadReportingServer. */ public io.grpc.serviceconfig.XdsServer getLrsLoadReportingServer() { if (lrsLoadReportingServerBuilder_ == null) { return lrsLoadReportingServer_ == null ? io.grpc.serviceconfig.XdsServer.getDefaultInstance() : lrsLoadReportingServer_; } else { return lrsLoadReportingServerBuilder_.getMessage(); } } /** *
       * LRS server to send load reports to.
       * If not present, load reporting will be disabled.
       * Supercedes lrs_load_reporting_server_name field.
       * 
* * .grpc.service_config.XdsServer lrs_load_reporting_server = 7; */ public Builder setLrsLoadReportingServer(io.grpc.serviceconfig.XdsServer value) { if (lrsLoadReportingServerBuilder_ == null) { if (value == null) { throw new NullPointerException(); } lrsLoadReportingServer_ = value; } else { lrsLoadReportingServerBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** *
       * LRS server to send load reports to.
       * If not present, load reporting will be disabled.
       * Supercedes lrs_load_reporting_server_name field.
       * 
* * .grpc.service_config.XdsServer lrs_load_reporting_server = 7; */ public Builder setLrsLoadReportingServer( io.grpc.serviceconfig.XdsServer.Builder builderForValue) { if (lrsLoadReportingServerBuilder_ == null) { lrsLoadReportingServer_ = builderForValue.build(); } else { lrsLoadReportingServerBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** *
       * LRS server to send load reports to.
       * If not present, load reporting will be disabled.
       * Supercedes lrs_load_reporting_server_name field.
       * 
* * .grpc.service_config.XdsServer lrs_load_reporting_server = 7; */ public Builder mergeLrsLoadReportingServer(io.grpc.serviceconfig.XdsServer value) { if (lrsLoadReportingServerBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && lrsLoadReportingServer_ != null && lrsLoadReportingServer_ != io.grpc.serviceconfig.XdsServer.getDefaultInstance()) { getLrsLoadReportingServerBuilder().mergeFrom(value); } else { lrsLoadReportingServer_ = value; } } else { lrsLoadReportingServerBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** *
       * LRS server to send load reports to.
       * If not present, load reporting will be disabled.
       * Supercedes lrs_load_reporting_server_name field.
       * 
* * .grpc.service_config.XdsServer lrs_load_reporting_server = 7; */ public Builder clearLrsLoadReportingServer() { bitField0_ = (bitField0_ & ~0x00000004); lrsLoadReportingServer_ = null; if (lrsLoadReportingServerBuilder_ != null) { lrsLoadReportingServerBuilder_.dispose(); lrsLoadReportingServerBuilder_ = null; } onChanged(); return this; } /** *
       * LRS server to send load reports to.
       * If not present, load reporting will be disabled.
       * Supercedes lrs_load_reporting_server_name field.
       * 
* * .grpc.service_config.XdsServer lrs_load_reporting_server = 7; */ public io.grpc.serviceconfig.XdsServer.Builder getLrsLoadReportingServerBuilder() { bitField0_ |= 0x00000004; onChanged(); return getLrsLoadReportingServerFieldBuilder().getBuilder(); } /** *
       * LRS server to send load reports to.
       * If not present, load reporting will be disabled.
       * Supercedes lrs_load_reporting_server_name field.
       * 
* * .grpc.service_config.XdsServer lrs_load_reporting_server = 7; */ public io.grpc.serviceconfig.XdsServerOrBuilder getLrsLoadReportingServerOrBuilder() { if (lrsLoadReportingServerBuilder_ != null) { return lrsLoadReportingServerBuilder_.getMessageOrBuilder(); } else { return lrsLoadReportingServer_ == null ? io.grpc.serviceconfig.XdsServer.getDefaultInstance() : lrsLoadReportingServer_; } } /** *
       * LRS server to send load reports to.
       * If not present, load reporting will be disabled.
       * Supercedes lrs_load_reporting_server_name field.
       * 
* * .grpc.service_config.XdsServer lrs_load_reporting_server = 7; */ private com.google.protobuf.SingleFieldBuilderV3< io.grpc.serviceconfig.XdsServer, io.grpc.serviceconfig.XdsServer.Builder, io.grpc.serviceconfig.XdsServerOrBuilder> getLrsLoadReportingServerFieldBuilder() { if (lrsLoadReportingServerBuilder_ == null) { lrsLoadReportingServerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.grpc.serviceconfig.XdsServer, io.grpc.serviceconfig.XdsServer.Builder, io.grpc.serviceconfig.XdsServerOrBuilder>( getLrsLoadReportingServer(), getParentForChildren(), isClean()); lrsLoadReportingServer_ = null; } return lrsLoadReportingServerBuilder_; } private com.google.protobuf.UInt32Value maxConcurrentRequests_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> maxConcurrentRequestsBuilder_; /** *
       * Maximum number of outstanding requests can be made to the upstream
       * cluster.  Default is 1024.
       * 
* * .google.protobuf.UInt32Value max_concurrent_requests = 3; * @return Whether the maxConcurrentRequests field is set. */ public boolean hasMaxConcurrentRequests() { return ((bitField0_ & 0x00000008) != 0); } /** *
       * Maximum number of outstanding requests can be made to the upstream
       * cluster.  Default is 1024.
       * 
* * .google.protobuf.UInt32Value max_concurrent_requests = 3; * @return The maxConcurrentRequests. */ public com.google.protobuf.UInt32Value getMaxConcurrentRequests() { if (maxConcurrentRequestsBuilder_ == null) { return maxConcurrentRequests_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : maxConcurrentRequests_; } else { return maxConcurrentRequestsBuilder_.getMessage(); } } /** *
       * Maximum number of outstanding requests can be made to the upstream
       * cluster.  Default is 1024.
       * 
* * .google.protobuf.UInt32Value max_concurrent_requests = 3; */ public Builder setMaxConcurrentRequests(com.google.protobuf.UInt32Value value) { if (maxConcurrentRequestsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } maxConcurrentRequests_ = value; } else { maxConcurrentRequestsBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** *
       * Maximum number of outstanding requests can be made to the upstream
       * cluster.  Default is 1024.
       * 
* * .google.protobuf.UInt32Value max_concurrent_requests = 3; */ public Builder setMaxConcurrentRequests( com.google.protobuf.UInt32Value.Builder builderForValue) { if (maxConcurrentRequestsBuilder_ == null) { maxConcurrentRequests_ = builderForValue.build(); } else { maxConcurrentRequestsBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** *
       * Maximum number of outstanding requests can be made to the upstream
       * cluster.  Default is 1024.
       * 
* * .google.protobuf.UInt32Value max_concurrent_requests = 3; */ public Builder mergeMaxConcurrentRequests(com.google.protobuf.UInt32Value value) { if (maxConcurrentRequestsBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && maxConcurrentRequests_ != null && maxConcurrentRequests_ != com.google.protobuf.UInt32Value.getDefaultInstance()) { getMaxConcurrentRequestsBuilder().mergeFrom(value); } else { maxConcurrentRequests_ = value; } } else { maxConcurrentRequestsBuilder_.mergeFrom(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** *
       * Maximum number of outstanding requests can be made to the upstream
       * cluster.  Default is 1024.
       * 
* * .google.protobuf.UInt32Value max_concurrent_requests = 3; */ public Builder clearMaxConcurrentRequests() { bitField0_ = (bitField0_ & ~0x00000008); maxConcurrentRequests_ = null; if (maxConcurrentRequestsBuilder_ != null) { maxConcurrentRequestsBuilder_.dispose(); maxConcurrentRequestsBuilder_ = null; } onChanged(); return this; } /** *
       * Maximum number of outstanding requests can be made to the upstream
       * cluster.  Default is 1024.
       * 
* * .google.protobuf.UInt32Value max_concurrent_requests = 3; */ public com.google.protobuf.UInt32Value.Builder getMaxConcurrentRequestsBuilder() { bitField0_ |= 0x00000008; onChanged(); return getMaxConcurrentRequestsFieldBuilder().getBuilder(); } /** *
       * Maximum number of outstanding requests can be made to the upstream
       * cluster.  Default is 1024.
       * 
* * .google.protobuf.UInt32Value max_concurrent_requests = 3; */ public com.google.protobuf.UInt32ValueOrBuilder getMaxConcurrentRequestsOrBuilder() { if (maxConcurrentRequestsBuilder_ != null) { return maxConcurrentRequestsBuilder_.getMessageOrBuilder(); } else { return maxConcurrentRequests_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : maxConcurrentRequests_; } } /** *
       * Maximum number of outstanding requests can be made to the upstream
       * cluster.  Default is 1024.
       * 
* * .google.protobuf.UInt32Value max_concurrent_requests = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> getMaxConcurrentRequestsFieldBuilder() { if (maxConcurrentRequestsBuilder_ == null) { maxConcurrentRequestsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>( getMaxConcurrentRequests(), getParentForChildren(), isClean()); maxConcurrentRequests_ = null; } return maxConcurrentRequestsBuilder_; } private int type_ = 0; /** * .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Type type = 4; * @return The enum numeric value on the wire for type. */ @java.lang.Override public int getTypeValue() { return type_; } /** * .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Type type = 4; * @param value The enum numeric value on the wire for type to set. * @return This builder for chaining. */ public Builder setTypeValue(int value) { type_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Type type = 4; * @return The type. */ @java.lang.Override public io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Type getType() { io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Type result = io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Type.forNumber(type_); return result == null ? io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Type.UNRECOGNIZED : result; } /** * .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Type type = 4; * @param value The type to set. * @return This builder for chaining. */ public Builder setType(io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Type value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; type_ = value.getNumber(); onChanged(); return this; } /** * .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Type type = 4; * @return This builder for chaining. */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000010); type_ = 0; onChanged(); return this; } private java.lang.Object edsServiceName_ = ""; /** *
       * For type EDS only.
       * EDS service name, as returned in CDS.
       * May be unset if not specified in CDS.
       * 
* * string eds_service_name = 5; * @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; } } /** *
       * For type EDS only.
       * EDS service name, as returned in CDS.
       * May be unset if not specified in CDS.
       * 
* * string eds_service_name = 5; * @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; } } /** *
       * For type EDS only.
       * EDS service name, as returned in CDS.
       * May be unset if not specified in CDS.
       * 
* * string eds_service_name = 5; * @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_ |= 0x00000020; onChanged(); return this; } /** *
       * For type EDS only.
       * EDS service name, as returned in CDS.
       * May be unset if not specified in CDS.
       * 
* * string eds_service_name = 5; * @return This builder for chaining. */ public Builder clearEdsServiceName() { edsServiceName_ = getDefaultInstance().getEdsServiceName(); bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } /** *
       * For type EDS only.
       * EDS service name, as returned in CDS.
       * May be unset if not specified in CDS.
       * 
* * string eds_service_name = 5; * @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_ |= 0x00000020; onChanged(); return this; } private java.lang.Object dnsHostname_ = ""; /** *
       * For type LOGICAL_DNS only.
       * DNS name to resolve in "host:port" form.
       * 
* * string dns_hostname = 6; * @return The dnsHostname. */ public java.lang.String getDnsHostname() { java.lang.Object ref = dnsHostname_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); dnsHostname_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * For type LOGICAL_DNS only.
       * DNS name to resolve in "host:port" form.
       * 
* * string dns_hostname = 6; * @return The bytes for dnsHostname. */ public com.google.protobuf.ByteString getDnsHostnameBytes() { java.lang.Object ref = dnsHostname_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); dnsHostname_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * For type LOGICAL_DNS only.
       * DNS name to resolve in "host:port" form.
       * 
* * string dns_hostname = 6; * @param value The dnsHostname to set. * @return This builder for chaining. */ public Builder setDnsHostname( java.lang.String value) { if (value == null) { throw new NullPointerException(); } dnsHostname_ = value; bitField0_ |= 0x00000040; onChanged(); return this; } /** *
       * For type LOGICAL_DNS only.
       * DNS name to resolve in "host:port" form.
       * 
* * string dns_hostname = 6; * @return This builder for chaining. */ public Builder clearDnsHostname() { dnsHostname_ = getDefaultInstance().getDnsHostname(); bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } /** *
       * For type LOGICAL_DNS only.
       * DNS name to resolve in "host:port" form.
       * 
* * string dns_hostname = 6; * @param value The bytes for dnsHostname to set. * @return This builder for chaining. */ public Builder setDnsHostnameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); dnsHostname_ = value; bitField0_ |= 0x00000040; onChanged(); return this; } @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.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism) } // @@protoc_insertion_point(class_scope:grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism) private static final io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism(); } public static io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public DiscoveryMechanism 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.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int DISCOVERY_MECHANISMS_FIELD_NUMBER = 1; @SuppressWarnings("serial") private java.util.List discoveryMechanisms_; /** *
   * Ordered list of discovery mechanisms.
   * Must have at least one element.
   * Results from each discovery mechanism are concatenated together in
   * successive priorities.
   * 
* * repeated .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism discovery_mechanisms = 1; */ @java.lang.Override public java.util.List getDiscoveryMechanismsList() { return discoveryMechanisms_; } /** *
   * Ordered list of discovery mechanisms.
   * Must have at least one element.
   * Results from each discovery mechanism are concatenated together in
   * successive priorities.
   * 
* * repeated .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism discovery_mechanisms = 1; */ @java.lang.Override public java.util.List getDiscoveryMechanismsOrBuilderList() { return discoveryMechanisms_; } /** *
   * Ordered list of discovery mechanisms.
   * Must have at least one element.
   * Results from each discovery mechanism are concatenated together in
   * successive priorities.
   * 
* * repeated .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism discovery_mechanisms = 1; */ @java.lang.Override public int getDiscoveryMechanismsCount() { return discoveryMechanisms_.size(); } /** *
   * Ordered list of discovery mechanisms.
   * Must have at least one element.
   * Results from each discovery mechanism are concatenated together in
   * successive priorities.
   * 
* * repeated .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism discovery_mechanisms = 1; */ @java.lang.Override public io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism getDiscoveryMechanisms(int index) { return discoveryMechanisms_.get(index); } /** *
   * Ordered list of discovery mechanisms.
   * Must have at least one element.
   * Results from each discovery mechanism are concatenated together in
   * successive priorities.
   * 
* * repeated .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism discovery_mechanisms = 1; */ @java.lang.Override public io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanismOrBuilder getDiscoveryMechanismsOrBuilder( int index) { return discoveryMechanisms_.get(index); } public static final int XDS_LB_POLICY_FIELD_NUMBER = 2; @SuppressWarnings("serial") private java.util.List xdsLbPolicy_; /** *
   * xDS LB policy.
   * This represents the xDS LB policy, which does not necessarily map
   * one-to-one to a gRPC LB policy.  Currently, the following policies
   * are supported:
   * - "ROUND_ROBIN" (config is empty)
   * - "RING_HASH" (config is a RingHashLoadBalancingConfig)
   * 
* * repeated .grpc.service_config.LoadBalancingConfig xds_lb_policy = 2; */ @java.lang.Override public java.util.List getXdsLbPolicyList() { return xdsLbPolicy_; } /** *
   * xDS LB policy.
   * This represents the xDS LB policy, which does not necessarily map
   * one-to-one to a gRPC LB policy.  Currently, the following policies
   * are supported:
   * - "ROUND_ROBIN" (config is empty)
   * - "RING_HASH" (config is a RingHashLoadBalancingConfig)
   * 
* * repeated .grpc.service_config.LoadBalancingConfig xds_lb_policy = 2; */ @java.lang.Override public java.util.List getXdsLbPolicyOrBuilderList() { return xdsLbPolicy_; } /** *
   * xDS LB policy.
   * This represents the xDS LB policy, which does not necessarily map
   * one-to-one to a gRPC LB policy.  Currently, the following policies
   * are supported:
   * - "ROUND_ROBIN" (config is empty)
   * - "RING_HASH" (config is a RingHashLoadBalancingConfig)
   * 
* * repeated .grpc.service_config.LoadBalancingConfig xds_lb_policy = 2; */ @java.lang.Override public int getXdsLbPolicyCount() { return xdsLbPolicy_.size(); } /** *
   * xDS LB policy.
   * This represents the xDS LB policy, which does not necessarily map
   * one-to-one to a gRPC LB policy.  Currently, the following policies
   * are supported:
   * - "ROUND_ROBIN" (config is empty)
   * - "RING_HASH" (config is a RingHashLoadBalancingConfig)
   * 
* * repeated .grpc.service_config.LoadBalancingConfig xds_lb_policy = 2; */ @java.lang.Override public io.grpc.serviceconfig.LoadBalancingConfig getXdsLbPolicy(int index) { return xdsLbPolicy_.get(index); } /** *
   * xDS LB policy.
   * This represents the xDS LB policy, which does not necessarily map
   * one-to-one to a gRPC LB policy.  Currently, the following policies
   * are supported:
   * - "ROUND_ROBIN" (config is empty)
   * - "RING_HASH" (config is a RingHashLoadBalancingConfig)
   * 
* * repeated .grpc.service_config.LoadBalancingConfig xds_lb_policy = 2; */ @java.lang.Override public io.grpc.serviceconfig.LoadBalancingConfigOrBuilder getXdsLbPolicyOrBuilder( int index) { return xdsLbPolicy_.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 < discoveryMechanisms_.size(); i++) { output.writeMessage(1, discoveryMechanisms_.get(i)); } for (int i = 0; i < xdsLbPolicy_.size(); i++) { output.writeMessage(2, xdsLbPolicy_.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 < discoveryMechanisms_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, discoveryMechanisms_.get(i)); } for (int i = 0; i < xdsLbPolicy_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, xdsLbPolicy_.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.XdsClusterResolverLoadBalancingPolicyConfig)) { return super.equals(obj); } io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig other = (io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig) obj; if (!getDiscoveryMechanismsList() .equals(other.getDiscoveryMechanismsList())) return false; if (!getXdsLbPolicyList() .equals(other.getXdsLbPolicyList())) 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 (getDiscoveryMechanismsCount() > 0) { hash = (37 * hash) + DISCOVERY_MECHANISMS_FIELD_NUMBER; hash = (53 * hash) + getDiscoveryMechanismsList().hashCode(); } if (getXdsLbPolicyCount() > 0) { hash = (37 * hash) + XDS_LB_POLICY_FIELD_NUMBER; hash = (53 * hash) + getXdsLbPolicyList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig 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.XdsClusterResolverLoadBalancingPolicyConfig parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig 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.XdsClusterResolverLoadBalancingPolicyConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig 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.XdsClusterResolverLoadBalancingPolicyConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig 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.XdsClusterResolverLoadBalancingPolicyConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig 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.XdsClusterResolverLoadBalancingPolicyConfig 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_resolver LB policy.
   * 
* * Protobuf type {@code grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig) io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfigOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsClusterResolverLoadBalancingPolicyConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsClusterResolverLoadBalancingPolicyConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.class, io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.Builder.class); } // Construct using io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (discoveryMechanismsBuilder_ == null) { discoveryMechanisms_ = java.util.Collections.emptyList(); } else { discoveryMechanisms_ = null; discoveryMechanismsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); if (xdsLbPolicyBuilder_ == null) { xdsLbPolicy_ = java.util.Collections.emptyList(); } else { xdsLbPolicy_ = null; xdsLbPolicyBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_XdsClusterResolverLoadBalancingPolicyConfig_descriptor; } @java.lang.Override public io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig getDefaultInstanceForType() { return io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.getDefaultInstance(); } @java.lang.Override public io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig build() { io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig buildPartial() { io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig result = new io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig result) { if (discoveryMechanismsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { discoveryMechanisms_ = java.util.Collections.unmodifiableList(discoveryMechanisms_); bitField0_ = (bitField0_ & ~0x00000001); } result.discoveryMechanisms_ = discoveryMechanisms_; } else { result.discoveryMechanisms_ = discoveryMechanismsBuilder_.build(); } if (xdsLbPolicyBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { xdsLbPolicy_ = java.util.Collections.unmodifiableList(xdsLbPolicy_); bitField0_ = (bitField0_ & ~0x00000002); } result.xdsLbPolicy_ = xdsLbPolicy_; } else { result.xdsLbPolicy_ = xdsLbPolicyBuilder_.build(); } } private void buildPartial0(io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig result) { int from_bitField0_ = bitField0_; } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig) { return mergeFrom((io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig other) { if (other == io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.getDefaultInstance()) return this; if (discoveryMechanismsBuilder_ == null) { if (!other.discoveryMechanisms_.isEmpty()) { if (discoveryMechanisms_.isEmpty()) { discoveryMechanisms_ = other.discoveryMechanisms_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureDiscoveryMechanismsIsMutable(); discoveryMechanisms_.addAll(other.discoveryMechanisms_); } onChanged(); } } else { if (!other.discoveryMechanisms_.isEmpty()) { if (discoveryMechanismsBuilder_.isEmpty()) { discoveryMechanismsBuilder_.dispose(); discoveryMechanismsBuilder_ = null; discoveryMechanisms_ = other.discoveryMechanisms_; bitField0_ = (bitField0_ & ~0x00000001); discoveryMechanismsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDiscoveryMechanismsFieldBuilder() : null; } else { discoveryMechanismsBuilder_.addAllMessages(other.discoveryMechanisms_); } } } if (xdsLbPolicyBuilder_ == null) { if (!other.xdsLbPolicy_.isEmpty()) { if (xdsLbPolicy_.isEmpty()) { xdsLbPolicy_ = other.xdsLbPolicy_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureXdsLbPolicyIsMutable(); xdsLbPolicy_.addAll(other.xdsLbPolicy_); } onChanged(); } } else { if (!other.xdsLbPolicy_.isEmpty()) { if (xdsLbPolicyBuilder_.isEmpty()) { xdsLbPolicyBuilder_.dispose(); xdsLbPolicyBuilder_ = null; xdsLbPolicy_ = other.xdsLbPolicy_; bitField0_ = (bitField0_ & ~0x00000002); xdsLbPolicyBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getXdsLbPolicyFieldBuilder() : null; } else { xdsLbPolicyBuilder_.addAllMessages(other.xdsLbPolicy_); } } } 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.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism m = input.readMessage( io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.parser(), extensionRegistry); if (discoveryMechanismsBuilder_ == null) { ensureDiscoveryMechanismsIsMutable(); discoveryMechanisms_.add(m); } else { discoveryMechanismsBuilder_.addMessage(m); } break; } // case 10 case 18: { io.grpc.serviceconfig.LoadBalancingConfig m = input.readMessage( io.grpc.serviceconfig.LoadBalancingConfig.parser(), extensionRegistry); if (xdsLbPolicyBuilder_ == null) { ensureXdsLbPolicyIsMutable(); xdsLbPolicy_.add(m); } else { xdsLbPolicyBuilder_.addMessage(m); } break; } // case 18 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 discoveryMechanisms_ = java.util.Collections.emptyList(); private void ensureDiscoveryMechanismsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { discoveryMechanisms_ = new java.util.ArrayList(discoveryMechanisms_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism, io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Builder, io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanismOrBuilder> discoveryMechanismsBuilder_; /** *
     * Ordered list of discovery mechanisms.
     * Must have at least one element.
     * Results from each discovery mechanism are concatenated together in
     * successive priorities.
     * 
* * repeated .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism discovery_mechanisms = 1; */ public java.util.List getDiscoveryMechanismsList() { if (discoveryMechanismsBuilder_ == null) { return java.util.Collections.unmodifiableList(discoveryMechanisms_); } else { return discoveryMechanismsBuilder_.getMessageList(); } } /** *
     * Ordered list of discovery mechanisms.
     * Must have at least one element.
     * Results from each discovery mechanism are concatenated together in
     * successive priorities.
     * 
* * repeated .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism discovery_mechanisms = 1; */ public int getDiscoveryMechanismsCount() { if (discoveryMechanismsBuilder_ == null) { return discoveryMechanisms_.size(); } else { return discoveryMechanismsBuilder_.getCount(); } } /** *
     * Ordered list of discovery mechanisms.
     * Must have at least one element.
     * Results from each discovery mechanism are concatenated together in
     * successive priorities.
     * 
* * repeated .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism discovery_mechanisms = 1; */ public io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism getDiscoveryMechanisms(int index) { if (discoveryMechanismsBuilder_ == null) { return discoveryMechanisms_.get(index); } else { return discoveryMechanismsBuilder_.getMessage(index); } } /** *
     * Ordered list of discovery mechanisms.
     * Must have at least one element.
     * Results from each discovery mechanism are concatenated together in
     * successive priorities.
     * 
* * repeated .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism discovery_mechanisms = 1; */ public Builder setDiscoveryMechanisms( int index, io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism value) { if (discoveryMechanismsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureDiscoveryMechanismsIsMutable(); discoveryMechanisms_.set(index, value); onChanged(); } else { discoveryMechanismsBuilder_.setMessage(index, value); } return this; } /** *
     * Ordered list of discovery mechanisms.
     * Must have at least one element.
     * Results from each discovery mechanism are concatenated together in
     * successive priorities.
     * 
* * repeated .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism discovery_mechanisms = 1; */ public Builder setDiscoveryMechanisms( int index, io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Builder builderForValue) { if (discoveryMechanismsBuilder_ == null) { ensureDiscoveryMechanismsIsMutable(); discoveryMechanisms_.set(index, builderForValue.build()); onChanged(); } else { discoveryMechanismsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * Ordered list of discovery mechanisms.
     * Must have at least one element.
     * Results from each discovery mechanism are concatenated together in
     * successive priorities.
     * 
* * repeated .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism discovery_mechanisms = 1; */ public Builder addDiscoveryMechanisms(io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism value) { if (discoveryMechanismsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureDiscoveryMechanismsIsMutable(); discoveryMechanisms_.add(value); onChanged(); } else { discoveryMechanismsBuilder_.addMessage(value); } return this; } /** *
     * Ordered list of discovery mechanisms.
     * Must have at least one element.
     * Results from each discovery mechanism are concatenated together in
     * successive priorities.
     * 
* * repeated .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism discovery_mechanisms = 1; */ public Builder addDiscoveryMechanisms( int index, io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism value) { if (discoveryMechanismsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureDiscoveryMechanismsIsMutable(); discoveryMechanisms_.add(index, value); onChanged(); } else { discoveryMechanismsBuilder_.addMessage(index, value); } return this; } /** *
     * Ordered list of discovery mechanisms.
     * Must have at least one element.
     * Results from each discovery mechanism are concatenated together in
     * successive priorities.
     * 
* * repeated .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism discovery_mechanisms = 1; */ public Builder addDiscoveryMechanisms( io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Builder builderForValue) { if (discoveryMechanismsBuilder_ == null) { ensureDiscoveryMechanismsIsMutable(); discoveryMechanisms_.add(builderForValue.build()); onChanged(); } else { discoveryMechanismsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * Ordered list of discovery mechanisms.
     * Must have at least one element.
     * Results from each discovery mechanism are concatenated together in
     * successive priorities.
     * 
* * repeated .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism discovery_mechanisms = 1; */ public Builder addDiscoveryMechanisms( int index, io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Builder builderForValue) { if (discoveryMechanismsBuilder_ == null) { ensureDiscoveryMechanismsIsMutable(); discoveryMechanisms_.add(index, builderForValue.build()); onChanged(); } else { discoveryMechanismsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * Ordered list of discovery mechanisms.
     * Must have at least one element.
     * Results from each discovery mechanism are concatenated together in
     * successive priorities.
     * 
* * repeated .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism discovery_mechanisms = 1; */ public Builder addAllDiscoveryMechanisms( java.lang.Iterable values) { if (discoveryMechanismsBuilder_ == null) { ensureDiscoveryMechanismsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, discoveryMechanisms_); onChanged(); } else { discoveryMechanismsBuilder_.addAllMessages(values); } return this; } /** *
     * Ordered list of discovery mechanisms.
     * Must have at least one element.
     * Results from each discovery mechanism are concatenated together in
     * successive priorities.
     * 
* * repeated .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism discovery_mechanisms = 1; */ public Builder clearDiscoveryMechanisms() { if (discoveryMechanismsBuilder_ == null) { discoveryMechanisms_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { discoveryMechanismsBuilder_.clear(); } return this; } /** *
     * Ordered list of discovery mechanisms.
     * Must have at least one element.
     * Results from each discovery mechanism are concatenated together in
     * successive priorities.
     * 
* * repeated .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism discovery_mechanisms = 1; */ public Builder removeDiscoveryMechanisms(int index) { if (discoveryMechanismsBuilder_ == null) { ensureDiscoveryMechanismsIsMutable(); discoveryMechanisms_.remove(index); onChanged(); } else { discoveryMechanismsBuilder_.remove(index); } return this; } /** *
     * Ordered list of discovery mechanisms.
     * Must have at least one element.
     * Results from each discovery mechanism are concatenated together in
     * successive priorities.
     * 
* * repeated .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism discovery_mechanisms = 1; */ public io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Builder getDiscoveryMechanismsBuilder( int index) { return getDiscoveryMechanismsFieldBuilder().getBuilder(index); } /** *
     * Ordered list of discovery mechanisms.
     * Must have at least one element.
     * Results from each discovery mechanism are concatenated together in
     * successive priorities.
     * 
* * repeated .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism discovery_mechanisms = 1; */ public io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanismOrBuilder getDiscoveryMechanismsOrBuilder( int index) { if (discoveryMechanismsBuilder_ == null) { return discoveryMechanisms_.get(index); } else { return discoveryMechanismsBuilder_.getMessageOrBuilder(index); } } /** *
     * Ordered list of discovery mechanisms.
     * Must have at least one element.
     * Results from each discovery mechanism are concatenated together in
     * successive priorities.
     * 
* * repeated .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism discovery_mechanisms = 1; */ public java.util.List getDiscoveryMechanismsOrBuilderList() { if (discoveryMechanismsBuilder_ != null) { return discoveryMechanismsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(discoveryMechanisms_); } } /** *
     * Ordered list of discovery mechanisms.
     * Must have at least one element.
     * Results from each discovery mechanism are concatenated together in
     * successive priorities.
     * 
* * repeated .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism discovery_mechanisms = 1; */ public io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Builder addDiscoveryMechanismsBuilder() { return getDiscoveryMechanismsFieldBuilder().addBuilder( io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.getDefaultInstance()); } /** *
     * Ordered list of discovery mechanisms.
     * Must have at least one element.
     * Results from each discovery mechanism are concatenated together in
     * successive priorities.
     * 
* * repeated .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism discovery_mechanisms = 1; */ public io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Builder addDiscoveryMechanismsBuilder( int index) { return getDiscoveryMechanismsFieldBuilder().addBuilder( index, io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.getDefaultInstance()); } /** *
     * Ordered list of discovery mechanisms.
     * Must have at least one element.
     * Results from each discovery mechanism are concatenated together in
     * successive priorities.
     * 
* * repeated .grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism discovery_mechanisms = 1; */ public java.util.List getDiscoveryMechanismsBuilderList() { return getDiscoveryMechanismsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism, io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Builder, io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanismOrBuilder> getDiscoveryMechanismsFieldBuilder() { if (discoveryMechanismsBuilder_ == null) { discoveryMechanismsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism, io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanism.Builder, io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig.DiscoveryMechanismOrBuilder>( discoveryMechanisms_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); discoveryMechanisms_ = null; } return discoveryMechanismsBuilder_; } private java.util.List xdsLbPolicy_ = java.util.Collections.emptyList(); private void ensureXdsLbPolicyIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { xdsLbPolicy_ = new java.util.ArrayList(xdsLbPolicy_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< io.grpc.serviceconfig.LoadBalancingConfig, io.grpc.serviceconfig.LoadBalancingConfig.Builder, io.grpc.serviceconfig.LoadBalancingConfigOrBuilder> xdsLbPolicyBuilder_; /** *
     * xDS LB policy.
     * This represents the xDS LB policy, which does not necessarily map
     * one-to-one to a gRPC LB policy.  Currently, the following policies
     * are supported:
     * - "ROUND_ROBIN" (config is empty)
     * - "RING_HASH" (config is a RingHashLoadBalancingConfig)
     * 
* * repeated .grpc.service_config.LoadBalancingConfig xds_lb_policy = 2; */ public java.util.List getXdsLbPolicyList() { if (xdsLbPolicyBuilder_ == null) { return java.util.Collections.unmodifiableList(xdsLbPolicy_); } else { return xdsLbPolicyBuilder_.getMessageList(); } } /** *
     * xDS LB policy.
     * This represents the xDS LB policy, which does not necessarily map
     * one-to-one to a gRPC LB policy.  Currently, the following policies
     * are supported:
     * - "ROUND_ROBIN" (config is empty)
     * - "RING_HASH" (config is a RingHashLoadBalancingConfig)
     * 
* * repeated .grpc.service_config.LoadBalancingConfig xds_lb_policy = 2; */ public int getXdsLbPolicyCount() { if (xdsLbPolicyBuilder_ == null) { return xdsLbPolicy_.size(); } else { return xdsLbPolicyBuilder_.getCount(); } } /** *
     * xDS LB policy.
     * This represents the xDS LB policy, which does not necessarily map
     * one-to-one to a gRPC LB policy.  Currently, the following policies
     * are supported:
     * - "ROUND_ROBIN" (config is empty)
     * - "RING_HASH" (config is a RingHashLoadBalancingConfig)
     * 
* * repeated .grpc.service_config.LoadBalancingConfig xds_lb_policy = 2; */ public io.grpc.serviceconfig.LoadBalancingConfig getXdsLbPolicy(int index) { if (xdsLbPolicyBuilder_ == null) { return xdsLbPolicy_.get(index); } else { return xdsLbPolicyBuilder_.getMessage(index); } } /** *
     * xDS LB policy.
     * This represents the xDS LB policy, which does not necessarily map
     * one-to-one to a gRPC LB policy.  Currently, the following policies
     * are supported:
     * - "ROUND_ROBIN" (config is empty)
     * - "RING_HASH" (config is a RingHashLoadBalancingConfig)
     * 
* * repeated .grpc.service_config.LoadBalancingConfig xds_lb_policy = 2; */ public Builder setXdsLbPolicy( int index, io.grpc.serviceconfig.LoadBalancingConfig value) { if (xdsLbPolicyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureXdsLbPolicyIsMutable(); xdsLbPolicy_.set(index, value); onChanged(); } else { xdsLbPolicyBuilder_.setMessage(index, value); } return this; } /** *
     * xDS LB policy.
     * This represents the xDS LB policy, which does not necessarily map
     * one-to-one to a gRPC LB policy.  Currently, the following policies
     * are supported:
     * - "ROUND_ROBIN" (config is empty)
     * - "RING_HASH" (config is a RingHashLoadBalancingConfig)
     * 
* * repeated .grpc.service_config.LoadBalancingConfig xds_lb_policy = 2; */ public Builder setXdsLbPolicy( int index, io.grpc.serviceconfig.LoadBalancingConfig.Builder builderForValue) { if (xdsLbPolicyBuilder_ == null) { ensureXdsLbPolicyIsMutable(); xdsLbPolicy_.set(index, builderForValue.build()); onChanged(); } else { xdsLbPolicyBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * xDS LB policy.
     * This represents the xDS LB policy, which does not necessarily map
     * one-to-one to a gRPC LB policy.  Currently, the following policies
     * are supported:
     * - "ROUND_ROBIN" (config is empty)
     * - "RING_HASH" (config is a RingHashLoadBalancingConfig)
     * 
* * repeated .grpc.service_config.LoadBalancingConfig xds_lb_policy = 2; */ public Builder addXdsLbPolicy(io.grpc.serviceconfig.LoadBalancingConfig value) { if (xdsLbPolicyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureXdsLbPolicyIsMutable(); xdsLbPolicy_.add(value); onChanged(); } else { xdsLbPolicyBuilder_.addMessage(value); } return this; } /** *
     * xDS LB policy.
     * This represents the xDS LB policy, which does not necessarily map
     * one-to-one to a gRPC LB policy.  Currently, the following policies
     * are supported:
     * - "ROUND_ROBIN" (config is empty)
     * - "RING_HASH" (config is a RingHashLoadBalancingConfig)
     * 
* * repeated .grpc.service_config.LoadBalancingConfig xds_lb_policy = 2; */ public Builder addXdsLbPolicy( int index, io.grpc.serviceconfig.LoadBalancingConfig value) { if (xdsLbPolicyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureXdsLbPolicyIsMutable(); xdsLbPolicy_.add(index, value); onChanged(); } else { xdsLbPolicyBuilder_.addMessage(index, value); } return this; } /** *
     * xDS LB policy.
     * This represents the xDS LB policy, which does not necessarily map
     * one-to-one to a gRPC LB policy.  Currently, the following policies
     * are supported:
     * - "ROUND_ROBIN" (config is empty)
     * - "RING_HASH" (config is a RingHashLoadBalancingConfig)
     * 
* * repeated .grpc.service_config.LoadBalancingConfig xds_lb_policy = 2; */ public Builder addXdsLbPolicy( io.grpc.serviceconfig.LoadBalancingConfig.Builder builderForValue) { if (xdsLbPolicyBuilder_ == null) { ensureXdsLbPolicyIsMutable(); xdsLbPolicy_.add(builderForValue.build()); onChanged(); } else { xdsLbPolicyBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * xDS LB policy.
     * This represents the xDS LB policy, which does not necessarily map
     * one-to-one to a gRPC LB policy.  Currently, the following policies
     * are supported:
     * - "ROUND_ROBIN" (config is empty)
     * - "RING_HASH" (config is a RingHashLoadBalancingConfig)
     * 
* * repeated .grpc.service_config.LoadBalancingConfig xds_lb_policy = 2; */ public Builder addXdsLbPolicy( int index, io.grpc.serviceconfig.LoadBalancingConfig.Builder builderForValue) { if (xdsLbPolicyBuilder_ == null) { ensureXdsLbPolicyIsMutable(); xdsLbPolicy_.add(index, builderForValue.build()); onChanged(); } else { xdsLbPolicyBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * xDS LB policy.
     * This represents the xDS LB policy, which does not necessarily map
     * one-to-one to a gRPC LB policy.  Currently, the following policies
     * are supported:
     * - "ROUND_ROBIN" (config is empty)
     * - "RING_HASH" (config is a RingHashLoadBalancingConfig)
     * 
* * repeated .grpc.service_config.LoadBalancingConfig xds_lb_policy = 2; */ public Builder addAllXdsLbPolicy( java.lang.Iterable values) { if (xdsLbPolicyBuilder_ == null) { ensureXdsLbPolicyIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, xdsLbPolicy_); onChanged(); } else { xdsLbPolicyBuilder_.addAllMessages(values); } return this; } /** *
     * xDS LB policy.
     * This represents the xDS LB policy, which does not necessarily map
     * one-to-one to a gRPC LB policy.  Currently, the following policies
     * are supported:
     * - "ROUND_ROBIN" (config is empty)
     * - "RING_HASH" (config is a RingHashLoadBalancingConfig)
     * 
* * repeated .grpc.service_config.LoadBalancingConfig xds_lb_policy = 2; */ public Builder clearXdsLbPolicy() { if (xdsLbPolicyBuilder_ == null) { xdsLbPolicy_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { xdsLbPolicyBuilder_.clear(); } return this; } /** *
     * xDS LB policy.
     * This represents the xDS LB policy, which does not necessarily map
     * one-to-one to a gRPC LB policy.  Currently, the following policies
     * are supported:
     * - "ROUND_ROBIN" (config is empty)
     * - "RING_HASH" (config is a RingHashLoadBalancingConfig)
     * 
* * repeated .grpc.service_config.LoadBalancingConfig xds_lb_policy = 2; */ public Builder removeXdsLbPolicy(int index) { if (xdsLbPolicyBuilder_ == null) { ensureXdsLbPolicyIsMutable(); xdsLbPolicy_.remove(index); onChanged(); } else { xdsLbPolicyBuilder_.remove(index); } return this; } /** *
     * xDS LB policy.
     * This represents the xDS LB policy, which does not necessarily map
     * one-to-one to a gRPC LB policy.  Currently, the following policies
     * are supported:
     * - "ROUND_ROBIN" (config is empty)
     * - "RING_HASH" (config is a RingHashLoadBalancingConfig)
     * 
* * repeated .grpc.service_config.LoadBalancingConfig xds_lb_policy = 2; */ public io.grpc.serviceconfig.LoadBalancingConfig.Builder getXdsLbPolicyBuilder( int index) { return getXdsLbPolicyFieldBuilder().getBuilder(index); } /** *
     * xDS LB policy.
     * This represents the xDS LB policy, which does not necessarily map
     * one-to-one to a gRPC LB policy.  Currently, the following policies
     * are supported:
     * - "ROUND_ROBIN" (config is empty)
     * - "RING_HASH" (config is a RingHashLoadBalancingConfig)
     * 
* * repeated .grpc.service_config.LoadBalancingConfig xds_lb_policy = 2; */ public io.grpc.serviceconfig.LoadBalancingConfigOrBuilder getXdsLbPolicyOrBuilder( int index) { if (xdsLbPolicyBuilder_ == null) { return xdsLbPolicy_.get(index); } else { return xdsLbPolicyBuilder_.getMessageOrBuilder(index); } } /** *
     * xDS LB policy.
     * This represents the xDS LB policy, which does not necessarily map
     * one-to-one to a gRPC LB policy.  Currently, the following policies
     * are supported:
     * - "ROUND_ROBIN" (config is empty)
     * - "RING_HASH" (config is a RingHashLoadBalancingConfig)
     * 
* * repeated .grpc.service_config.LoadBalancingConfig xds_lb_policy = 2; */ public java.util.List getXdsLbPolicyOrBuilderList() { if (xdsLbPolicyBuilder_ != null) { return xdsLbPolicyBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(xdsLbPolicy_); } } /** *
     * xDS LB policy.
     * This represents the xDS LB policy, which does not necessarily map
     * one-to-one to a gRPC LB policy.  Currently, the following policies
     * are supported:
     * - "ROUND_ROBIN" (config is empty)
     * - "RING_HASH" (config is a RingHashLoadBalancingConfig)
     * 
* * repeated .grpc.service_config.LoadBalancingConfig xds_lb_policy = 2; */ public io.grpc.serviceconfig.LoadBalancingConfig.Builder addXdsLbPolicyBuilder() { return getXdsLbPolicyFieldBuilder().addBuilder( io.grpc.serviceconfig.LoadBalancingConfig.getDefaultInstance()); } /** *
     * xDS LB policy.
     * This represents the xDS LB policy, which does not necessarily map
     * one-to-one to a gRPC LB policy.  Currently, the following policies
     * are supported:
     * - "ROUND_ROBIN" (config is empty)
     * - "RING_HASH" (config is a RingHashLoadBalancingConfig)
     * 
* * repeated .grpc.service_config.LoadBalancingConfig xds_lb_policy = 2; */ public io.grpc.serviceconfig.LoadBalancingConfig.Builder addXdsLbPolicyBuilder( int index) { return getXdsLbPolicyFieldBuilder().addBuilder( index, io.grpc.serviceconfig.LoadBalancingConfig.getDefaultInstance()); } /** *
     * xDS LB policy.
     * This represents the xDS LB policy, which does not necessarily map
     * one-to-one to a gRPC LB policy.  Currently, the following policies
     * are supported:
     * - "ROUND_ROBIN" (config is empty)
     * - "RING_HASH" (config is a RingHashLoadBalancingConfig)
     * 
* * repeated .grpc.service_config.LoadBalancingConfig xds_lb_policy = 2; */ public java.util.List getXdsLbPolicyBuilderList() { return getXdsLbPolicyFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< io.grpc.serviceconfig.LoadBalancingConfig, io.grpc.serviceconfig.LoadBalancingConfig.Builder, io.grpc.serviceconfig.LoadBalancingConfigOrBuilder> getXdsLbPolicyFieldBuilder() { if (xdsLbPolicyBuilder_ == null) { xdsLbPolicyBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.grpc.serviceconfig.LoadBalancingConfig, io.grpc.serviceconfig.LoadBalancingConfig.Builder, io.grpc.serviceconfig.LoadBalancingConfigOrBuilder>( xdsLbPolicy_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); xdsLbPolicy_ = null; } return xdsLbPolicyBuilder_; } @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.XdsClusterResolverLoadBalancingPolicyConfig) } // @@protoc_insertion_point(class_scope:grpc.service_config.XdsClusterResolverLoadBalancingPolicyConfig) private static final io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig(); } public static io.grpc.serviceconfig.XdsClusterResolverLoadBalancingPolicyConfig getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public XdsClusterResolverLoadBalancingPolicyConfig 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.XdsClusterResolverLoadBalancingPolicyConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy