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

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

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

// Protobuf Java Version: 3.25.4
package io.grpc.serviceconfig;

/**
 * 
 * Configuration for eds LB policy.
 * 
* * Protobuf type {@code grpc.service_config.EdsLoadBalancingPolicyConfig} */ public final class EdsLoadBalancingPolicyConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:grpc.service_config.EdsLoadBalancingPolicyConfig) EdsLoadBalancingPolicyConfigOrBuilder { private static final long serialVersionUID = 0L; // Use EdsLoadBalancingPolicyConfig.newBuilder() to construct. private EdsLoadBalancingPolicyConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private EdsLoadBalancingPolicyConfig() { cluster_ = ""; edsServiceName_ = ""; localityPickingPolicy_ = java.util.Collections.emptyList(); endpointPickingPolicy_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new EdsLoadBalancingPolicyConfig(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_EdsLoadBalancingPolicyConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_EdsLoadBalancingPolicyConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig.class, io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig.Builder.class); } private int bitField0_; public static final int CLUSTER_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object cluster_ = ""; /** *
   * Cluster name.  Required.
   * 
* * 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.  Required.
   * 
* * 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 EDS_SERVICE_NAME_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object edsServiceName_ = ""; /** *
   * EDS service name, as returned in CDS.
   * May be unset if not specified in CDS.
   * 
* * string eds_service_name = 2; * @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; } } /** *
   * EDS service name, as returned in CDS.
   * May be unset if not specified in CDS.
   * 
* * string eds_service_name = 2; * @return The bytes for edsServiceName. */ @java.lang.Override public com.google.protobuf.ByteString getEdsServiceNameBytes() { java.lang.Object ref = edsServiceName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); edsServiceName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LRS_LOAD_REPORTING_SERVER_NAME_FIELD_NUMBER = 3; private com.google.protobuf.StringValue lrsLoadReportingServerName_; /** *
   * Server to send load reports to.
   * If unset, no load reporting is done.
   * If set to empty string, load reporting will be sent to the same
   * server as we are getting xds data from.
   * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 3; * @return Whether the lrsLoadReportingServerName field is set. */ @java.lang.Override public boolean hasLrsLoadReportingServerName() { return ((bitField0_ & 0x00000001) != 0); } /** *
   * Server to send load reports to.
   * If unset, no load reporting is done.
   * If set to empty string, load reporting will be sent to the same
   * server as we are getting xds data from.
   * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 3; * @return The lrsLoadReportingServerName. */ @java.lang.Override public com.google.protobuf.StringValue getLrsLoadReportingServerName() { return lrsLoadReportingServerName_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : lrsLoadReportingServerName_; } /** *
   * Server to send load reports to.
   * If unset, no load reporting is done.
   * If set to empty string, load reporting will be sent to the same
   * server as we are getting xds data from.
   * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 3; */ @java.lang.Override public com.google.protobuf.StringValueOrBuilder getLrsLoadReportingServerNameOrBuilder() { return lrsLoadReportingServerName_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : lrsLoadReportingServerName_; } public static final int LOCALITY_PICKING_POLICY_FIELD_NUMBER = 4; @SuppressWarnings("serial") private java.util.List localityPickingPolicy_; /** *
   * Locality-picking policy.
   * This policy's config is expected to be in the format used
   * by the weighted_target policy.  Note that the config should include
   * an empty value for the "targets" field; that empty value will be
   * replaced by one that is dynamically generated based on the EDS data.
   * Optional; defaults to "weighted_target".
   * 
* * repeated .grpc.service_config.LoadBalancingConfig locality_picking_policy = 4; */ @java.lang.Override public java.util.List getLocalityPickingPolicyList() { return localityPickingPolicy_; } /** *
   * Locality-picking policy.
   * This policy's config is expected to be in the format used
   * by the weighted_target policy.  Note that the config should include
   * an empty value for the "targets" field; that empty value will be
   * replaced by one that is dynamically generated based on the EDS data.
   * Optional; defaults to "weighted_target".
   * 
* * repeated .grpc.service_config.LoadBalancingConfig locality_picking_policy = 4; */ @java.lang.Override public java.util.List getLocalityPickingPolicyOrBuilderList() { return localityPickingPolicy_; } /** *
   * Locality-picking policy.
   * This policy's config is expected to be in the format used
   * by the weighted_target policy.  Note that the config should include
   * an empty value for the "targets" field; that empty value will be
   * replaced by one that is dynamically generated based on the EDS data.
   * Optional; defaults to "weighted_target".
   * 
* * repeated .grpc.service_config.LoadBalancingConfig locality_picking_policy = 4; */ @java.lang.Override public int getLocalityPickingPolicyCount() { return localityPickingPolicy_.size(); } /** *
   * Locality-picking policy.
   * This policy's config is expected to be in the format used
   * by the weighted_target policy.  Note that the config should include
   * an empty value for the "targets" field; that empty value will be
   * replaced by one that is dynamically generated based on the EDS data.
   * Optional; defaults to "weighted_target".
   * 
* * repeated .grpc.service_config.LoadBalancingConfig locality_picking_policy = 4; */ @java.lang.Override public io.grpc.serviceconfig.LoadBalancingConfig getLocalityPickingPolicy(int index) { return localityPickingPolicy_.get(index); } /** *
   * Locality-picking policy.
   * This policy's config is expected to be in the format used
   * by the weighted_target policy.  Note that the config should include
   * an empty value for the "targets" field; that empty value will be
   * replaced by one that is dynamically generated based on the EDS data.
   * Optional; defaults to "weighted_target".
   * 
* * repeated .grpc.service_config.LoadBalancingConfig locality_picking_policy = 4; */ @java.lang.Override public io.grpc.serviceconfig.LoadBalancingConfigOrBuilder getLocalityPickingPolicyOrBuilder( int index) { return localityPickingPolicy_.get(index); } public static final int ENDPOINT_PICKING_POLICY_FIELD_NUMBER = 5; @SuppressWarnings("serial") private java.util.List endpointPickingPolicy_; /** *
   * Endpoint-picking policy.
   * This will be configured as the policy for each child in the
   * locality-policy's config.
   * Optional; defaults to "round_robin".
   * 
* * repeated .grpc.service_config.LoadBalancingConfig endpoint_picking_policy = 5; */ @java.lang.Override public java.util.List getEndpointPickingPolicyList() { return endpointPickingPolicy_; } /** *
   * Endpoint-picking policy.
   * This will be configured as the policy for each child in the
   * locality-policy's config.
   * Optional; defaults to "round_robin".
   * 
* * repeated .grpc.service_config.LoadBalancingConfig endpoint_picking_policy = 5; */ @java.lang.Override public java.util.List getEndpointPickingPolicyOrBuilderList() { return endpointPickingPolicy_; } /** *
   * Endpoint-picking policy.
   * This will be configured as the policy for each child in the
   * locality-policy's config.
   * Optional; defaults to "round_robin".
   * 
* * repeated .grpc.service_config.LoadBalancingConfig endpoint_picking_policy = 5; */ @java.lang.Override public int getEndpointPickingPolicyCount() { return endpointPickingPolicy_.size(); } /** *
   * Endpoint-picking policy.
   * This will be configured as the policy for each child in the
   * locality-policy's config.
   * Optional; defaults to "round_robin".
   * 
* * repeated .grpc.service_config.LoadBalancingConfig endpoint_picking_policy = 5; */ @java.lang.Override public io.grpc.serviceconfig.LoadBalancingConfig getEndpointPickingPolicy(int index) { return endpointPickingPolicy_.get(index); } /** *
   * Endpoint-picking policy.
   * This will be configured as the policy for each child in the
   * locality-policy's config.
   * Optional; defaults to "round_robin".
   * 
* * repeated .grpc.service_config.LoadBalancingConfig endpoint_picking_policy = 5; */ @java.lang.Override public io.grpc.serviceconfig.LoadBalancingConfigOrBuilder getEndpointPickingPolicyOrBuilder( int index) { return endpointPickingPolicy_.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 { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cluster_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cluster_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(edsServiceName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, edsServiceName_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getLrsLoadReportingServerName()); } for (int i = 0; i < localityPickingPolicy_.size(); i++) { output.writeMessage(4, localityPickingPolicy_.get(i)); } for (int i = 0; i < endpointPickingPolicy_.size(); i++) { output.writeMessage(5, endpointPickingPolicy_.get(i)); } 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(edsServiceName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, edsServiceName_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getLrsLoadReportingServerName()); } for (int i = 0; i < localityPickingPolicy_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, localityPickingPolicy_.get(i)); } for (int i = 0; i < endpointPickingPolicy_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, endpointPickingPolicy_.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.EdsLoadBalancingPolicyConfig)) { return super.equals(obj); } io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig other = (io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig) obj; if (!getCluster() .equals(other.getCluster())) return false; if (!getEdsServiceName() .equals(other.getEdsServiceName())) return false; if (hasLrsLoadReportingServerName() != other.hasLrsLoadReportingServerName()) return false; if (hasLrsLoadReportingServerName()) { if (!getLrsLoadReportingServerName() .equals(other.getLrsLoadReportingServerName())) return false; } if (!getLocalityPickingPolicyList() .equals(other.getLocalityPickingPolicyList())) return false; if (!getEndpointPickingPolicyList() .equals(other.getEndpointPickingPolicyList())) 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(); hash = (37 * hash) + EDS_SERVICE_NAME_FIELD_NUMBER; hash = (53 * hash) + getEdsServiceName().hashCode(); if (hasLrsLoadReportingServerName()) { hash = (37 * hash) + LRS_LOAD_REPORTING_SERVER_NAME_FIELD_NUMBER; hash = (53 * hash) + getLrsLoadReportingServerName().hashCode(); } if (getLocalityPickingPolicyCount() > 0) { hash = (37 * hash) + LOCALITY_PICKING_POLICY_FIELD_NUMBER; hash = (53 * hash) + getLocalityPickingPolicyList().hashCode(); } if (getEndpointPickingPolicyCount() > 0) { hash = (37 * hash) + ENDPOINT_PICKING_POLICY_FIELD_NUMBER; hash = (53 * hash) + getEndpointPickingPolicyList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig 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.EdsLoadBalancingPolicyConfig parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig 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.EdsLoadBalancingPolicyConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig 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.EdsLoadBalancingPolicyConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig 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.EdsLoadBalancingPolicyConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig 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.EdsLoadBalancingPolicyConfig 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 eds LB policy.
   * 
* * Protobuf type {@code grpc.service_config.EdsLoadBalancingPolicyConfig} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:grpc.service_config.EdsLoadBalancingPolicyConfig) io.grpc.serviceconfig.EdsLoadBalancingPolicyConfigOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_EdsLoadBalancingPolicyConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_EdsLoadBalancingPolicyConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig.class, io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig.Builder.class); } // Construct using io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getLrsLoadReportingServerNameFieldBuilder(); getLocalityPickingPolicyFieldBuilder(); getEndpointPickingPolicyFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; cluster_ = ""; edsServiceName_ = ""; lrsLoadReportingServerName_ = null; if (lrsLoadReportingServerNameBuilder_ != null) { lrsLoadReportingServerNameBuilder_.dispose(); lrsLoadReportingServerNameBuilder_ = null; } if (localityPickingPolicyBuilder_ == null) { localityPickingPolicy_ = java.util.Collections.emptyList(); } else { localityPickingPolicy_ = null; localityPickingPolicyBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); if (endpointPickingPolicyBuilder_ == null) { endpointPickingPolicy_ = java.util.Collections.emptyList(); } else { endpointPickingPolicy_ = null; endpointPickingPolicyBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_EdsLoadBalancingPolicyConfig_descriptor; } @java.lang.Override public io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig getDefaultInstanceForType() { return io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig.getDefaultInstance(); } @java.lang.Override public io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig build() { io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig buildPartial() { io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig result = new io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig result) { if (localityPickingPolicyBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0)) { localityPickingPolicy_ = java.util.Collections.unmodifiableList(localityPickingPolicy_); bitField0_ = (bitField0_ & ~0x00000008); } result.localityPickingPolicy_ = localityPickingPolicy_; } else { result.localityPickingPolicy_ = localityPickingPolicyBuilder_.build(); } if (endpointPickingPolicyBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0)) { endpointPickingPolicy_ = java.util.Collections.unmodifiableList(endpointPickingPolicy_); bitField0_ = (bitField0_ & ~0x00000010); } result.endpointPickingPolicy_ = endpointPickingPolicy_; } else { result.endpointPickingPolicy_ = endpointPickingPolicyBuilder_.build(); } } private void buildPartial0(io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.cluster_ = cluster_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.edsServiceName_ = edsServiceName_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { result.lrsLoadReportingServerName_ = lrsLoadReportingServerNameBuilder_ == null ? lrsLoadReportingServerName_ : lrsLoadReportingServerNameBuilder_.build(); to_bitField0_ |= 0x00000001; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig) { return mergeFrom((io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig other) { if (other == io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig.getDefaultInstance()) return this; if (!other.getCluster().isEmpty()) { cluster_ = other.cluster_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getEdsServiceName().isEmpty()) { edsServiceName_ = other.edsServiceName_; bitField0_ |= 0x00000002; onChanged(); } if (other.hasLrsLoadReportingServerName()) { mergeLrsLoadReportingServerName(other.getLrsLoadReportingServerName()); } if (localityPickingPolicyBuilder_ == null) { if (!other.localityPickingPolicy_.isEmpty()) { if (localityPickingPolicy_.isEmpty()) { localityPickingPolicy_ = other.localityPickingPolicy_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureLocalityPickingPolicyIsMutable(); localityPickingPolicy_.addAll(other.localityPickingPolicy_); } onChanged(); } } else { if (!other.localityPickingPolicy_.isEmpty()) { if (localityPickingPolicyBuilder_.isEmpty()) { localityPickingPolicyBuilder_.dispose(); localityPickingPolicyBuilder_ = null; localityPickingPolicy_ = other.localityPickingPolicy_; bitField0_ = (bitField0_ & ~0x00000008); localityPickingPolicyBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLocalityPickingPolicyFieldBuilder() : null; } else { localityPickingPolicyBuilder_.addAllMessages(other.localityPickingPolicy_); } } } if (endpointPickingPolicyBuilder_ == null) { if (!other.endpointPickingPolicy_.isEmpty()) { if (endpointPickingPolicy_.isEmpty()) { endpointPickingPolicy_ = other.endpointPickingPolicy_; bitField0_ = (bitField0_ & ~0x00000010); } else { ensureEndpointPickingPolicyIsMutable(); endpointPickingPolicy_.addAll(other.endpointPickingPolicy_); } onChanged(); } } else { if (!other.endpointPickingPolicy_.isEmpty()) { if (endpointPickingPolicyBuilder_.isEmpty()) { endpointPickingPolicyBuilder_.dispose(); endpointPickingPolicyBuilder_ = null; endpointPickingPolicy_ = other.endpointPickingPolicy_; bitField0_ = (bitField0_ & ~0x00000010); endpointPickingPolicyBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEndpointPickingPolicyFieldBuilder() : null; } else { endpointPickingPolicyBuilder_.addAllMessages(other.endpointPickingPolicy_); } } } 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: { edsServiceName_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 26: { input.readMessage( getLrsLoadReportingServerNameFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { io.grpc.serviceconfig.LoadBalancingConfig m = input.readMessage( io.grpc.serviceconfig.LoadBalancingConfig.parser(), extensionRegistry); if (localityPickingPolicyBuilder_ == null) { ensureLocalityPickingPolicyIsMutable(); localityPickingPolicy_.add(m); } else { localityPickingPolicyBuilder_.addMessage(m); } break; } // case 34 case 42: { io.grpc.serviceconfig.LoadBalancingConfig m = input.readMessage( io.grpc.serviceconfig.LoadBalancingConfig.parser(), extensionRegistry); if (endpointPickingPolicyBuilder_ == null) { ensureEndpointPickingPolicyIsMutable(); endpointPickingPolicy_.add(m); } else { endpointPickingPolicyBuilder_.addMessage(m); } break; } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object cluster_ = ""; /** *
     * Cluster name.  Required.
     * 
* * 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.  Required.
     * 
* * 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.  Required.
     * 
* * 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.  Required.
     * 
* * string cluster = 1; * @return This builder for chaining. */ public Builder clearCluster() { cluster_ = getDefaultInstance().getCluster(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
     * Cluster name.  Required.
     * 
* * 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 java.lang.Object edsServiceName_ = ""; /** *
     * EDS service name, as returned in CDS.
     * May be unset if not specified in CDS.
     * 
* * string eds_service_name = 2; * @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; } } /** *
     * EDS service name, as returned in CDS.
     * May be unset if not specified in CDS.
     * 
* * string eds_service_name = 2; * @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; } } /** *
     * EDS service name, as returned in CDS.
     * May be unset if not specified in CDS.
     * 
* * string eds_service_name = 2; * @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_ |= 0x00000002; onChanged(); return this; } /** *
     * EDS service name, as returned in CDS.
     * May be unset if not specified in CDS.
     * 
* * string eds_service_name = 2; * @return This builder for chaining. */ public Builder clearEdsServiceName() { edsServiceName_ = getDefaultInstance().getEdsServiceName(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
     * EDS service name, as returned in CDS.
     * May be unset if not specified in CDS.
     * 
* * string eds_service_name = 2; * @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_ |= 0x00000002; 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_; /** *
     * Server to send load reports to.
     * If unset, no load reporting is done.
     * If set to empty string, load reporting will be sent to the same
     * server as we are getting xds data from.
     * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 3; * @return Whether the lrsLoadReportingServerName field is set. */ public boolean hasLrsLoadReportingServerName() { return ((bitField0_ & 0x00000004) != 0); } /** *
     * Server to send load reports to.
     * If unset, no load reporting is done.
     * If set to empty string, load reporting will be sent to the same
     * server as we are getting xds data from.
     * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 3; * @return The lrsLoadReportingServerName. */ public com.google.protobuf.StringValue getLrsLoadReportingServerName() { if (lrsLoadReportingServerNameBuilder_ == null) { return lrsLoadReportingServerName_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : lrsLoadReportingServerName_; } else { return lrsLoadReportingServerNameBuilder_.getMessage(); } } /** *
     * Server to send load reports to.
     * If unset, no load reporting is done.
     * If set to empty string, load reporting will be sent to the same
     * server as we are getting xds data from.
     * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 3; */ public Builder setLrsLoadReportingServerName(com.google.protobuf.StringValue value) { if (lrsLoadReportingServerNameBuilder_ == null) { if (value == null) { throw new NullPointerException(); } lrsLoadReportingServerName_ = value; } else { lrsLoadReportingServerNameBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * Server to send load reports to.
     * If unset, no load reporting is done.
     * If set to empty string, load reporting will be sent to the same
     * server as we are getting xds data from.
     * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 3; */ public Builder setLrsLoadReportingServerName( com.google.protobuf.StringValue.Builder builderForValue) { if (lrsLoadReportingServerNameBuilder_ == null) { lrsLoadReportingServerName_ = builderForValue.build(); } else { lrsLoadReportingServerNameBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * Server to send load reports to.
     * If unset, no load reporting is done.
     * If set to empty string, load reporting will be sent to the same
     * server as we are getting xds data from.
     * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 3; */ public Builder mergeLrsLoadReportingServerName(com.google.protobuf.StringValue value) { if (lrsLoadReportingServerNameBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && lrsLoadReportingServerName_ != null && lrsLoadReportingServerName_ != com.google.protobuf.StringValue.getDefaultInstance()) { getLrsLoadReportingServerNameBuilder().mergeFrom(value); } else { lrsLoadReportingServerName_ = value; } } else { lrsLoadReportingServerNameBuilder_.mergeFrom(value); } if (lrsLoadReportingServerName_ != null) { bitField0_ |= 0x00000004; onChanged(); } return this; } /** *
     * Server to send load reports to.
     * If unset, no load reporting is done.
     * If set to empty string, load reporting will be sent to the same
     * server as we are getting xds data from.
     * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 3; */ public Builder clearLrsLoadReportingServerName() { bitField0_ = (bitField0_ & ~0x00000004); lrsLoadReportingServerName_ = null; if (lrsLoadReportingServerNameBuilder_ != null) { lrsLoadReportingServerNameBuilder_.dispose(); lrsLoadReportingServerNameBuilder_ = null; } onChanged(); return this; } /** *
     * Server to send load reports to.
     * If unset, no load reporting is done.
     * If set to empty string, load reporting will be sent to the same
     * server as we are getting xds data from.
     * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 3; */ public com.google.protobuf.StringValue.Builder getLrsLoadReportingServerNameBuilder() { bitField0_ |= 0x00000004; onChanged(); return getLrsLoadReportingServerNameFieldBuilder().getBuilder(); } /** *
     * Server to send load reports to.
     * If unset, no load reporting is done.
     * If set to empty string, load reporting will be sent to the same
     * server as we are getting xds data from.
     * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 3; */ public com.google.protobuf.StringValueOrBuilder getLrsLoadReportingServerNameOrBuilder() { if (lrsLoadReportingServerNameBuilder_ != null) { return lrsLoadReportingServerNameBuilder_.getMessageOrBuilder(); } else { return lrsLoadReportingServerName_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : lrsLoadReportingServerName_; } } /** *
     * Server to send load reports to.
     * If unset, no load reporting is done.
     * If set to empty string, load reporting will be sent to the same
     * server as we are getting xds data from.
     * 
* * .google.protobuf.StringValue lrs_load_reporting_server_name = 3; */ 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 java.util.List localityPickingPolicy_ = java.util.Collections.emptyList(); private void ensureLocalityPickingPolicyIsMutable() { if (!((bitField0_ & 0x00000008) != 0)) { localityPickingPolicy_ = new java.util.ArrayList(localityPickingPolicy_); bitField0_ |= 0x00000008; } } private com.google.protobuf.RepeatedFieldBuilderV3< io.grpc.serviceconfig.LoadBalancingConfig, io.grpc.serviceconfig.LoadBalancingConfig.Builder, io.grpc.serviceconfig.LoadBalancingConfigOrBuilder> localityPickingPolicyBuilder_; /** *
     * Locality-picking policy.
     * This policy's config is expected to be in the format used
     * by the weighted_target policy.  Note that the config should include
     * an empty value for the "targets" field; that empty value will be
     * replaced by one that is dynamically generated based on the EDS data.
     * Optional; defaults to "weighted_target".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig locality_picking_policy = 4; */ public java.util.List getLocalityPickingPolicyList() { if (localityPickingPolicyBuilder_ == null) { return java.util.Collections.unmodifiableList(localityPickingPolicy_); } else { return localityPickingPolicyBuilder_.getMessageList(); } } /** *
     * Locality-picking policy.
     * This policy's config is expected to be in the format used
     * by the weighted_target policy.  Note that the config should include
     * an empty value for the "targets" field; that empty value will be
     * replaced by one that is dynamically generated based on the EDS data.
     * Optional; defaults to "weighted_target".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig locality_picking_policy = 4; */ public int getLocalityPickingPolicyCount() { if (localityPickingPolicyBuilder_ == null) { return localityPickingPolicy_.size(); } else { return localityPickingPolicyBuilder_.getCount(); } } /** *
     * Locality-picking policy.
     * This policy's config is expected to be in the format used
     * by the weighted_target policy.  Note that the config should include
     * an empty value for the "targets" field; that empty value will be
     * replaced by one that is dynamically generated based on the EDS data.
     * Optional; defaults to "weighted_target".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig locality_picking_policy = 4; */ public io.grpc.serviceconfig.LoadBalancingConfig getLocalityPickingPolicy(int index) { if (localityPickingPolicyBuilder_ == null) { return localityPickingPolicy_.get(index); } else { return localityPickingPolicyBuilder_.getMessage(index); } } /** *
     * Locality-picking policy.
     * This policy's config is expected to be in the format used
     * by the weighted_target policy.  Note that the config should include
     * an empty value for the "targets" field; that empty value will be
     * replaced by one that is dynamically generated based on the EDS data.
     * Optional; defaults to "weighted_target".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig locality_picking_policy = 4; */ public Builder setLocalityPickingPolicy( int index, io.grpc.serviceconfig.LoadBalancingConfig value) { if (localityPickingPolicyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLocalityPickingPolicyIsMutable(); localityPickingPolicy_.set(index, value); onChanged(); } else { localityPickingPolicyBuilder_.setMessage(index, value); } return this; } /** *
     * Locality-picking policy.
     * This policy's config is expected to be in the format used
     * by the weighted_target policy.  Note that the config should include
     * an empty value for the "targets" field; that empty value will be
     * replaced by one that is dynamically generated based on the EDS data.
     * Optional; defaults to "weighted_target".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig locality_picking_policy = 4; */ public Builder setLocalityPickingPolicy( int index, io.grpc.serviceconfig.LoadBalancingConfig.Builder builderForValue) { if (localityPickingPolicyBuilder_ == null) { ensureLocalityPickingPolicyIsMutable(); localityPickingPolicy_.set(index, builderForValue.build()); onChanged(); } else { localityPickingPolicyBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * Locality-picking policy.
     * This policy's config is expected to be in the format used
     * by the weighted_target policy.  Note that the config should include
     * an empty value for the "targets" field; that empty value will be
     * replaced by one that is dynamically generated based on the EDS data.
     * Optional; defaults to "weighted_target".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig locality_picking_policy = 4; */ public Builder addLocalityPickingPolicy(io.grpc.serviceconfig.LoadBalancingConfig value) { if (localityPickingPolicyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLocalityPickingPolicyIsMutable(); localityPickingPolicy_.add(value); onChanged(); } else { localityPickingPolicyBuilder_.addMessage(value); } return this; } /** *
     * Locality-picking policy.
     * This policy's config is expected to be in the format used
     * by the weighted_target policy.  Note that the config should include
     * an empty value for the "targets" field; that empty value will be
     * replaced by one that is dynamically generated based on the EDS data.
     * Optional; defaults to "weighted_target".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig locality_picking_policy = 4; */ public Builder addLocalityPickingPolicy( int index, io.grpc.serviceconfig.LoadBalancingConfig value) { if (localityPickingPolicyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLocalityPickingPolicyIsMutable(); localityPickingPolicy_.add(index, value); onChanged(); } else { localityPickingPolicyBuilder_.addMessage(index, value); } return this; } /** *
     * Locality-picking policy.
     * This policy's config is expected to be in the format used
     * by the weighted_target policy.  Note that the config should include
     * an empty value for the "targets" field; that empty value will be
     * replaced by one that is dynamically generated based on the EDS data.
     * Optional; defaults to "weighted_target".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig locality_picking_policy = 4; */ public Builder addLocalityPickingPolicy( io.grpc.serviceconfig.LoadBalancingConfig.Builder builderForValue) { if (localityPickingPolicyBuilder_ == null) { ensureLocalityPickingPolicyIsMutable(); localityPickingPolicy_.add(builderForValue.build()); onChanged(); } else { localityPickingPolicyBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * Locality-picking policy.
     * This policy's config is expected to be in the format used
     * by the weighted_target policy.  Note that the config should include
     * an empty value for the "targets" field; that empty value will be
     * replaced by one that is dynamically generated based on the EDS data.
     * Optional; defaults to "weighted_target".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig locality_picking_policy = 4; */ public Builder addLocalityPickingPolicy( int index, io.grpc.serviceconfig.LoadBalancingConfig.Builder builderForValue) { if (localityPickingPolicyBuilder_ == null) { ensureLocalityPickingPolicyIsMutable(); localityPickingPolicy_.add(index, builderForValue.build()); onChanged(); } else { localityPickingPolicyBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * Locality-picking policy.
     * This policy's config is expected to be in the format used
     * by the weighted_target policy.  Note that the config should include
     * an empty value for the "targets" field; that empty value will be
     * replaced by one that is dynamically generated based on the EDS data.
     * Optional; defaults to "weighted_target".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig locality_picking_policy = 4; */ public Builder addAllLocalityPickingPolicy( java.lang.Iterable values) { if (localityPickingPolicyBuilder_ == null) { ensureLocalityPickingPolicyIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, localityPickingPolicy_); onChanged(); } else { localityPickingPolicyBuilder_.addAllMessages(values); } return this; } /** *
     * Locality-picking policy.
     * This policy's config is expected to be in the format used
     * by the weighted_target policy.  Note that the config should include
     * an empty value for the "targets" field; that empty value will be
     * replaced by one that is dynamically generated based on the EDS data.
     * Optional; defaults to "weighted_target".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig locality_picking_policy = 4; */ public Builder clearLocalityPickingPolicy() { if (localityPickingPolicyBuilder_ == null) { localityPickingPolicy_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { localityPickingPolicyBuilder_.clear(); } return this; } /** *
     * Locality-picking policy.
     * This policy's config is expected to be in the format used
     * by the weighted_target policy.  Note that the config should include
     * an empty value for the "targets" field; that empty value will be
     * replaced by one that is dynamically generated based on the EDS data.
     * Optional; defaults to "weighted_target".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig locality_picking_policy = 4; */ public Builder removeLocalityPickingPolicy(int index) { if (localityPickingPolicyBuilder_ == null) { ensureLocalityPickingPolicyIsMutable(); localityPickingPolicy_.remove(index); onChanged(); } else { localityPickingPolicyBuilder_.remove(index); } return this; } /** *
     * Locality-picking policy.
     * This policy's config is expected to be in the format used
     * by the weighted_target policy.  Note that the config should include
     * an empty value for the "targets" field; that empty value will be
     * replaced by one that is dynamically generated based on the EDS data.
     * Optional; defaults to "weighted_target".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig locality_picking_policy = 4; */ public io.grpc.serviceconfig.LoadBalancingConfig.Builder getLocalityPickingPolicyBuilder( int index) { return getLocalityPickingPolicyFieldBuilder().getBuilder(index); } /** *
     * Locality-picking policy.
     * This policy's config is expected to be in the format used
     * by the weighted_target policy.  Note that the config should include
     * an empty value for the "targets" field; that empty value will be
     * replaced by one that is dynamically generated based on the EDS data.
     * Optional; defaults to "weighted_target".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig locality_picking_policy = 4; */ public io.grpc.serviceconfig.LoadBalancingConfigOrBuilder getLocalityPickingPolicyOrBuilder( int index) { if (localityPickingPolicyBuilder_ == null) { return localityPickingPolicy_.get(index); } else { return localityPickingPolicyBuilder_.getMessageOrBuilder(index); } } /** *
     * Locality-picking policy.
     * This policy's config is expected to be in the format used
     * by the weighted_target policy.  Note that the config should include
     * an empty value for the "targets" field; that empty value will be
     * replaced by one that is dynamically generated based on the EDS data.
     * Optional; defaults to "weighted_target".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig locality_picking_policy = 4; */ public java.util.List getLocalityPickingPolicyOrBuilderList() { if (localityPickingPolicyBuilder_ != null) { return localityPickingPolicyBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(localityPickingPolicy_); } } /** *
     * Locality-picking policy.
     * This policy's config is expected to be in the format used
     * by the weighted_target policy.  Note that the config should include
     * an empty value for the "targets" field; that empty value will be
     * replaced by one that is dynamically generated based on the EDS data.
     * Optional; defaults to "weighted_target".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig locality_picking_policy = 4; */ public io.grpc.serviceconfig.LoadBalancingConfig.Builder addLocalityPickingPolicyBuilder() { return getLocalityPickingPolicyFieldBuilder().addBuilder( io.grpc.serviceconfig.LoadBalancingConfig.getDefaultInstance()); } /** *
     * Locality-picking policy.
     * This policy's config is expected to be in the format used
     * by the weighted_target policy.  Note that the config should include
     * an empty value for the "targets" field; that empty value will be
     * replaced by one that is dynamically generated based on the EDS data.
     * Optional; defaults to "weighted_target".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig locality_picking_policy = 4; */ public io.grpc.serviceconfig.LoadBalancingConfig.Builder addLocalityPickingPolicyBuilder( int index) { return getLocalityPickingPolicyFieldBuilder().addBuilder( index, io.grpc.serviceconfig.LoadBalancingConfig.getDefaultInstance()); } /** *
     * Locality-picking policy.
     * This policy's config is expected to be in the format used
     * by the weighted_target policy.  Note that the config should include
     * an empty value for the "targets" field; that empty value will be
     * replaced by one that is dynamically generated based on the EDS data.
     * Optional; defaults to "weighted_target".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig locality_picking_policy = 4; */ public java.util.List getLocalityPickingPolicyBuilderList() { return getLocalityPickingPolicyFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< io.grpc.serviceconfig.LoadBalancingConfig, io.grpc.serviceconfig.LoadBalancingConfig.Builder, io.grpc.serviceconfig.LoadBalancingConfigOrBuilder> getLocalityPickingPolicyFieldBuilder() { if (localityPickingPolicyBuilder_ == null) { localityPickingPolicyBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.grpc.serviceconfig.LoadBalancingConfig, io.grpc.serviceconfig.LoadBalancingConfig.Builder, io.grpc.serviceconfig.LoadBalancingConfigOrBuilder>( localityPickingPolicy_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); localityPickingPolicy_ = null; } return localityPickingPolicyBuilder_; } private java.util.List endpointPickingPolicy_ = java.util.Collections.emptyList(); private void ensureEndpointPickingPolicyIsMutable() { if (!((bitField0_ & 0x00000010) != 0)) { endpointPickingPolicy_ = new java.util.ArrayList(endpointPickingPolicy_); bitField0_ |= 0x00000010; } } private com.google.protobuf.RepeatedFieldBuilderV3< io.grpc.serviceconfig.LoadBalancingConfig, io.grpc.serviceconfig.LoadBalancingConfig.Builder, io.grpc.serviceconfig.LoadBalancingConfigOrBuilder> endpointPickingPolicyBuilder_; /** *
     * Endpoint-picking policy.
     * This will be configured as the policy for each child in the
     * locality-policy's config.
     * Optional; defaults to "round_robin".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig endpoint_picking_policy = 5; */ public java.util.List getEndpointPickingPolicyList() { if (endpointPickingPolicyBuilder_ == null) { return java.util.Collections.unmodifiableList(endpointPickingPolicy_); } else { return endpointPickingPolicyBuilder_.getMessageList(); } } /** *
     * Endpoint-picking policy.
     * This will be configured as the policy for each child in the
     * locality-policy's config.
     * Optional; defaults to "round_robin".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig endpoint_picking_policy = 5; */ public int getEndpointPickingPolicyCount() { if (endpointPickingPolicyBuilder_ == null) { return endpointPickingPolicy_.size(); } else { return endpointPickingPolicyBuilder_.getCount(); } } /** *
     * Endpoint-picking policy.
     * This will be configured as the policy for each child in the
     * locality-policy's config.
     * Optional; defaults to "round_robin".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig endpoint_picking_policy = 5; */ public io.grpc.serviceconfig.LoadBalancingConfig getEndpointPickingPolicy(int index) { if (endpointPickingPolicyBuilder_ == null) { return endpointPickingPolicy_.get(index); } else { return endpointPickingPolicyBuilder_.getMessage(index); } } /** *
     * Endpoint-picking policy.
     * This will be configured as the policy for each child in the
     * locality-policy's config.
     * Optional; defaults to "round_robin".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig endpoint_picking_policy = 5; */ public Builder setEndpointPickingPolicy( int index, io.grpc.serviceconfig.LoadBalancingConfig value) { if (endpointPickingPolicyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEndpointPickingPolicyIsMutable(); endpointPickingPolicy_.set(index, value); onChanged(); } else { endpointPickingPolicyBuilder_.setMessage(index, value); } return this; } /** *
     * Endpoint-picking policy.
     * This will be configured as the policy for each child in the
     * locality-policy's config.
     * Optional; defaults to "round_robin".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig endpoint_picking_policy = 5; */ public Builder setEndpointPickingPolicy( int index, io.grpc.serviceconfig.LoadBalancingConfig.Builder builderForValue) { if (endpointPickingPolicyBuilder_ == null) { ensureEndpointPickingPolicyIsMutable(); endpointPickingPolicy_.set(index, builderForValue.build()); onChanged(); } else { endpointPickingPolicyBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * Endpoint-picking policy.
     * This will be configured as the policy for each child in the
     * locality-policy's config.
     * Optional; defaults to "round_robin".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig endpoint_picking_policy = 5; */ public Builder addEndpointPickingPolicy(io.grpc.serviceconfig.LoadBalancingConfig value) { if (endpointPickingPolicyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEndpointPickingPolicyIsMutable(); endpointPickingPolicy_.add(value); onChanged(); } else { endpointPickingPolicyBuilder_.addMessage(value); } return this; } /** *
     * Endpoint-picking policy.
     * This will be configured as the policy for each child in the
     * locality-policy's config.
     * Optional; defaults to "round_robin".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig endpoint_picking_policy = 5; */ public Builder addEndpointPickingPolicy( int index, io.grpc.serviceconfig.LoadBalancingConfig value) { if (endpointPickingPolicyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEndpointPickingPolicyIsMutable(); endpointPickingPolicy_.add(index, value); onChanged(); } else { endpointPickingPolicyBuilder_.addMessage(index, value); } return this; } /** *
     * Endpoint-picking policy.
     * This will be configured as the policy for each child in the
     * locality-policy's config.
     * Optional; defaults to "round_robin".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig endpoint_picking_policy = 5; */ public Builder addEndpointPickingPolicy( io.grpc.serviceconfig.LoadBalancingConfig.Builder builderForValue) { if (endpointPickingPolicyBuilder_ == null) { ensureEndpointPickingPolicyIsMutable(); endpointPickingPolicy_.add(builderForValue.build()); onChanged(); } else { endpointPickingPolicyBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * Endpoint-picking policy.
     * This will be configured as the policy for each child in the
     * locality-policy's config.
     * Optional; defaults to "round_robin".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig endpoint_picking_policy = 5; */ public Builder addEndpointPickingPolicy( int index, io.grpc.serviceconfig.LoadBalancingConfig.Builder builderForValue) { if (endpointPickingPolicyBuilder_ == null) { ensureEndpointPickingPolicyIsMutable(); endpointPickingPolicy_.add(index, builderForValue.build()); onChanged(); } else { endpointPickingPolicyBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * Endpoint-picking policy.
     * This will be configured as the policy for each child in the
     * locality-policy's config.
     * Optional; defaults to "round_robin".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig endpoint_picking_policy = 5; */ public Builder addAllEndpointPickingPolicy( java.lang.Iterable values) { if (endpointPickingPolicyBuilder_ == null) { ensureEndpointPickingPolicyIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, endpointPickingPolicy_); onChanged(); } else { endpointPickingPolicyBuilder_.addAllMessages(values); } return this; } /** *
     * Endpoint-picking policy.
     * This will be configured as the policy for each child in the
     * locality-policy's config.
     * Optional; defaults to "round_robin".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig endpoint_picking_policy = 5; */ public Builder clearEndpointPickingPolicy() { if (endpointPickingPolicyBuilder_ == null) { endpointPickingPolicy_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { endpointPickingPolicyBuilder_.clear(); } return this; } /** *
     * Endpoint-picking policy.
     * This will be configured as the policy for each child in the
     * locality-policy's config.
     * Optional; defaults to "round_robin".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig endpoint_picking_policy = 5; */ public Builder removeEndpointPickingPolicy(int index) { if (endpointPickingPolicyBuilder_ == null) { ensureEndpointPickingPolicyIsMutable(); endpointPickingPolicy_.remove(index); onChanged(); } else { endpointPickingPolicyBuilder_.remove(index); } return this; } /** *
     * Endpoint-picking policy.
     * This will be configured as the policy for each child in the
     * locality-policy's config.
     * Optional; defaults to "round_robin".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig endpoint_picking_policy = 5; */ public io.grpc.serviceconfig.LoadBalancingConfig.Builder getEndpointPickingPolicyBuilder( int index) { return getEndpointPickingPolicyFieldBuilder().getBuilder(index); } /** *
     * Endpoint-picking policy.
     * This will be configured as the policy for each child in the
     * locality-policy's config.
     * Optional; defaults to "round_robin".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig endpoint_picking_policy = 5; */ public io.grpc.serviceconfig.LoadBalancingConfigOrBuilder getEndpointPickingPolicyOrBuilder( int index) { if (endpointPickingPolicyBuilder_ == null) { return endpointPickingPolicy_.get(index); } else { return endpointPickingPolicyBuilder_.getMessageOrBuilder(index); } } /** *
     * Endpoint-picking policy.
     * This will be configured as the policy for each child in the
     * locality-policy's config.
     * Optional; defaults to "round_robin".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig endpoint_picking_policy = 5; */ public java.util.List getEndpointPickingPolicyOrBuilderList() { if (endpointPickingPolicyBuilder_ != null) { return endpointPickingPolicyBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(endpointPickingPolicy_); } } /** *
     * Endpoint-picking policy.
     * This will be configured as the policy for each child in the
     * locality-policy's config.
     * Optional; defaults to "round_robin".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig endpoint_picking_policy = 5; */ public io.grpc.serviceconfig.LoadBalancingConfig.Builder addEndpointPickingPolicyBuilder() { return getEndpointPickingPolicyFieldBuilder().addBuilder( io.grpc.serviceconfig.LoadBalancingConfig.getDefaultInstance()); } /** *
     * Endpoint-picking policy.
     * This will be configured as the policy for each child in the
     * locality-policy's config.
     * Optional; defaults to "round_robin".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig endpoint_picking_policy = 5; */ public io.grpc.serviceconfig.LoadBalancingConfig.Builder addEndpointPickingPolicyBuilder( int index) { return getEndpointPickingPolicyFieldBuilder().addBuilder( index, io.grpc.serviceconfig.LoadBalancingConfig.getDefaultInstance()); } /** *
     * Endpoint-picking policy.
     * This will be configured as the policy for each child in the
     * locality-policy's config.
     * Optional; defaults to "round_robin".
     * 
* * repeated .grpc.service_config.LoadBalancingConfig endpoint_picking_policy = 5; */ public java.util.List getEndpointPickingPolicyBuilderList() { return getEndpointPickingPolicyFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< io.grpc.serviceconfig.LoadBalancingConfig, io.grpc.serviceconfig.LoadBalancingConfig.Builder, io.grpc.serviceconfig.LoadBalancingConfigOrBuilder> getEndpointPickingPolicyFieldBuilder() { if (endpointPickingPolicyBuilder_ == null) { endpointPickingPolicyBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.grpc.serviceconfig.LoadBalancingConfig, io.grpc.serviceconfig.LoadBalancingConfig.Builder, io.grpc.serviceconfig.LoadBalancingConfigOrBuilder>( endpointPickingPolicy_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); endpointPickingPolicy_ = null; } return endpointPickingPolicyBuilder_; } @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.EdsLoadBalancingPolicyConfig) } // @@protoc_insertion_point(class_scope:grpc.service_config.EdsLoadBalancingPolicyConfig) private static final io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig(); } public static io.grpc.serviceconfig.EdsLoadBalancingPolicyConfig getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public EdsLoadBalancingPolicyConfig 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.EdsLoadBalancingPolicyConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy