io.grpc.serviceconfig.ServiceConfig Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: service_config.proto
// Protobuf Java Version: 3.25.4
package io.grpc.serviceconfig;
/**
*
* A ServiceConfig represents information about a service but is not specific to
* any name resolver.
*
*
* Protobuf type {@code grpc.service_config.ServiceConfig}
*/
public final class ServiceConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.service_config.ServiceConfig)
ServiceConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use ServiceConfig.newBuilder() to construct.
private ServiceConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ServiceConfig() {
loadBalancingPolicy_ = 0;
loadBalancingConfig_ = java.util.Collections.emptyList();
methodConfig_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ServiceConfig();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_ServiceConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_ServiceConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grpc.serviceconfig.ServiceConfig.class, io.grpc.serviceconfig.ServiceConfig.Builder.class);
}
/**
*
* Load balancing policy.
*
* Note that load_balancing_policy is deprecated in favor of
* load_balancing_config; the former will be used only if the latter
* is unset.
*
* If no LB policy is configured here, then the default is pick_first.
* If the policy name is set via the client API, that value overrides
* the value specified here.
*
* If the deprecated load_balancing_policy field is used, note that if the
* resolver returns at least one balancer address (as opposed to backend
* addresses), gRPC will use grpclb (see
* https://github.com/grpc/grpc/blob/master/doc/load-balancing.md),
* regardless of what policy is configured here. However, if the resolver
* returns at least one backend address in addition to the balancer
* address(es), the client may fall back to the requested policy if it
* is unable to reach any of the grpclb load balancers.
*
*
* Protobuf enum {@code grpc.service_config.ServiceConfig.LoadBalancingPolicy}
*/
public enum LoadBalancingPolicy
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNSPECIFIED = 0;
*/
UNSPECIFIED(0),
/**
* ROUND_ROBIN = 1;
*/
ROUND_ROBIN(1),
UNRECOGNIZED(-1),
;
/**
* UNSPECIFIED = 0;
*/
public static final int UNSPECIFIED_VALUE = 0;
/**
* ROUND_ROBIN = 1;
*/
public static final int ROUND_ROBIN_VALUE = 1;
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 LoadBalancingPolicy 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 LoadBalancingPolicy forNumber(int value) {
switch (value) {
case 0: return UNSPECIFIED;
case 1: return ROUND_ROBIN;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
LoadBalancingPolicy> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public LoadBalancingPolicy findValueByNumber(int number) {
return LoadBalancingPolicy.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.ServiceConfig.getDescriptor().getEnumTypes().get(0);
}
private static final LoadBalancingPolicy[] VALUES = values();
public static LoadBalancingPolicy 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 LoadBalancingPolicy(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:grpc.service_config.ServiceConfig.LoadBalancingPolicy)
}
public interface RetryThrottlingPolicyOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.service_config.ServiceConfig.RetryThrottlingPolicy)
com.google.protobuf.MessageOrBuilder {
/**
*
* The number of tokens starts at max_tokens. The token_count will always be
* between 0 and max_tokens.
*
* This field is required and must be greater than zero.
*
*
* uint32 max_tokens = 1;
* @return The maxTokens.
*/
int getMaxTokens();
/**
*
* The amount of tokens to add on each successful RPC. Typically this will
* be some number between 0 and 1, e.g., 0.1.
*
* This field is required and must be greater than zero. Up to 3 decimal
* places are supported.
*
*
* float token_ratio = 2;
* @return The tokenRatio.
*/
float getTokenRatio();
}
/**
*
* If a RetryThrottlingPolicy is provided, gRPC will automatically throttle
* retry attempts and hedged RPCs when the client's ratio of failures to
* successes exceeds a threshold.
*
* For each server name, the gRPC client will maintain a token_count which is
* initially set to max_tokens. Every outgoing RPC (regardless of service or
* method invoked) will change token_count as follows:
*
* - Every failed RPC will decrement the token_count by 1.
* - Every successful RPC will increment the token_count by token_ratio.
*
* If token_count is less than or equal to max_tokens / 2, then RPCs will not
* be retried and hedged RPCs will not be sent.
*
*
* Protobuf type {@code grpc.service_config.ServiceConfig.RetryThrottlingPolicy}
*/
public static final class RetryThrottlingPolicy extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.service_config.ServiceConfig.RetryThrottlingPolicy)
RetryThrottlingPolicyOrBuilder {
private static final long serialVersionUID = 0L;
// Use RetryThrottlingPolicy.newBuilder() to construct.
private RetryThrottlingPolicy(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RetryThrottlingPolicy() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RetryThrottlingPolicy();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_ServiceConfig_RetryThrottlingPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_ServiceConfig_RetryThrottlingPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy.class, io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy.Builder.class);
}
public static final int MAX_TOKENS_FIELD_NUMBER = 1;
private int maxTokens_ = 0;
/**
*
* The number of tokens starts at max_tokens. The token_count will always be
* between 0 and max_tokens.
*
* This field is required and must be greater than zero.
*
*
* uint32 max_tokens = 1;
* @return The maxTokens.
*/
@java.lang.Override
public int getMaxTokens() {
return maxTokens_;
}
public static final int TOKEN_RATIO_FIELD_NUMBER = 2;
private float tokenRatio_ = 0F;
/**
*
* The amount of tokens to add on each successful RPC. Typically this will
* be some number between 0 and 1, e.g., 0.1.
*
* This field is required and must be greater than zero. Up to 3 decimal
* places are supported.
*
*
* float token_ratio = 2;
* @return The tokenRatio.
*/
@java.lang.Override
public float getTokenRatio() {
return tokenRatio_;
}
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 (maxTokens_ != 0) {
output.writeUInt32(1, maxTokens_);
}
if (java.lang.Float.floatToRawIntBits(tokenRatio_) != 0) {
output.writeFloat(2, tokenRatio_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (maxTokens_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(1, maxTokens_);
}
if (java.lang.Float.floatToRawIntBits(tokenRatio_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(2, tokenRatio_);
}
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.ServiceConfig.RetryThrottlingPolicy)) {
return super.equals(obj);
}
io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy other = (io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy) obj;
if (getMaxTokens()
!= other.getMaxTokens()) return false;
if (java.lang.Float.floatToIntBits(getTokenRatio())
!= java.lang.Float.floatToIntBits(
other.getTokenRatio())) 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) + MAX_TOKENS_FIELD_NUMBER;
hash = (53 * hash) + getMaxTokens();
hash = (37 * hash) + TOKEN_RATIO_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getTokenRatio());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy 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.ServiceConfig.RetryThrottlingPolicy parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy 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.ServiceConfig.RetryThrottlingPolicy parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy 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.ServiceConfig.RetryThrottlingPolicy parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy 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.ServiceConfig.RetryThrottlingPolicy parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy 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.ServiceConfig.RetryThrottlingPolicy 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;
}
/**
*
* If a RetryThrottlingPolicy is provided, gRPC will automatically throttle
* retry attempts and hedged RPCs when the client's ratio of failures to
* successes exceeds a threshold.
*
* For each server name, the gRPC client will maintain a token_count which is
* initially set to max_tokens. Every outgoing RPC (regardless of service or
* method invoked) will change token_count as follows:
*
* - Every failed RPC will decrement the token_count by 1.
* - Every successful RPC will increment the token_count by token_ratio.
*
* If token_count is less than or equal to max_tokens / 2, then RPCs will not
* be retried and hedged RPCs will not be sent.
*
*
* Protobuf type {@code grpc.service_config.ServiceConfig.RetryThrottlingPolicy}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:grpc.service_config.ServiceConfig.RetryThrottlingPolicy)
io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_ServiceConfig_RetryThrottlingPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_ServiceConfig_RetryThrottlingPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy.class, io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy.Builder.class);
}
// Construct using io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
maxTokens_ = 0;
tokenRatio_ = 0F;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_ServiceConfig_RetryThrottlingPolicy_descriptor;
}
@java.lang.Override
public io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy getDefaultInstanceForType() {
return io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy.getDefaultInstance();
}
@java.lang.Override
public io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy build() {
io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy buildPartial() {
io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy result = new io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.maxTokens_ = maxTokens_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.tokenRatio_ = tokenRatio_;
}
}
@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.ServiceConfig.RetryThrottlingPolicy) {
return mergeFrom((io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy other) {
if (other == io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy.getDefaultInstance()) return this;
if (other.getMaxTokens() != 0) {
setMaxTokens(other.getMaxTokens());
}
if (other.getTokenRatio() != 0F) {
setTokenRatio(other.getTokenRatio());
}
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 8: {
maxTokens_ = input.readUInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 21: {
tokenRatio_ = input.readFloat();
bitField0_ |= 0x00000002;
break;
} // case 21
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 int maxTokens_ ;
/**
*
* The number of tokens starts at max_tokens. The token_count will always be
* between 0 and max_tokens.
*
* This field is required and must be greater than zero.
*
*
* uint32 max_tokens = 1;
* @return The maxTokens.
*/
@java.lang.Override
public int getMaxTokens() {
return maxTokens_;
}
/**
*
* The number of tokens starts at max_tokens. The token_count will always be
* between 0 and max_tokens.
*
* This field is required and must be greater than zero.
*
*
* uint32 max_tokens = 1;
* @param value The maxTokens to set.
* @return This builder for chaining.
*/
public Builder setMaxTokens(int value) {
maxTokens_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The number of tokens starts at max_tokens. The token_count will always be
* between 0 and max_tokens.
*
* This field is required and must be greater than zero.
*
*
* uint32 max_tokens = 1;
* @return This builder for chaining.
*/
public Builder clearMaxTokens() {
bitField0_ = (bitField0_ & ~0x00000001);
maxTokens_ = 0;
onChanged();
return this;
}
private float tokenRatio_ ;
/**
*
* The amount of tokens to add on each successful RPC. Typically this will
* be some number between 0 and 1, e.g., 0.1.
*
* This field is required and must be greater than zero. Up to 3 decimal
* places are supported.
*
*
* float token_ratio = 2;
* @return The tokenRatio.
*/
@java.lang.Override
public float getTokenRatio() {
return tokenRatio_;
}
/**
*
* The amount of tokens to add on each successful RPC. Typically this will
* be some number between 0 and 1, e.g., 0.1.
*
* This field is required and must be greater than zero. Up to 3 decimal
* places are supported.
*
*
* float token_ratio = 2;
* @param value The tokenRatio to set.
* @return This builder for chaining.
*/
public Builder setTokenRatio(float value) {
tokenRatio_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The amount of tokens to add on each successful RPC. Typically this will
* be some number between 0 and 1, e.g., 0.1.
*
* This field is required and must be greater than zero. Up to 3 decimal
* places are supported.
*
*
* float token_ratio = 2;
* @return This builder for chaining.
*/
public Builder clearTokenRatio() {
bitField0_ = (bitField0_ & ~0x00000002);
tokenRatio_ = 0F;
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.ServiceConfig.RetryThrottlingPolicy)
}
// @@protoc_insertion_point(class_scope:grpc.service_config.ServiceConfig.RetryThrottlingPolicy)
private static final io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy();
}
public static io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RetryThrottlingPolicy 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.ServiceConfig.RetryThrottlingPolicy getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface HealthCheckConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.service_config.ServiceConfig.HealthCheckConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
* Service name to use in the health-checking request.
*
*
* .google.protobuf.StringValue service_name = 1;
* @return Whether the serviceName field is set.
*/
boolean hasServiceName();
/**
*
* Service name to use in the health-checking request.
*
*
* .google.protobuf.StringValue service_name = 1;
* @return The serviceName.
*/
com.google.protobuf.StringValue getServiceName();
/**
*
* Service name to use in the health-checking request.
*
*
* .google.protobuf.StringValue service_name = 1;
*/
com.google.protobuf.StringValueOrBuilder getServiceNameOrBuilder();
}
/**
* Protobuf type {@code grpc.service_config.ServiceConfig.HealthCheckConfig}
*/
public static final class HealthCheckConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.service_config.ServiceConfig.HealthCheckConfig)
HealthCheckConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use HealthCheckConfig.newBuilder() to construct.
private HealthCheckConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private HealthCheckConfig() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new HealthCheckConfig();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_ServiceConfig_HealthCheckConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_ServiceConfig_HealthCheckConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig.class, io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig.Builder.class);
}
private int bitField0_;
public static final int SERVICE_NAME_FIELD_NUMBER = 1;
private com.google.protobuf.StringValue serviceName_;
/**
*
* Service name to use in the health-checking request.
*
*
* .google.protobuf.StringValue service_name = 1;
* @return Whether the serviceName field is set.
*/
@java.lang.Override
public boolean hasServiceName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Service name to use in the health-checking request.
*
*
* .google.protobuf.StringValue service_name = 1;
* @return The serviceName.
*/
@java.lang.Override
public com.google.protobuf.StringValue getServiceName() {
return serviceName_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : serviceName_;
}
/**
*
* Service name to use in the health-checking request.
*
*
* .google.protobuf.StringValue service_name = 1;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getServiceNameOrBuilder() {
return serviceName_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : serviceName_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getServiceName());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getServiceName());
}
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.ServiceConfig.HealthCheckConfig)) {
return super.equals(obj);
}
io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig other = (io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig) obj;
if (hasServiceName() != other.hasServiceName()) return false;
if (hasServiceName()) {
if (!getServiceName()
.equals(other.getServiceName())) 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 (hasServiceName()) {
hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER;
hash = (53 * hash) + getServiceName().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig 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.ServiceConfig.HealthCheckConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig 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.ServiceConfig.HealthCheckConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig 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.ServiceConfig.HealthCheckConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig 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.ServiceConfig.HealthCheckConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig 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.ServiceConfig.HealthCheckConfig prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code grpc.service_config.ServiceConfig.HealthCheckConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:grpc.service_config.ServiceConfig.HealthCheckConfig)
io.grpc.serviceconfig.ServiceConfig.HealthCheckConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_ServiceConfig_HealthCheckConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_ServiceConfig_HealthCheckConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig.class, io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig.Builder.class);
}
// Construct using io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getServiceNameFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
serviceName_ = null;
if (serviceNameBuilder_ != null) {
serviceNameBuilder_.dispose();
serviceNameBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_ServiceConfig_HealthCheckConfig_descriptor;
}
@java.lang.Override
public io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig getDefaultInstanceForType() {
return io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig.getDefaultInstance();
}
@java.lang.Override
public io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig build() {
io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig buildPartial() {
io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig result = new io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.serviceName_ = serviceNameBuilder_ == null
? serviceName_
: serviceNameBuilder_.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.ServiceConfig.HealthCheckConfig) {
return mergeFrom((io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig other) {
if (other == io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig.getDefaultInstance()) return this;
if (other.hasServiceName()) {
mergeServiceName(other.getServiceName());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
input.readMessage(
getServiceNameFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.protobuf.StringValue serviceName_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> serviceNameBuilder_;
/**
*
* Service name to use in the health-checking request.
*
*
* .google.protobuf.StringValue service_name = 1;
* @return Whether the serviceName field is set.
*/
public boolean hasServiceName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Service name to use in the health-checking request.
*
*
* .google.protobuf.StringValue service_name = 1;
* @return The serviceName.
*/
public com.google.protobuf.StringValue getServiceName() {
if (serviceNameBuilder_ == null) {
return serviceName_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : serviceName_;
} else {
return serviceNameBuilder_.getMessage();
}
}
/**
*
* Service name to use in the health-checking request.
*
*
* .google.protobuf.StringValue service_name = 1;
*/
public Builder setServiceName(com.google.protobuf.StringValue value) {
if (serviceNameBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
serviceName_ = value;
} else {
serviceNameBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Service name to use in the health-checking request.
*
*
* .google.protobuf.StringValue service_name = 1;
*/
public Builder setServiceName(
com.google.protobuf.StringValue.Builder builderForValue) {
if (serviceNameBuilder_ == null) {
serviceName_ = builderForValue.build();
} else {
serviceNameBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Service name to use in the health-checking request.
*
*
* .google.protobuf.StringValue service_name = 1;
*/
public Builder mergeServiceName(com.google.protobuf.StringValue value) {
if (serviceNameBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
serviceName_ != null &&
serviceName_ != com.google.protobuf.StringValue.getDefaultInstance()) {
getServiceNameBuilder().mergeFrom(value);
} else {
serviceName_ = value;
}
} else {
serviceNameBuilder_.mergeFrom(value);
}
if (serviceName_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* Service name to use in the health-checking request.
*
*
* .google.protobuf.StringValue service_name = 1;
*/
public Builder clearServiceName() {
bitField0_ = (bitField0_ & ~0x00000001);
serviceName_ = null;
if (serviceNameBuilder_ != null) {
serviceNameBuilder_.dispose();
serviceNameBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Service name to use in the health-checking request.
*
*
* .google.protobuf.StringValue service_name = 1;
*/
public com.google.protobuf.StringValue.Builder getServiceNameBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getServiceNameFieldBuilder().getBuilder();
}
/**
*
* Service name to use in the health-checking request.
*
*
* .google.protobuf.StringValue service_name = 1;
*/
public com.google.protobuf.StringValueOrBuilder getServiceNameOrBuilder() {
if (serviceNameBuilder_ != null) {
return serviceNameBuilder_.getMessageOrBuilder();
} else {
return serviceName_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : serviceName_;
}
}
/**
*
* Service name to use in the health-checking request.
*
*
* .google.protobuf.StringValue service_name = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>
getServiceNameFieldBuilder() {
if (serviceNameBuilder_ == null) {
serviceNameBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>(
getServiceName(),
getParentForChildren(),
isClean());
serviceName_ = null;
}
return serviceNameBuilder_;
}
@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.ServiceConfig.HealthCheckConfig)
}
// @@protoc_insertion_point(class_scope:grpc.service_config.ServiceConfig.HealthCheckConfig)
private static final io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig();
}
public static io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public HealthCheckConfig 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.ServiceConfig.HealthCheckConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int LOAD_BALANCING_POLICY_FIELD_NUMBER = 1;
private int loadBalancingPolicy_ = 0;
/**
* .grpc.service_config.ServiceConfig.LoadBalancingPolicy load_balancing_policy = 1 [deprecated = true];
* @deprecated grpc.service_config.ServiceConfig.load_balancing_policy is deprecated.
* See service_config.proto;l=548
* @return The enum numeric value on the wire for loadBalancingPolicy.
*/
@java.lang.Override @java.lang.Deprecated public int getLoadBalancingPolicyValue() {
return loadBalancingPolicy_;
}
/**
* .grpc.service_config.ServiceConfig.LoadBalancingPolicy load_balancing_policy = 1 [deprecated = true];
* @deprecated grpc.service_config.ServiceConfig.load_balancing_policy is deprecated.
* See service_config.proto;l=548
* @return The loadBalancingPolicy.
*/
@java.lang.Override @java.lang.Deprecated public io.grpc.serviceconfig.ServiceConfig.LoadBalancingPolicy getLoadBalancingPolicy() {
io.grpc.serviceconfig.ServiceConfig.LoadBalancingPolicy result = io.grpc.serviceconfig.ServiceConfig.LoadBalancingPolicy.forNumber(loadBalancingPolicy_);
return result == null ? io.grpc.serviceconfig.ServiceConfig.LoadBalancingPolicy.UNRECOGNIZED : result;
}
public static final int LOAD_BALANCING_CONFIG_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private java.util.List loadBalancingConfig_;
/**
*
* Multiple LB policies can be specified; clients will iterate through
* the list in order and stop at the first policy that they support. If none
* are supported, the service config is considered invalid.
*
*
* repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;
*/
@java.lang.Override
public java.util.List getLoadBalancingConfigList() {
return loadBalancingConfig_;
}
/**
*
* Multiple LB policies can be specified; clients will iterate through
* the list in order and stop at the first policy that they support. If none
* are supported, the service config is considered invalid.
*
*
* repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;
*/
@java.lang.Override
public java.util.List extends io.grpc.serviceconfig.LoadBalancingConfigOrBuilder>
getLoadBalancingConfigOrBuilderList() {
return loadBalancingConfig_;
}
/**
*
* Multiple LB policies can be specified; clients will iterate through
* the list in order and stop at the first policy that they support. If none
* are supported, the service config is considered invalid.
*
*
* repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;
*/
@java.lang.Override
public int getLoadBalancingConfigCount() {
return loadBalancingConfig_.size();
}
/**
*
* Multiple LB policies can be specified; clients will iterate through
* the list in order and stop at the first policy that they support. If none
* are supported, the service config is considered invalid.
*
*
* repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;
*/
@java.lang.Override
public io.grpc.serviceconfig.LoadBalancingConfig getLoadBalancingConfig(int index) {
return loadBalancingConfig_.get(index);
}
/**
*
* Multiple LB policies can be specified; clients will iterate through
* the list in order and stop at the first policy that they support. If none
* are supported, the service config is considered invalid.
*
*
* repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;
*/
@java.lang.Override
public io.grpc.serviceconfig.LoadBalancingConfigOrBuilder getLoadBalancingConfigOrBuilder(
int index) {
return loadBalancingConfig_.get(index);
}
public static final int METHOD_CONFIG_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List methodConfig_;
/**
*
* Per-method configuration.
*
*
* repeated .grpc.service_config.MethodConfig method_config = 2;
*/
@java.lang.Override
public java.util.List getMethodConfigList() {
return methodConfig_;
}
/**
*
* Per-method configuration.
*
*
* repeated .grpc.service_config.MethodConfig method_config = 2;
*/
@java.lang.Override
public java.util.List extends io.grpc.serviceconfig.MethodConfigOrBuilder>
getMethodConfigOrBuilderList() {
return methodConfig_;
}
/**
*
* Per-method configuration.
*
*
* repeated .grpc.service_config.MethodConfig method_config = 2;
*/
@java.lang.Override
public int getMethodConfigCount() {
return methodConfig_.size();
}
/**
*
* Per-method configuration.
*
*
* repeated .grpc.service_config.MethodConfig method_config = 2;
*/
@java.lang.Override
public io.grpc.serviceconfig.MethodConfig getMethodConfig(int index) {
return methodConfig_.get(index);
}
/**
*
* Per-method configuration.
*
*
* repeated .grpc.service_config.MethodConfig method_config = 2;
*/
@java.lang.Override
public io.grpc.serviceconfig.MethodConfigOrBuilder getMethodConfigOrBuilder(
int index) {
return methodConfig_.get(index);
}
public static final int RETRY_THROTTLING_FIELD_NUMBER = 3;
private io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy retryThrottling_;
/**
* .grpc.service_config.ServiceConfig.RetryThrottlingPolicy retry_throttling = 3;
* @return Whether the retryThrottling field is set.
*/
@java.lang.Override
public boolean hasRetryThrottling() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* .grpc.service_config.ServiceConfig.RetryThrottlingPolicy retry_throttling = 3;
* @return The retryThrottling.
*/
@java.lang.Override
public io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy getRetryThrottling() {
return retryThrottling_ == null ? io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy.getDefaultInstance() : retryThrottling_;
}
/**
* .grpc.service_config.ServiceConfig.RetryThrottlingPolicy retry_throttling = 3;
*/
@java.lang.Override
public io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicyOrBuilder getRetryThrottlingOrBuilder() {
return retryThrottling_ == null ? io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy.getDefaultInstance() : retryThrottling_;
}
public static final int HEALTH_CHECK_CONFIG_FIELD_NUMBER = 5;
private io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig healthCheckConfig_;
/**
* .grpc.service_config.ServiceConfig.HealthCheckConfig health_check_config = 5;
* @return Whether the healthCheckConfig field is set.
*/
@java.lang.Override
public boolean hasHealthCheckConfig() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* .grpc.service_config.ServiceConfig.HealthCheckConfig health_check_config = 5;
* @return The healthCheckConfig.
*/
@java.lang.Override
public io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig getHealthCheckConfig() {
return healthCheckConfig_ == null ? io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig.getDefaultInstance() : healthCheckConfig_;
}
/**
* .grpc.service_config.ServiceConfig.HealthCheckConfig health_check_config = 5;
*/
@java.lang.Override
public io.grpc.serviceconfig.ServiceConfig.HealthCheckConfigOrBuilder getHealthCheckConfigOrBuilder() {
return healthCheckConfig_ == null ? io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig.getDefaultInstance() : healthCheckConfig_;
}
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 (loadBalancingPolicy_ != io.grpc.serviceconfig.ServiceConfig.LoadBalancingPolicy.UNSPECIFIED.getNumber()) {
output.writeEnum(1, loadBalancingPolicy_);
}
for (int i = 0; i < methodConfig_.size(); i++) {
output.writeMessage(2, methodConfig_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(3, getRetryThrottling());
}
for (int i = 0; i < loadBalancingConfig_.size(); i++) {
output.writeMessage(4, loadBalancingConfig_.get(i));
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(5, getHealthCheckConfig());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (loadBalancingPolicy_ != io.grpc.serviceconfig.ServiceConfig.LoadBalancingPolicy.UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, loadBalancingPolicy_);
}
for (int i = 0; i < methodConfig_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, methodConfig_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getRetryThrottling());
}
for (int i = 0; i < loadBalancingConfig_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, loadBalancingConfig_.get(i));
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getHealthCheckConfig());
}
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.ServiceConfig)) {
return super.equals(obj);
}
io.grpc.serviceconfig.ServiceConfig other = (io.grpc.serviceconfig.ServiceConfig) obj;
if (loadBalancingPolicy_ != other.loadBalancingPolicy_) return false;
if (!getLoadBalancingConfigList()
.equals(other.getLoadBalancingConfigList())) return false;
if (!getMethodConfigList()
.equals(other.getMethodConfigList())) return false;
if (hasRetryThrottling() != other.hasRetryThrottling()) return false;
if (hasRetryThrottling()) {
if (!getRetryThrottling()
.equals(other.getRetryThrottling())) return false;
}
if (hasHealthCheckConfig() != other.hasHealthCheckConfig()) return false;
if (hasHealthCheckConfig()) {
if (!getHealthCheckConfig()
.equals(other.getHealthCheckConfig())) 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) + LOAD_BALANCING_POLICY_FIELD_NUMBER;
hash = (53 * hash) + loadBalancingPolicy_;
if (getLoadBalancingConfigCount() > 0) {
hash = (37 * hash) + LOAD_BALANCING_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getLoadBalancingConfigList().hashCode();
}
if (getMethodConfigCount() > 0) {
hash = (37 * hash) + METHOD_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getMethodConfigList().hashCode();
}
if (hasRetryThrottling()) {
hash = (37 * hash) + RETRY_THROTTLING_FIELD_NUMBER;
hash = (53 * hash) + getRetryThrottling().hashCode();
}
if (hasHealthCheckConfig()) {
hash = (37 * hash) + HEALTH_CHECK_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getHealthCheckConfig().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.grpc.serviceconfig.ServiceConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.serviceconfig.ServiceConfig 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.ServiceConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.serviceconfig.ServiceConfig 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.ServiceConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grpc.serviceconfig.ServiceConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grpc.serviceconfig.ServiceConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.grpc.serviceconfig.ServiceConfig 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.ServiceConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.grpc.serviceconfig.ServiceConfig 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.ServiceConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.grpc.serviceconfig.ServiceConfig 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.ServiceConfig prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* A ServiceConfig represents information about a service but is not specific to
* any name resolver.
*
*
* Protobuf type {@code grpc.service_config.ServiceConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:grpc.service_config.ServiceConfig)
io.grpc.serviceconfig.ServiceConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_ServiceConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_ServiceConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grpc.serviceconfig.ServiceConfig.class, io.grpc.serviceconfig.ServiceConfig.Builder.class);
}
// Construct using io.grpc.serviceconfig.ServiceConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getLoadBalancingConfigFieldBuilder();
getMethodConfigFieldBuilder();
getRetryThrottlingFieldBuilder();
getHealthCheckConfigFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
loadBalancingPolicy_ = 0;
if (loadBalancingConfigBuilder_ == null) {
loadBalancingConfig_ = java.util.Collections.emptyList();
} else {
loadBalancingConfig_ = null;
loadBalancingConfigBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
if (methodConfigBuilder_ == null) {
methodConfig_ = java.util.Collections.emptyList();
} else {
methodConfig_ = null;
methodConfigBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
retryThrottling_ = null;
if (retryThrottlingBuilder_ != null) {
retryThrottlingBuilder_.dispose();
retryThrottlingBuilder_ = null;
}
healthCheckConfig_ = null;
if (healthCheckConfigBuilder_ != null) {
healthCheckConfigBuilder_.dispose();
healthCheckConfigBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.grpc.serviceconfig.ServiceConfigProto.internal_static_grpc_service_config_ServiceConfig_descriptor;
}
@java.lang.Override
public io.grpc.serviceconfig.ServiceConfig getDefaultInstanceForType() {
return io.grpc.serviceconfig.ServiceConfig.getDefaultInstance();
}
@java.lang.Override
public io.grpc.serviceconfig.ServiceConfig build() {
io.grpc.serviceconfig.ServiceConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.grpc.serviceconfig.ServiceConfig buildPartial() {
io.grpc.serviceconfig.ServiceConfig result = new io.grpc.serviceconfig.ServiceConfig(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(io.grpc.serviceconfig.ServiceConfig result) {
if (loadBalancingConfigBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
loadBalancingConfig_ = java.util.Collections.unmodifiableList(loadBalancingConfig_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.loadBalancingConfig_ = loadBalancingConfig_;
} else {
result.loadBalancingConfig_ = loadBalancingConfigBuilder_.build();
}
if (methodConfigBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
methodConfig_ = java.util.Collections.unmodifiableList(methodConfig_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.methodConfig_ = methodConfig_;
} else {
result.methodConfig_ = methodConfigBuilder_.build();
}
}
private void buildPartial0(io.grpc.serviceconfig.ServiceConfig result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.loadBalancingPolicy_ = loadBalancingPolicy_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000008) != 0)) {
result.retryThrottling_ = retryThrottlingBuilder_ == null
? retryThrottling_
: retryThrottlingBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.healthCheckConfig_ = healthCheckConfigBuilder_ == null
? healthCheckConfig_
: healthCheckConfigBuilder_.build();
to_bitField0_ |= 0x00000002;
}
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.ServiceConfig) {
return mergeFrom((io.grpc.serviceconfig.ServiceConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.grpc.serviceconfig.ServiceConfig other) {
if (other == io.grpc.serviceconfig.ServiceConfig.getDefaultInstance()) return this;
if (other.loadBalancingPolicy_ != 0) {
setLoadBalancingPolicyValue(other.getLoadBalancingPolicyValue());
}
if (loadBalancingConfigBuilder_ == null) {
if (!other.loadBalancingConfig_.isEmpty()) {
if (loadBalancingConfig_.isEmpty()) {
loadBalancingConfig_ = other.loadBalancingConfig_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureLoadBalancingConfigIsMutable();
loadBalancingConfig_.addAll(other.loadBalancingConfig_);
}
onChanged();
}
} else {
if (!other.loadBalancingConfig_.isEmpty()) {
if (loadBalancingConfigBuilder_.isEmpty()) {
loadBalancingConfigBuilder_.dispose();
loadBalancingConfigBuilder_ = null;
loadBalancingConfig_ = other.loadBalancingConfig_;
bitField0_ = (bitField0_ & ~0x00000002);
loadBalancingConfigBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getLoadBalancingConfigFieldBuilder() : null;
} else {
loadBalancingConfigBuilder_.addAllMessages(other.loadBalancingConfig_);
}
}
}
if (methodConfigBuilder_ == null) {
if (!other.methodConfig_.isEmpty()) {
if (methodConfig_.isEmpty()) {
methodConfig_ = other.methodConfig_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureMethodConfigIsMutable();
methodConfig_.addAll(other.methodConfig_);
}
onChanged();
}
} else {
if (!other.methodConfig_.isEmpty()) {
if (methodConfigBuilder_.isEmpty()) {
methodConfigBuilder_.dispose();
methodConfigBuilder_ = null;
methodConfig_ = other.methodConfig_;
bitField0_ = (bitField0_ & ~0x00000004);
methodConfigBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getMethodConfigFieldBuilder() : null;
} else {
methodConfigBuilder_.addAllMessages(other.methodConfig_);
}
}
}
if (other.hasRetryThrottling()) {
mergeRetryThrottling(other.getRetryThrottling());
}
if (other.hasHealthCheckConfig()) {
mergeHealthCheckConfig(other.getHealthCheckConfig());
}
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 8: {
loadBalancingPolicy_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
io.grpc.serviceconfig.MethodConfig m =
input.readMessage(
io.grpc.serviceconfig.MethodConfig.parser(),
extensionRegistry);
if (methodConfigBuilder_ == null) {
ensureMethodConfigIsMutable();
methodConfig_.add(m);
} else {
methodConfigBuilder_.addMessage(m);
}
break;
} // case 18
case 26: {
input.readMessage(
getRetryThrottlingFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 26
case 34: {
io.grpc.serviceconfig.LoadBalancingConfig m =
input.readMessage(
io.grpc.serviceconfig.LoadBalancingConfig.parser(),
extensionRegistry);
if (loadBalancingConfigBuilder_ == null) {
ensureLoadBalancingConfigIsMutable();
loadBalancingConfig_.add(m);
} else {
loadBalancingConfigBuilder_.addMessage(m);
}
break;
} // case 34
case 42: {
input.readMessage(
getHealthCheckConfigFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 42
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int loadBalancingPolicy_ = 0;
/**
* .grpc.service_config.ServiceConfig.LoadBalancingPolicy load_balancing_policy = 1 [deprecated = true];
* @deprecated grpc.service_config.ServiceConfig.load_balancing_policy is deprecated.
* See service_config.proto;l=548
* @return The enum numeric value on the wire for loadBalancingPolicy.
*/
@java.lang.Override @java.lang.Deprecated public int getLoadBalancingPolicyValue() {
return loadBalancingPolicy_;
}
/**
* .grpc.service_config.ServiceConfig.LoadBalancingPolicy load_balancing_policy = 1 [deprecated = true];
* @deprecated grpc.service_config.ServiceConfig.load_balancing_policy is deprecated.
* See service_config.proto;l=548
* @param value The enum numeric value on the wire for loadBalancingPolicy to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setLoadBalancingPolicyValue(int value) {
loadBalancingPolicy_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .grpc.service_config.ServiceConfig.LoadBalancingPolicy load_balancing_policy = 1 [deprecated = true];
* @deprecated grpc.service_config.ServiceConfig.load_balancing_policy is deprecated.
* See service_config.proto;l=548
* @return The loadBalancingPolicy.
*/
@java.lang.Override
@java.lang.Deprecated public io.grpc.serviceconfig.ServiceConfig.LoadBalancingPolicy getLoadBalancingPolicy() {
io.grpc.serviceconfig.ServiceConfig.LoadBalancingPolicy result = io.grpc.serviceconfig.ServiceConfig.LoadBalancingPolicy.forNumber(loadBalancingPolicy_);
return result == null ? io.grpc.serviceconfig.ServiceConfig.LoadBalancingPolicy.UNRECOGNIZED : result;
}
/**
* .grpc.service_config.ServiceConfig.LoadBalancingPolicy load_balancing_policy = 1 [deprecated = true];
* @deprecated grpc.service_config.ServiceConfig.load_balancing_policy is deprecated.
* See service_config.proto;l=548
* @param value The loadBalancingPolicy to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setLoadBalancingPolicy(io.grpc.serviceconfig.ServiceConfig.LoadBalancingPolicy value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
loadBalancingPolicy_ = value.getNumber();
onChanged();
return this;
}
/**
* .grpc.service_config.ServiceConfig.LoadBalancingPolicy load_balancing_policy = 1 [deprecated = true];
* @deprecated grpc.service_config.ServiceConfig.load_balancing_policy is deprecated.
* See service_config.proto;l=548
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder clearLoadBalancingPolicy() {
bitField0_ = (bitField0_ & ~0x00000001);
loadBalancingPolicy_ = 0;
onChanged();
return this;
}
private java.util.List loadBalancingConfig_ =
java.util.Collections.emptyList();
private void ensureLoadBalancingConfigIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
loadBalancingConfig_ = new java.util.ArrayList(loadBalancingConfig_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.grpc.serviceconfig.LoadBalancingConfig, io.grpc.serviceconfig.LoadBalancingConfig.Builder, io.grpc.serviceconfig.LoadBalancingConfigOrBuilder> loadBalancingConfigBuilder_;
/**
*
* Multiple LB policies can be specified; clients will iterate through
* the list in order and stop at the first policy that they support. If none
* are supported, the service config is considered invalid.
*
*
* repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;
*/
public java.util.List getLoadBalancingConfigList() {
if (loadBalancingConfigBuilder_ == null) {
return java.util.Collections.unmodifiableList(loadBalancingConfig_);
} else {
return loadBalancingConfigBuilder_.getMessageList();
}
}
/**
*
* Multiple LB policies can be specified; clients will iterate through
* the list in order and stop at the first policy that they support. If none
* are supported, the service config is considered invalid.
*
*
* repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;
*/
public int getLoadBalancingConfigCount() {
if (loadBalancingConfigBuilder_ == null) {
return loadBalancingConfig_.size();
} else {
return loadBalancingConfigBuilder_.getCount();
}
}
/**
*
* Multiple LB policies can be specified; clients will iterate through
* the list in order and stop at the first policy that they support. If none
* are supported, the service config is considered invalid.
*
*
* repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;
*/
public io.grpc.serviceconfig.LoadBalancingConfig getLoadBalancingConfig(int index) {
if (loadBalancingConfigBuilder_ == null) {
return loadBalancingConfig_.get(index);
} else {
return loadBalancingConfigBuilder_.getMessage(index);
}
}
/**
*
* Multiple LB policies can be specified; clients will iterate through
* the list in order and stop at the first policy that they support. If none
* are supported, the service config is considered invalid.
*
*
* repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;
*/
public Builder setLoadBalancingConfig(
int index, io.grpc.serviceconfig.LoadBalancingConfig value) {
if (loadBalancingConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLoadBalancingConfigIsMutable();
loadBalancingConfig_.set(index, value);
onChanged();
} else {
loadBalancingConfigBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Multiple LB policies can be specified; clients will iterate through
* the list in order and stop at the first policy that they support. If none
* are supported, the service config is considered invalid.
*
*
* repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;
*/
public Builder setLoadBalancingConfig(
int index, io.grpc.serviceconfig.LoadBalancingConfig.Builder builderForValue) {
if (loadBalancingConfigBuilder_ == null) {
ensureLoadBalancingConfigIsMutable();
loadBalancingConfig_.set(index, builderForValue.build());
onChanged();
} else {
loadBalancingConfigBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Multiple LB policies can be specified; clients will iterate through
* the list in order and stop at the first policy that they support. If none
* are supported, the service config is considered invalid.
*
*
* repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;
*/
public Builder addLoadBalancingConfig(io.grpc.serviceconfig.LoadBalancingConfig value) {
if (loadBalancingConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLoadBalancingConfigIsMutable();
loadBalancingConfig_.add(value);
onChanged();
} else {
loadBalancingConfigBuilder_.addMessage(value);
}
return this;
}
/**
*
* Multiple LB policies can be specified; clients will iterate through
* the list in order and stop at the first policy that they support. If none
* are supported, the service config is considered invalid.
*
*
* repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;
*/
public Builder addLoadBalancingConfig(
int index, io.grpc.serviceconfig.LoadBalancingConfig value) {
if (loadBalancingConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLoadBalancingConfigIsMutable();
loadBalancingConfig_.add(index, value);
onChanged();
} else {
loadBalancingConfigBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Multiple LB policies can be specified; clients will iterate through
* the list in order and stop at the first policy that they support. If none
* are supported, the service config is considered invalid.
*
*
* repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;
*/
public Builder addLoadBalancingConfig(
io.grpc.serviceconfig.LoadBalancingConfig.Builder builderForValue) {
if (loadBalancingConfigBuilder_ == null) {
ensureLoadBalancingConfigIsMutable();
loadBalancingConfig_.add(builderForValue.build());
onChanged();
} else {
loadBalancingConfigBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Multiple LB policies can be specified; clients will iterate through
* the list in order and stop at the first policy that they support. If none
* are supported, the service config is considered invalid.
*
*
* repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;
*/
public Builder addLoadBalancingConfig(
int index, io.grpc.serviceconfig.LoadBalancingConfig.Builder builderForValue) {
if (loadBalancingConfigBuilder_ == null) {
ensureLoadBalancingConfigIsMutable();
loadBalancingConfig_.add(index, builderForValue.build());
onChanged();
} else {
loadBalancingConfigBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Multiple LB policies can be specified; clients will iterate through
* the list in order and stop at the first policy that they support. If none
* are supported, the service config is considered invalid.
*
*
* repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;
*/
public Builder addAllLoadBalancingConfig(
java.lang.Iterable extends io.grpc.serviceconfig.LoadBalancingConfig> values) {
if (loadBalancingConfigBuilder_ == null) {
ensureLoadBalancingConfigIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, loadBalancingConfig_);
onChanged();
} else {
loadBalancingConfigBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Multiple LB policies can be specified; clients will iterate through
* the list in order and stop at the first policy that they support. If none
* are supported, the service config is considered invalid.
*
*
* repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;
*/
public Builder clearLoadBalancingConfig() {
if (loadBalancingConfigBuilder_ == null) {
loadBalancingConfig_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
loadBalancingConfigBuilder_.clear();
}
return this;
}
/**
*
* Multiple LB policies can be specified; clients will iterate through
* the list in order and stop at the first policy that they support. If none
* are supported, the service config is considered invalid.
*
*
* repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;
*/
public Builder removeLoadBalancingConfig(int index) {
if (loadBalancingConfigBuilder_ == null) {
ensureLoadBalancingConfigIsMutable();
loadBalancingConfig_.remove(index);
onChanged();
} else {
loadBalancingConfigBuilder_.remove(index);
}
return this;
}
/**
*
* Multiple LB policies can be specified; clients will iterate through
* the list in order and stop at the first policy that they support. If none
* are supported, the service config is considered invalid.
*
*
* repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;
*/
public io.grpc.serviceconfig.LoadBalancingConfig.Builder getLoadBalancingConfigBuilder(
int index) {
return getLoadBalancingConfigFieldBuilder().getBuilder(index);
}
/**
*
* Multiple LB policies can be specified; clients will iterate through
* the list in order and stop at the first policy that they support. If none
* are supported, the service config is considered invalid.
*
*
* repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;
*/
public io.grpc.serviceconfig.LoadBalancingConfigOrBuilder getLoadBalancingConfigOrBuilder(
int index) {
if (loadBalancingConfigBuilder_ == null) {
return loadBalancingConfig_.get(index); } else {
return loadBalancingConfigBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Multiple LB policies can be specified; clients will iterate through
* the list in order and stop at the first policy that they support. If none
* are supported, the service config is considered invalid.
*
*
* repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;
*/
public java.util.List extends io.grpc.serviceconfig.LoadBalancingConfigOrBuilder>
getLoadBalancingConfigOrBuilderList() {
if (loadBalancingConfigBuilder_ != null) {
return loadBalancingConfigBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(loadBalancingConfig_);
}
}
/**
*
* Multiple LB policies can be specified; clients will iterate through
* the list in order and stop at the first policy that they support. If none
* are supported, the service config is considered invalid.
*
*
* repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;
*/
public io.grpc.serviceconfig.LoadBalancingConfig.Builder addLoadBalancingConfigBuilder() {
return getLoadBalancingConfigFieldBuilder().addBuilder(
io.grpc.serviceconfig.LoadBalancingConfig.getDefaultInstance());
}
/**
*
* Multiple LB policies can be specified; clients will iterate through
* the list in order and stop at the first policy that they support. If none
* are supported, the service config is considered invalid.
*
*
* repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;
*/
public io.grpc.serviceconfig.LoadBalancingConfig.Builder addLoadBalancingConfigBuilder(
int index) {
return getLoadBalancingConfigFieldBuilder().addBuilder(
index, io.grpc.serviceconfig.LoadBalancingConfig.getDefaultInstance());
}
/**
*
* Multiple LB policies can be specified; clients will iterate through
* the list in order and stop at the first policy that they support. If none
* are supported, the service config is considered invalid.
*
*
* repeated .grpc.service_config.LoadBalancingConfig load_balancing_config = 4;
*/
public java.util.List
getLoadBalancingConfigBuilderList() {
return getLoadBalancingConfigFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.grpc.serviceconfig.LoadBalancingConfig, io.grpc.serviceconfig.LoadBalancingConfig.Builder, io.grpc.serviceconfig.LoadBalancingConfigOrBuilder>
getLoadBalancingConfigFieldBuilder() {
if (loadBalancingConfigBuilder_ == null) {
loadBalancingConfigBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.grpc.serviceconfig.LoadBalancingConfig, io.grpc.serviceconfig.LoadBalancingConfig.Builder, io.grpc.serviceconfig.LoadBalancingConfigOrBuilder>(
loadBalancingConfig_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
loadBalancingConfig_ = null;
}
return loadBalancingConfigBuilder_;
}
private java.util.List methodConfig_ =
java.util.Collections.emptyList();
private void ensureMethodConfigIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
methodConfig_ = new java.util.ArrayList(methodConfig_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.grpc.serviceconfig.MethodConfig, io.grpc.serviceconfig.MethodConfig.Builder, io.grpc.serviceconfig.MethodConfigOrBuilder> methodConfigBuilder_;
/**
*
* Per-method configuration.
*
*
* repeated .grpc.service_config.MethodConfig method_config = 2;
*/
public java.util.List getMethodConfigList() {
if (methodConfigBuilder_ == null) {
return java.util.Collections.unmodifiableList(methodConfig_);
} else {
return methodConfigBuilder_.getMessageList();
}
}
/**
*
* Per-method configuration.
*
*
* repeated .grpc.service_config.MethodConfig method_config = 2;
*/
public int getMethodConfigCount() {
if (methodConfigBuilder_ == null) {
return methodConfig_.size();
} else {
return methodConfigBuilder_.getCount();
}
}
/**
*
* Per-method configuration.
*
*
* repeated .grpc.service_config.MethodConfig method_config = 2;
*/
public io.grpc.serviceconfig.MethodConfig getMethodConfig(int index) {
if (methodConfigBuilder_ == null) {
return methodConfig_.get(index);
} else {
return methodConfigBuilder_.getMessage(index);
}
}
/**
*
* Per-method configuration.
*
*
* repeated .grpc.service_config.MethodConfig method_config = 2;
*/
public Builder setMethodConfig(
int index, io.grpc.serviceconfig.MethodConfig value) {
if (methodConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMethodConfigIsMutable();
methodConfig_.set(index, value);
onChanged();
} else {
methodConfigBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Per-method configuration.
*
*
* repeated .grpc.service_config.MethodConfig method_config = 2;
*/
public Builder setMethodConfig(
int index, io.grpc.serviceconfig.MethodConfig.Builder builderForValue) {
if (methodConfigBuilder_ == null) {
ensureMethodConfigIsMutable();
methodConfig_.set(index, builderForValue.build());
onChanged();
} else {
methodConfigBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Per-method configuration.
*
*
* repeated .grpc.service_config.MethodConfig method_config = 2;
*/
public Builder addMethodConfig(io.grpc.serviceconfig.MethodConfig value) {
if (methodConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMethodConfigIsMutable();
methodConfig_.add(value);
onChanged();
} else {
methodConfigBuilder_.addMessage(value);
}
return this;
}
/**
*
* Per-method configuration.
*
*
* repeated .grpc.service_config.MethodConfig method_config = 2;
*/
public Builder addMethodConfig(
int index, io.grpc.serviceconfig.MethodConfig value) {
if (methodConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMethodConfigIsMutable();
methodConfig_.add(index, value);
onChanged();
} else {
methodConfigBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Per-method configuration.
*
*
* repeated .grpc.service_config.MethodConfig method_config = 2;
*/
public Builder addMethodConfig(
io.grpc.serviceconfig.MethodConfig.Builder builderForValue) {
if (methodConfigBuilder_ == null) {
ensureMethodConfigIsMutable();
methodConfig_.add(builderForValue.build());
onChanged();
} else {
methodConfigBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Per-method configuration.
*
*
* repeated .grpc.service_config.MethodConfig method_config = 2;
*/
public Builder addMethodConfig(
int index, io.grpc.serviceconfig.MethodConfig.Builder builderForValue) {
if (methodConfigBuilder_ == null) {
ensureMethodConfigIsMutable();
methodConfig_.add(index, builderForValue.build());
onChanged();
} else {
methodConfigBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Per-method configuration.
*
*
* repeated .grpc.service_config.MethodConfig method_config = 2;
*/
public Builder addAllMethodConfig(
java.lang.Iterable extends io.grpc.serviceconfig.MethodConfig> values) {
if (methodConfigBuilder_ == null) {
ensureMethodConfigIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, methodConfig_);
onChanged();
} else {
methodConfigBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Per-method configuration.
*
*
* repeated .grpc.service_config.MethodConfig method_config = 2;
*/
public Builder clearMethodConfig() {
if (methodConfigBuilder_ == null) {
methodConfig_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
methodConfigBuilder_.clear();
}
return this;
}
/**
*
* Per-method configuration.
*
*
* repeated .grpc.service_config.MethodConfig method_config = 2;
*/
public Builder removeMethodConfig(int index) {
if (methodConfigBuilder_ == null) {
ensureMethodConfigIsMutable();
methodConfig_.remove(index);
onChanged();
} else {
methodConfigBuilder_.remove(index);
}
return this;
}
/**
*
* Per-method configuration.
*
*
* repeated .grpc.service_config.MethodConfig method_config = 2;
*/
public io.grpc.serviceconfig.MethodConfig.Builder getMethodConfigBuilder(
int index) {
return getMethodConfigFieldBuilder().getBuilder(index);
}
/**
*
* Per-method configuration.
*
*
* repeated .grpc.service_config.MethodConfig method_config = 2;
*/
public io.grpc.serviceconfig.MethodConfigOrBuilder getMethodConfigOrBuilder(
int index) {
if (methodConfigBuilder_ == null) {
return methodConfig_.get(index); } else {
return methodConfigBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Per-method configuration.
*
*
* repeated .grpc.service_config.MethodConfig method_config = 2;
*/
public java.util.List extends io.grpc.serviceconfig.MethodConfigOrBuilder>
getMethodConfigOrBuilderList() {
if (methodConfigBuilder_ != null) {
return methodConfigBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(methodConfig_);
}
}
/**
*
* Per-method configuration.
*
*
* repeated .grpc.service_config.MethodConfig method_config = 2;
*/
public io.grpc.serviceconfig.MethodConfig.Builder addMethodConfigBuilder() {
return getMethodConfigFieldBuilder().addBuilder(
io.grpc.serviceconfig.MethodConfig.getDefaultInstance());
}
/**
*
* Per-method configuration.
*
*
* repeated .grpc.service_config.MethodConfig method_config = 2;
*/
public io.grpc.serviceconfig.MethodConfig.Builder addMethodConfigBuilder(
int index) {
return getMethodConfigFieldBuilder().addBuilder(
index, io.grpc.serviceconfig.MethodConfig.getDefaultInstance());
}
/**
*
* Per-method configuration.
*
*
* repeated .grpc.service_config.MethodConfig method_config = 2;
*/
public java.util.List
getMethodConfigBuilderList() {
return getMethodConfigFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.grpc.serviceconfig.MethodConfig, io.grpc.serviceconfig.MethodConfig.Builder, io.grpc.serviceconfig.MethodConfigOrBuilder>
getMethodConfigFieldBuilder() {
if (methodConfigBuilder_ == null) {
methodConfigBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.grpc.serviceconfig.MethodConfig, io.grpc.serviceconfig.MethodConfig.Builder, io.grpc.serviceconfig.MethodConfigOrBuilder>(
methodConfig_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
methodConfig_ = null;
}
return methodConfigBuilder_;
}
private io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy retryThrottling_;
private com.google.protobuf.SingleFieldBuilderV3<
io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy, io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy.Builder, io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicyOrBuilder> retryThrottlingBuilder_;
/**
* .grpc.service_config.ServiceConfig.RetryThrottlingPolicy retry_throttling = 3;
* @return Whether the retryThrottling field is set.
*/
public boolean hasRetryThrottling() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* .grpc.service_config.ServiceConfig.RetryThrottlingPolicy retry_throttling = 3;
* @return The retryThrottling.
*/
public io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy getRetryThrottling() {
if (retryThrottlingBuilder_ == null) {
return retryThrottling_ == null ? io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy.getDefaultInstance() : retryThrottling_;
} else {
return retryThrottlingBuilder_.getMessage();
}
}
/**
* .grpc.service_config.ServiceConfig.RetryThrottlingPolicy retry_throttling = 3;
*/
public Builder setRetryThrottling(io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy value) {
if (retryThrottlingBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
retryThrottling_ = value;
} else {
retryThrottlingBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* .grpc.service_config.ServiceConfig.RetryThrottlingPolicy retry_throttling = 3;
*/
public Builder setRetryThrottling(
io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy.Builder builderForValue) {
if (retryThrottlingBuilder_ == null) {
retryThrottling_ = builderForValue.build();
} else {
retryThrottlingBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* .grpc.service_config.ServiceConfig.RetryThrottlingPolicy retry_throttling = 3;
*/
public Builder mergeRetryThrottling(io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy value) {
if (retryThrottlingBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
retryThrottling_ != null &&
retryThrottling_ != io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy.getDefaultInstance()) {
getRetryThrottlingBuilder().mergeFrom(value);
} else {
retryThrottling_ = value;
}
} else {
retryThrottlingBuilder_.mergeFrom(value);
}
if (retryThrottling_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
* .grpc.service_config.ServiceConfig.RetryThrottlingPolicy retry_throttling = 3;
*/
public Builder clearRetryThrottling() {
bitField0_ = (bitField0_ & ~0x00000008);
retryThrottling_ = null;
if (retryThrottlingBuilder_ != null) {
retryThrottlingBuilder_.dispose();
retryThrottlingBuilder_ = null;
}
onChanged();
return this;
}
/**
* .grpc.service_config.ServiceConfig.RetryThrottlingPolicy retry_throttling = 3;
*/
public io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy.Builder getRetryThrottlingBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getRetryThrottlingFieldBuilder().getBuilder();
}
/**
* .grpc.service_config.ServiceConfig.RetryThrottlingPolicy retry_throttling = 3;
*/
public io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicyOrBuilder getRetryThrottlingOrBuilder() {
if (retryThrottlingBuilder_ != null) {
return retryThrottlingBuilder_.getMessageOrBuilder();
} else {
return retryThrottling_ == null ?
io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy.getDefaultInstance() : retryThrottling_;
}
}
/**
* .grpc.service_config.ServiceConfig.RetryThrottlingPolicy retry_throttling = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy, io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy.Builder, io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicyOrBuilder>
getRetryThrottlingFieldBuilder() {
if (retryThrottlingBuilder_ == null) {
retryThrottlingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy, io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicy.Builder, io.grpc.serviceconfig.ServiceConfig.RetryThrottlingPolicyOrBuilder>(
getRetryThrottling(),
getParentForChildren(),
isClean());
retryThrottling_ = null;
}
return retryThrottlingBuilder_;
}
private io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig healthCheckConfig_;
private com.google.protobuf.SingleFieldBuilderV3<
io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig, io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig.Builder, io.grpc.serviceconfig.ServiceConfig.HealthCheckConfigOrBuilder> healthCheckConfigBuilder_;
/**
* .grpc.service_config.ServiceConfig.HealthCheckConfig health_check_config = 5;
* @return Whether the healthCheckConfig field is set.
*/
public boolean hasHealthCheckConfig() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* .grpc.service_config.ServiceConfig.HealthCheckConfig health_check_config = 5;
* @return The healthCheckConfig.
*/
public io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig getHealthCheckConfig() {
if (healthCheckConfigBuilder_ == null) {
return healthCheckConfig_ == null ? io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig.getDefaultInstance() : healthCheckConfig_;
} else {
return healthCheckConfigBuilder_.getMessage();
}
}
/**
* .grpc.service_config.ServiceConfig.HealthCheckConfig health_check_config = 5;
*/
public Builder setHealthCheckConfig(io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig value) {
if (healthCheckConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
healthCheckConfig_ = value;
} else {
healthCheckConfigBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
* .grpc.service_config.ServiceConfig.HealthCheckConfig health_check_config = 5;
*/
public Builder setHealthCheckConfig(
io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig.Builder builderForValue) {
if (healthCheckConfigBuilder_ == null) {
healthCheckConfig_ = builderForValue.build();
} else {
healthCheckConfigBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
* .grpc.service_config.ServiceConfig.HealthCheckConfig health_check_config = 5;
*/
public Builder mergeHealthCheckConfig(io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig value) {
if (healthCheckConfigBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0) &&
healthCheckConfig_ != null &&
healthCheckConfig_ != io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig.getDefaultInstance()) {
getHealthCheckConfigBuilder().mergeFrom(value);
} else {
healthCheckConfig_ = value;
}
} else {
healthCheckConfigBuilder_.mergeFrom(value);
}
if (healthCheckConfig_ != null) {
bitField0_ |= 0x00000010;
onChanged();
}
return this;
}
/**
* .grpc.service_config.ServiceConfig.HealthCheckConfig health_check_config = 5;
*/
public Builder clearHealthCheckConfig() {
bitField0_ = (bitField0_ & ~0x00000010);
healthCheckConfig_ = null;
if (healthCheckConfigBuilder_ != null) {
healthCheckConfigBuilder_.dispose();
healthCheckConfigBuilder_ = null;
}
onChanged();
return this;
}
/**
* .grpc.service_config.ServiceConfig.HealthCheckConfig health_check_config = 5;
*/
public io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig.Builder getHealthCheckConfigBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getHealthCheckConfigFieldBuilder().getBuilder();
}
/**
* .grpc.service_config.ServiceConfig.HealthCheckConfig health_check_config = 5;
*/
public io.grpc.serviceconfig.ServiceConfig.HealthCheckConfigOrBuilder getHealthCheckConfigOrBuilder() {
if (healthCheckConfigBuilder_ != null) {
return healthCheckConfigBuilder_.getMessageOrBuilder();
} else {
return healthCheckConfig_ == null ?
io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig.getDefaultInstance() : healthCheckConfig_;
}
}
/**
* .grpc.service_config.ServiceConfig.HealthCheckConfig health_check_config = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig, io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig.Builder, io.grpc.serviceconfig.ServiceConfig.HealthCheckConfigOrBuilder>
getHealthCheckConfigFieldBuilder() {
if (healthCheckConfigBuilder_ == null) {
healthCheckConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig, io.grpc.serviceconfig.ServiceConfig.HealthCheckConfig.Builder, io.grpc.serviceconfig.ServiceConfig.HealthCheckConfigOrBuilder>(
getHealthCheckConfig(),
getParentForChildren(),
isClean());
healthCheckConfig_ = null;
}
return healthCheckConfigBuilder_;
}
@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.ServiceConfig)
}
// @@protoc_insertion_point(class_scope:grpc.service_config.ServiceConfig)
private static final io.grpc.serviceconfig.ServiceConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grpc.serviceconfig.ServiceConfig();
}
public static io.grpc.serviceconfig.ServiceConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ServiceConfig 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.ServiceConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy