com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of polaris-all Show documentation
Show all versions of polaris-all Show documentation
All in one project for polaris-java
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: circuitbreaker.proto
package com.tencent.polaris.specification.api.v1.fault.tolerance;
public final class CircuitBreakerProto {
private CircuitBreakerProto() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
/**
*
* circuitbreaking level
*
*
* Protobuf enum {@code v1.Level}
*/
public enum Level
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNKNOWN = 0;
*/
UNKNOWN(0),
/**
*
* service level circuitbreaking
*
*
* SERVICE = 1;
*/
SERVICE(1),
/**
*
* method level circuitbreaking
*
*
* METHOD = 2;
*/
METHOD(2),
/**
*
* group level circuitbreaking
*
*
* GROUP = 3;
*/
GROUP(3),
/**
*
* instance level circuitbreaking
*
*
* INSTANCE = 4;
*/
INSTANCE(4),
UNRECOGNIZED(-1),
;
/**
* UNKNOWN = 0;
*/
public static final int UNKNOWN_VALUE = 0;
/**
*
* service level circuitbreaking
*
*
* SERVICE = 1;
*/
public static final int SERVICE_VALUE = 1;
/**
*
* method level circuitbreaking
*
*
* METHOD = 2;
*/
public static final int METHOD_VALUE = 2;
/**
*
* group level circuitbreaking
*
*
* GROUP = 3;
*/
public static final int GROUP_VALUE = 3;
/**
*
* instance level circuitbreaking
*
*
* INSTANCE = 4;
*/
public static final int INSTANCE_VALUE = 4;
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 Level 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 Level forNumber(int value) {
switch (value) {
case 0: return UNKNOWN;
case 1: return SERVICE;
case 2: return METHOD;
case 3: return GROUP;
case 4: return INSTANCE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Level> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Level findValueByNumber(int number) {
return Level.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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.getDescriptor().getEnumTypes().get(0);
}
private static final Level[] VALUES = values();
public static Level 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 Level(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:v1.Level)
}
public interface CircuitBreakerOrBuilder extends
// @@protoc_insertion_point(interface_extends:v1.CircuitBreaker)
com.google.protobuf.MessageOrBuilder {
/**
*
* deprecated
*
*
* .google.protobuf.StringValue id = 1;
* @return Whether the id field is set.
*/
boolean hasId();
/**
*
* deprecated
*
*
* .google.protobuf.StringValue id = 1;
* @return The id.
*/
com.google.protobuf.StringValue getId();
/**
*
* deprecated
*
*
* .google.protobuf.StringValue id = 1;
*/
com.google.protobuf.StringValueOrBuilder getIdOrBuilder();
/**
*
* 规则版本
* deprecated
*
*
* .google.protobuf.StringValue version = 2;
* @return Whether the version field is set.
*/
boolean hasVersion();
/**
*
* 规则版本
* deprecated
*
*
* .google.protobuf.StringValue version = 2;
* @return The version.
*/
com.google.protobuf.StringValue getVersion();
/**
*
* 规则版本
* deprecated
*
*
* .google.protobuf.StringValue version = 2;
*/
com.google.protobuf.StringValueOrBuilder getVersionOrBuilder();
/**
*
* 规则名
* deprecated
*
*
* .google.protobuf.StringValue name = 3;
* @return Whether the name field is set.
*/
boolean hasName();
/**
*
* 规则名
* deprecated
*
*
* .google.protobuf.StringValue name = 3;
* @return The name.
*/
com.google.protobuf.StringValue getName();
/**
*
* 规则名
* deprecated
*
*
* .google.protobuf.StringValue name = 3;
*/
com.google.protobuf.StringValueOrBuilder getNameOrBuilder();
/**
*
* 规则命名空间
* deprecated
*
*
* .google.protobuf.StringValue namespace = 4;
* @return Whether the namespace field is set.
*/
boolean hasNamespace();
/**
*
* 规则命名空间
* deprecated
*
*
* .google.protobuf.StringValue namespace = 4;
* @return The namespace.
*/
com.google.protobuf.StringValue getNamespace();
/**
*
* 规则命名空间
* deprecated
*
*
* .google.protobuf.StringValue namespace = 4;
*/
com.google.protobuf.StringValueOrBuilder getNamespaceOrBuilder();
/**
*
* 规则所属服务
*
*
* .google.protobuf.StringValue service = 5;
* @return Whether the service field is set.
*/
boolean hasService();
/**
*
* 规则所属服务
*
*
* .google.protobuf.StringValue service = 5;
* @return The service.
*/
com.google.protobuf.StringValue getService();
/**
*
* 规则所属服务
*
*
* .google.protobuf.StringValue service = 5;
*/
com.google.protobuf.StringValueOrBuilder getServiceOrBuilder();
/**
* .google.protobuf.StringValue service_namespace = 6;
* @return Whether the serviceNamespace field is set.
*/
boolean hasServiceNamespace();
/**
* .google.protobuf.StringValue service_namespace = 6;
* @return The serviceNamespace.
*/
com.google.protobuf.StringValue getServiceNamespace();
/**
* .google.protobuf.StringValue service_namespace = 6;
*/
com.google.protobuf.StringValueOrBuilder getServiceNamespaceOrBuilder();
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
java.util.List
getInboundsList();
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule getInbounds(int index);
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
int getInboundsCount();
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRuleOrBuilder>
getInboundsOrBuilderList();
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRuleOrBuilder getInboundsOrBuilder(
int index);
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
java.util.List
getOutboundsList();
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule getOutbounds(int index);
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
int getOutboundsCount();
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRuleOrBuilder>
getOutboundsOrBuilderList();
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRuleOrBuilder getOutboundsOrBuilder(
int index);
/**
*
* deprecated
*
*
* .google.protobuf.StringValue token = 9;
* @return Whether the token field is set.
*/
boolean hasToken();
/**
*
* deprecated
*
*
* .google.protobuf.StringValue token = 9;
* @return The token.
*/
com.google.protobuf.StringValue getToken();
/**
*
* deprecated
*
*
* .google.protobuf.StringValue token = 9;
*/
com.google.protobuf.StringValueOrBuilder getTokenOrBuilder();
/**
*
* deprecated
*
*
* .google.protobuf.StringValue owners = 10;
* @return Whether the owners field is set.
*/
boolean hasOwners();
/**
*
* deprecated
*
*
* .google.protobuf.StringValue owners = 10;
* @return The owners.
*/
com.google.protobuf.StringValue getOwners();
/**
*
* deprecated
*
*
* .google.protobuf.StringValue owners = 10;
*/
com.google.protobuf.StringValueOrBuilder getOwnersOrBuilder();
/**
*
* 业务
* deprecated
*
*
* .google.protobuf.StringValue business = 11;
* @return Whether the business field is set.
*/
boolean hasBusiness();
/**
*
* 业务
* deprecated
*
*
* .google.protobuf.StringValue business = 11;
* @return The business.
*/
com.google.protobuf.StringValue getBusiness();
/**
*
* 业务
* deprecated
*
*
* .google.protobuf.StringValue business = 11;
*/
com.google.protobuf.StringValueOrBuilder getBusinessOrBuilder();
/**
*
* 部门
* deprecated
*
*
* .google.protobuf.StringValue department = 12;
* @return Whether the department field is set.
*/
boolean hasDepartment();
/**
*
* 部门
* deprecated
*
*
* .google.protobuf.StringValue department = 12;
* @return The department.
*/
com.google.protobuf.StringValue getDepartment();
/**
*
* 部门
* deprecated
*
*
* .google.protobuf.StringValue department = 12;
*/
com.google.protobuf.StringValueOrBuilder getDepartmentOrBuilder();
/**
*
* 规则描述
* deprecated
*
*
* .google.protobuf.StringValue comment = 13;
* @return Whether the comment field is set.
*/
boolean hasComment();
/**
*
* 规则描述
* deprecated
*
*
* .google.protobuf.StringValue comment = 13;
* @return The comment.
*/
com.google.protobuf.StringValue getComment();
/**
*
* 规则描述
* deprecated
*
*
* .google.protobuf.StringValue comment = 13;
*/
com.google.protobuf.StringValueOrBuilder getCommentOrBuilder();
/**
*
* deprecated
*
*
* .google.protobuf.StringValue ctime = 14;
* @return Whether the ctime field is set.
*/
boolean hasCtime();
/**
*
* deprecated
*
*
* .google.protobuf.StringValue ctime = 14;
* @return The ctime.
*/
com.google.protobuf.StringValue getCtime();
/**
*
* deprecated
*
*
* .google.protobuf.StringValue ctime = 14;
*/
com.google.protobuf.StringValueOrBuilder getCtimeOrBuilder();
/**
*
* deprecated
*
*
* .google.protobuf.StringValue mtime = 15;
* @return Whether the mtime field is set.
*/
boolean hasMtime();
/**
*
* deprecated
*
*
* .google.protobuf.StringValue mtime = 15;
* @return The mtime.
*/
com.google.protobuf.StringValue getMtime();
/**
*
* deprecated
*
*
* .google.protobuf.StringValue mtime = 15;
*/
com.google.protobuf.StringValueOrBuilder getMtimeOrBuilder();
/**
* .google.protobuf.StringValue revision = 16;
* @return Whether the revision field is set.
*/
boolean hasRevision();
/**
* .google.protobuf.StringValue revision = 16;
* @return The revision.
*/
com.google.protobuf.StringValue getRevision();
/**
* .google.protobuf.StringValue revision = 16;
*/
com.google.protobuf.StringValueOrBuilder getRevisionOrBuilder();
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
java.util.List
getRulesList();
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule getRules(int index);
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
int getRulesCount();
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRuleOrBuilder>
getRulesOrBuilderList();
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRuleOrBuilder getRulesOrBuilder(
int index);
}
/**
*
*单个熔断规则定义
*
*
* Protobuf type {@code v1.CircuitBreaker}
*/
public static final class CircuitBreaker extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:v1.CircuitBreaker)
CircuitBreakerOrBuilder {
private static final long serialVersionUID = 0L;
// Use CircuitBreaker.newBuilder() to construct.
private CircuitBreaker(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CircuitBreaker() {
inbounds_ = java.util.Collections.emptyList();
outbounds_ = java.util.Collections.emptyList();
rules_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CircuitBreaker();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CircuitBreaker_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CircuitBreaker_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
private com.google.protobuf.StringValue id_;
/**
*
* deprecated
*
*
* .google.protobuf.StringValue id = 1;
* @return Whether the id field is set.
*/
@java.lang.Override
public boolean hasId() {
return id_ != null;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue id = 1;
* @return The id.
*/
@java.lang.Override
public com.google.protobuf.StringValue getId() {
return id_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : id_;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue id = 1;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getIdOrBuilder() {
return getId();
}
public static final int VERSION_FIELD_NUMBER = 2;
private com.google.protobuf.StringValue version_;
/**
*
* 规则版本
* deprecated
*
*
* .google.protobuf.StringValue version = 2;
* @return Whether the version field is set.
*/
@java.lang.Override
public boolean hasVersion() {
return version_ != null;
}
/**
*
* 规则版本
* deprecated
*
*
* .google.protobuf.StringValue version = 2;
* @return The version.
*/
@java.lang.Override
public com.google.protobuf.StringValue getVersion() {
return version_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : version_;
}
/**
*
* 规则版本
* deprecated
*
*
* .google.protobuf.StringValue version = 2;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getVersionOrBuilder() {
return getVersion();
}
public static final int NAME_FIELD_NUMBER = 3;
private com.google.protobuf.StringValue name_;
/**
*
* 规则名
* deprecated
*
*
* .google.protobuf.StringValue name = 3;
* @return Whether the name field is set.
*/
@java.lang.Override
public boolean hasName() {
return name_ != null;
}
/**
*
* 规则名
* deprecated
*
*
* .google.protobuf.StringValue name = 3;
* @return The name.
*/
@java.lang.Override
public com.google.protobuf.StringValue getName() {
return name_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : name_;
}
/**
*
* 规则名
* deprecated
*
*
* .google.protobuf.StringValue name = 3;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getNameOrBuilder() {
return getName();
}
public static final int NAMESPACE_FIELD_NUMBER = 4;
private com.google.protobuf.StringValue namespace_;
/**
*
* 规则命名空间
* deprecated
*
*
* .google.protobuf.StringValue namespace = 4;
* @return Whether the namespace field is set.
*/
@java.lang.Override
public boolean hasNamespace() {
return namespace_ != null;
}
/**
*
* 规则命名空间
* deprecated
*
*
* .google.protobuf.StringValue namespace = 4;
* @return The namespace.
*/
@java.lang.Override
public com.google.protobuf.StringValue getNamespace() {
return namespace_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : namespace_;
}
/**
*
* 规则命名空间
* deprecated
*
*
* .google.protobuf.StringValue namespace = 4;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getNamespaceOrBuilder() {
return getNamespace();
}
public static final int SERVICE_FIELD_NUMBER = 5;
private com.google.protobuf.StringValue service_;
/**
*
* 规则所属服务
*
*
* .google.protobuf.StringValue service = 5;
* @return Whether the service field is set.
*/
@java.lang.Override
public boolean hasService() {
return service_ != null;
}
/**
*
* 规则所属服务
*
*
* .google.protobuf.StringValue service = 5;
* @return The service.
*/
@java.lang.Override
public com.google.protobuf.StringValue getService() {
return service_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : service_;
}
/**
*
* 规则所属服务
*
*
* .google.protobuf.StringValue service = 5;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getServiceOrBuilder() {
return getService();
}
public static final int SERVICE_NAMESPACE_FIELD_NUMBER = 6;
private com.google.protobuf.StringValue serviceNamespace_;
/**
* .google.protobuf.StringValue service_namespace = 6;
* @return Whether the serviceNamespace field is set.
*/
@java.lang.Override
public boolean hasServiceNamespace() {
return serviceNamespace_ != null;
}
/**
* .google.protobuf.StringValue service_namespace = 6;
* @return The serviceNamespace.
*/
@java.lang.Override
public com.google.protobuf.StringValue getServiceNamespace() {
return serviceNamespace_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : serviceNamespace_;
}
/**
* .google.protobuf.StringValue service_namespace = 6;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getServiceNamespaceOrBuilder() {
return getServiceNamespace();
}
public static final int INBOUNDS_FIELD_NUMBER = 7;
private java.util.List inbounds_;
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
@java.lang.Override
public java.util.List getInboundsList() {
return inbounds_;
}
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
@java.lang.Override
public java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRuleOrBuilder>
getInboundsOrBuilderList() {
return inbounds_;
}
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
@java.lang.Override
public int getInboundsCount() {
return inbounds_.size();
}
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule getInbounds(int index) {
return inbounds_.get(index);
}
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRuleOrBuilder getInboundsOrBuilder(
int index) {
return inbounds_.get(index);
}
public static final int OUTBOUNDS_FIELD_NUMBER = 8;
private java.util.List outbounds_;
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
@java.lang.Override
public java.util.List getOutboundsList() {
return outbounds_;
}
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
@java.lang.Override
public java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRuleOrBuilder>
getOutboundsOrBuilderList() {
return outbounds_;
}
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
@java.lang.Override
public int getOutboundsCount() {
return outbounds_.size();
}
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule getOutbounds(int index) {
return outbounds_.get(index);
}
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRuleOrBuilder getOutboundsOrBuilder(
int index) {
return outbounds_.get(index);
}
public static final int TOKEN_FIELD_NUMBER = 9;
private com.google.protobuf.StringValue token_;
/**
*
* deprecated
*
*
* .google.protobuf.StringValue token = 9;
* @return Whether the token field is set.
*/
@java.lang.Override
public boolean hasToken() {
return token_ != null;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue token = 9;
* @return The token.
*/
@java.lang.Override
public com.google.protobuf.StringValue getToken() {
return token_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : token_;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue token = 9;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getTokenOrBuilder() {
return getToken();
}
public static final int OWNERS_FIELD_NUMBER = 10;
private com.google.protobuf.StringValue owners_;
/**
*
* deprecated
*
*
* .google.protobuf.StringValue owners = 10;
* @return Whether the owners field is set.
*/
@java.lang.Override
public boolean hasOwners() {
return owners_ != null;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue owners = 10;
* @return The owners.
*/
@java.lang.Override
public com.google.protobuf.StringValue getOwners() {
return owners_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : owners_;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue owners = 10;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getOwnersOrBuilder() {
return getOwners();
}
public static final int BUSINESS_FIELD_NUMBER = 11;
private com.google.protobuf.StringValue business_;
/**
*
* 业务
* deprecated
*
*
* .google.protobuf.StringValue business = 11;
* @return Whether the business field is set.
*/
@java.lang.Override
public boolean hasBusiness() {
return business_ != null;
}
/**
*
* 业务
* deprecated
*
*
* .google.protobuf.StringValue business = 11;
* @return The business.
*/
@java.lang.Override
public com.google.protobuf.StringValue getBusiness() {
return business_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : business_;
}
/**
*
* 业务
* deprecated
*
*
* .google.protobuf.StringValue business = 11;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getBusinessOrBuilder() {
return getBusiness();
}
public static final int DEPARTMENT_FIELD_NUMBER = 12;
private com.google.protobuf.StringValue department_;
/**
*
* 部门
* deprecated
*
*
* .google.protobuf.StringValue department = 12;
* @return Whether the department field is set.
*/
@java.lang.Override
public boolean hasDepartment() {
return department_ != null;
}
/**
*
* 部门
* deprecated
*
*
* .google.protobuf.StringValue department = 12;
* @return The department.
*/
@java.lang.Override
public com.google.protobuf.StringValue getDepartment() {
return department_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : department_;
}
/**
*
* 部门
* deprecated
*
*
* .google.protobuf.StringValue department = 12;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getDepartmentOrBuilder() {
return getDepartment();
}
public static final int COMMENT_FIELD_NUMBER = 13;
private com.google.protobuf.StringValue comment_;
/**
*
* 规则描述
* deprecated
*
*
* .google.protobuf.StringValue comment = 13;
* @return Whether the comment field is set.
*/
@java.lang.Override
public boolean hasComment() {
return comment_ != null;
}
/**
*
* 规则描述
* deprecated
*
*
* .google.protobuf.StringValue comment = 13;
* @return The comment.
*/
@java.lang.Override
public com.google.protobuf.StringValue getComment() {
return comment_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : comment_;
}
/**
*
* 规则描述
* deprecated
*
*
* .google.protobuf.StringValue comment = 13;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getCommentOrBuilder() {
return getComment();
}
public static final int CTIME_FIELD_NUMBER = 14;
private com.google.protobuf.StringValue ctime_;
/**
*
* deprecated
*
*
* .google.protobuf.StringValue ctime = 14;
* @return Whether the ctime field is set.
*/
@java.lang.Override
public boolean hasCtime() {
return ctime_ != null;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue ctime = 14;
* @return The ctime.
*/
@java.lang.Override
public com.google.protobuf.StringValue getCtime() {
return ctime_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : ctime_;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue ctime = 14;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getCtimeOrBuilder() {
return getCtime();
}
public static final int MTIME_FIELD_NUMBER = 15;
private com.google.protobuf.StringValue mtime_;
/**
*
* deprecated
*
*
* .google.protobuf.StringValue mtime = 15;
* @return Whether the mtime field is set.
*/
@java.lang.Override
public boolean hasMtime() {
return mtime_ != null;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue mtime = 15;
* @return The mtime.
*/
@java.lang.Override
public com.google.protobuf.StringValue getMtime() {
return mtime_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : mtime_;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue mtime = 15;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getMtimeOrBuilder() {
return getMtime();
}
public static final int REVISION_FIELD_NUMBER = 16;
private com.google.protobuf.StringValue revision_;
/**
* .google.protobuf.StringValue revision = 16;
* @return Whether the revision field is set.
*/
@java.lang.Override
public boolean hasRevision() {
return revision_ != null;
}
/**
* .google.protobuf.StringValue revision = 16;
* @return The revision.
*/
@java.lang.Override
public com.google.protobuf.StringValue getRevision() {
return revision_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : revision_;
}
/**
* .google.protobuf.StringValue revision = 16;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getRevisionOrBuilder() {
return getRevision();
}
public static final int RULES_FIELD_NUMBER = 21;
private java.util.List rules_;
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
@java.lang.Override
public java.util.List getRulesList() {
return rules_;
}
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
@java.lang.Override
public java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRuleOrBuilder>
getRulesOrBuilderList() {
return rules_;
}
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
@java.lang.Override
public int getRulesCount() {
return rules_.size();
}
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule getRules(int index) {
return rules_.get(index);
}
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRuleOrBuilder getRulesOrBuilder(
int index) {
return rules_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (id_ != null) {
output.writeMessage(1, getId());
}
if (version_ != null) {
output.writeMessage(2, getVersion());
}
if (name_ != null) {
output.writeMessage(3, getName());
}
if (namespace_ != null) {
output.writeMessage(4, getNamespace());
}
if (service_ != null) {
output.writeMessage(5, getService());
}
if (serviceNamespace_ != null) {
output.writeMessage(6, getServiceNamespace());
}
for (int i = 0; i < inbounds_.size(); i++) {
output.writeMessage(7, inbounds_.get(i));
}
for (int i = 0; i < outbounds_.size(); i++) {
output.writeMessage(8, outbounds_.get(i));
}
if (token_ != null) {
output.writeMessage(9, getToken());
}
if (owners_ != null) {
output.writeMessage(10, getOwners());
}
if (business_ != null) {
output.writeMessage(11, getBusiness());
}
if (department_ != null) {
output.writeMessage(12, getDepartment());
}
if (comment_ != null) {
output.writeMessage(13, getComment());
}
if (ctime_ != null) {
output.writeMessage(14, getCtime());
}
if (mtime_ != null) {
output.writeMessage(15, getMtime());
}
if (revision_ != null) {
output.writeMessage(16, getRevision());
}
for (int i = 0; i < rules_.size(); i++) {
output.writeMessage(21, rules_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (id_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getId());
}
if (version_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getVersion());
}
if (name_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getName());
}
if (namespace_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getNamespace());
}
if (service_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getService());
}
if (serviceNamespace_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getServiceNamespace());
}
for (int i = 0; i < inbounds_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, inbounds_.get(i));
}
for (int i = 0; i < outbounds_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, outbounds_.get(i));
}
if (token_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, getToken());
}
if (owners_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, getOwners());
}
if (business_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, getBusiness());
}
if (department_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(12, getDepartment());
}
if (comment_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(13, getComment());
}
if (ctime_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(14, getCtime());
}
if (mtime_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(15, getMtime());
}
if (revision_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(16, getRevision());
}
for (int i = 0; i < rules_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(21, rules_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker)) {
return super.equals(obj);
}
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker other = (com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker) obj;
if (hasId() != other.hasId()) return false;
if (hasId()) {
if (!getId()
.equals(other.getId())) return false;
}
if (hasVersion() != other.hasVersion()) return false;
if (hasVersion()) {
if (!getVersion()
.equals(other.getVersion())) return false;
}
if (hasName() != other.hasName()) return false;
if (hasName()) {
if (!getName()
.equals(other.getName())) return false;
}
if (hasNamespace() != other.hasNamespace()) return false;
if (hasNamespace()) {
if (!getNamespace()
.equals(other.getNamespace())) return false;
}
if (hasService() != other.hasService()) return false;
if (hasService()) {
if (!getService()
.equals(other.getService())) return false;
}
if (hasServiceNamespace() != other.hasServiceNamespace()) return false;
if (hasServiceNamespace()) {
if (!getServiceNamespace()
.equals(other.getServiceNamespace())) return false;
}
if (!getInboundsList()
.equals(other.getInboundsList())) return false;
if (!getOutboundsList()
.equals(other.getOutboundsList())) return false;
if (hasToken() != other.hasToken()) return false;
if (hasToken()) {
if (!getToken()
.equals(other.getToken())) return false;
}
if (hasOwners() != other.hasOwners()) return false;
if (hasOwners()) {
if (!getOwners()
.equals(other.getOwners())) return false;
}
if (hasBusiness() != other.hasBusiness()) return false;
if (hasBusiness()) {
if (!getBusiness()
.equals(other.getBusiness())) return false;
}
if (hasDepartment() != other.hasDepartment()) return false;
if (hasDepartment()) {
if (!getDepartment()
.equals(other.getDepartment())) return false;
}
if (hasComment() != other.hasComment()) return false;
if (hasComment()) {
if (!getComment()
.equals(other.getComment())) return false;
}
if (hasCtime() != other.hasCtime()) return false;
if (hasCtime()) {
if (!getCtime()
.equals(other.getCtime())) return false;
}
if (hasMtime() != other.hasMtime()) return false;
if (hasMtime()) {
if (!getMtime()
.equals(other.getMtime())) return false;
}
if (hasRevision() != other.hasRevision()) return false;
if (hasRevision()) {
if (!getRevision()
.equals(other.getRevision())) return false;
}
if (!getRulesList()
.equals(other.getRulesList())) 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 (hasId()) {
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
}
if (hasVersion()) {
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + getVersion().hashCode();
}
if (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (hasNamespace()) {
hash = (37 * hash) + NAMESPACE_FIELD_NUMBER;
hash = (53 * hash) + getNamespace().hashCode();
}
if (hasService()) {
hash = (37 * hash) + SERVICE_FIELD_NUMBER;
hash = (53 * hash) + getService().hashCode();
}
if (hasServiceNamespace()) {
hash = (37 * hash) + SERVICE_NAMESPACE_FIELD_NUMBER;
hash = (53 * hash) + getServiceNamespace().hashCode();
}
if (getInboundsCount() > 0) {
hash = (37 * hash) + INBOUNDS_FIELD_NUMBER;
hash = (53 * hash) + getInboundsList().hashCode();
}
if (getOutboundsCount() > 0) {
hash = (37 * hash) + OUTBOUNDS_FIELD_NUMBER;
hash = (53 * hash) + getOutboundsList().hashCode();
}
if (hasToken()) {
hash = (37 * hash) + TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getToken().hashCode();
}
if (hasOwners()) {
hash = (37 * hash) + OWNERS_FIELD_NUMBER;
hash = (53 * hash) + getOwners().hashCode();
}
if (hasBusiness()) {
hash = (37 * hash) + BUSINESS_FIELD_NUMBER;
hash = (53 * hash) + getBusiness().hashCode();
}
if (hasDepartment()) {
hash = (37 * hash) + DEPARTMENT_FIELD_NUMBER;
hash = (53 * hash) + getDepartment().hashCode();
}
if (hasComment()) {
hash = (37 * hash) + COMMENT_FIELD_NUMBER;
hash = (53 * hash) + getComment().hashCode();
}
if (hasCtime()) {
hash = (37 * hash) + CTIME_FIELD_NUMBER;
hash = (53 * hash) + getCtime().hashCode();
}
if (hasMtime()) {
hash = (37 * hash) + MTIME_FIELD_NUMBER;
hash = (53 * hash) + getMtime().hashCode();
}
if (hasRevision()) {
hash = (37 * hash) + REVISION_FIELD_NUMBER;
hash = (53 * hash) + getRevision().hashCode();
}
if (getRulesCount() > 0) {
hash = (37 * hash) + RULES_FIELD_NUMBER;
hash = (53 * hash) + getRulesList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker 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(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker 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 v1.CircuitBreaker}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:v1.CircuitBreaker)
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CircuitBreaker_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CircuitBreaker_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker.Builder.class);
}
// Construct using com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
if (idBuilder_ == null) {
id_ = null;
} else {
id_ = null;
idBuilder_ = null;
}
if (versionBuilder_ == null) {
version_ = null;
} else {
version_ = null;
versionBuilder_ = null;
}
if (nameBuilder_ == null) {
name_ = null;
} else {
name_ = null;
nameBuilder_ = null;
}
if (namespaceBuilder_ == null) {
namespace_ = null;
} else {
namespace_ = null;
namespaceBuilder_ = null;
}
if (serviceBuilder_ == null) {
service_ = null;
} else {
service_ = null;
serviceBuilder_ = null;
}
if (serviceNamespaceBuilder_ == null) {
serviceNamespace_ = null;
} else {
serviceNamespace_ = null;
serviceNamespaceBuilder_ = null;
}
if (inboundsBuilder_ == null) {
inbounds_ = java.util.Collections.emptyList();
} else {
inbounds_ = null;
inboundsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
if (outboundsBuilder_ == null) {
outbounds_ = java.util.Collections.emptyList();
} else {
outbounds_ = null;
outboundsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
if (tokenBuilder_ == null) {
token_ = null;
} else {
token_ = null;
tokenBuilder_ = null;
}
if (ownersBuilder_ == null) {
owners_ = null;
} else {
owners_ = null;
ownersBuilder_ = null;
}
if (businessBuilder_ == null) {
business_ = null;
} else {
business_ = null;
businessBuilder_ = null;
}
if (departmentBuilder_ == null) {
department_ = null;
} else {
department_ = null;
departmentBuilder_ = null;
}
if (commentBuilder_ == null) {
comment_ = null;
} else {
comment_ = null;
commentBuilder_ = null;
}
if (ctimeBuilder_ == null) {
ctime_ = null;
} else {
ctime_ = null;
ctimeBuilder_ = null;
}
if (mtimeBuilder_ == null) {
mtime_ = null;
} else {
mtime_ = null;
mtimeBuilder_ = null;
}
if (revisionBuilder_ == null) {
revision_ = null;
} else {
revision_ = null;
revisionBuilder_ = null;
}
if (rulesBuilder_ == null) {
rules_ = java.util.Collections.emptyList();
} else {
rules_ = null;
rulesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CircuitBreaker_descriptor;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker getDefaultInstanceForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker.getDefaultInstance();
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker build() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker buildPartial() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker result = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker(this);
int from_bitField0_ = bitField0_;
if (idBuilder_ == null) {
result.id_ = id_;
} else {
result.id_ = idBuilder_.build();
}
if (versionBuilder_ == null) {
result.version_ = version_;
} else {
result.version_ = versionBuilder_.build();
}
if (nameBuilder_ == null) {
result.name_ = name_;
} else {
result.name_ = nameBuilder_.build();
}
if (namespaceBuilder_ == null) {
result.namespace_ = namespace_;
} else {
result.namespace_ = namespaceBuilder_.build();
}
if (serviceBuilder_ == null) {
result.service_ = service_;
} else {
result.service_ = serviceBuilder_.build();
}
if (serviceNamespaceBuilder_ == null) {
result.serviceNamespace_ = serviceNamespace_;
} else {
result.serviceNamespace_ = serviceNamespaceBuilder_.build();
}
if (inboundsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
inbounds_ = java.util.Collections.unmodifiableList(inbounds_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.inbounds_ = inbounds_;
} else {
result.inbounds_ = inboundsBuilder_.build();
}
if (outboundsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
outbounds_ = java.util.Collections.unmodifiableList(outbounds_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.outbounds_ = outbounds_;
} else {
result.outbounds_ = outboundsBuilder_.build();
}
if (tokenBuilder_ == null) {
result.token_ = token_;
} else {
result.token_ = tokenBuilder_.build();
}
if (ownersBuilder_ == null) {
result.owners_ = owners_;
} else {
result.owners_ = ownersBuilder_.build();
}
if (businessBuilder_ == null) {
result.business_ = business_;
} else {
result.business_ = businessBuilder_.build();
}
if (departmentBuilder_ == null) {
result.department_ = department_;
} else {
result.department_ = departmentBuilder_.build();
}
if (commentBuilder_ == null) {
result.comment_ = comment_;
} else {
result.comment_ = commentBuilder_.build();
}
if (ctimeBuilder_ == null) {
result.ctime_ = ctime_;
} else {
result.ctime_ = ctimeBuilder_.build();
}
if (mtimeBuilder_ == null) {
result.mtime_ = mtime_;
} else {
result.mtime_ = mtimeBuilder_.build();
}
if (revisionBuilder_ == null) {
result.revision_ = revision_;
} else {
result.revision_ = revisionBuilder_.build();
}
if (rulesBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
rules_ = java.util.Collections.unmodifiableList(rules_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.rules_ = rules_;
} else {
result.rules_ = rulesBuilder_.build();
}
onBuilt();
return result;
}
@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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker) {
return mergeFrom((com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker other) {
if (other == com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker.getDefaultInstance()) return this;
if (other.hasId()) {
mergeId(other.getId());
}
if (other.hasVersion()) {
mergeVersion(other.getVersion());
}
if (other.hasName()) {
mergeName(other.getName());
}
if (other.hasNamespace()) {
mergeNamespace(other.getNamespace());
}
if (other.hasService()) {
mergeService(other.getService());
}
if (other.hasServiceNamespace()) {
mergeServiceNamespace(other.getServiceNamespace());
}
if (inboundsBuilder_ == null) {
if (!other.inbounds_.isEmpty()) {
if (inbounds_.isEmpty()) {
inbounds_ = other.inbounds_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureInboundsIsMutable();
inbounds_.addAll(other.inbounds_);
}
onChanged();
}
} else {
if (!other.inbounds_.isEmpty()) {
if (inboundsBuilder_.isEmpty()) {
inboundsBuilder_.dispose();
inboundsBuilder_ = null;
inbounds_ = other.inbounds_;
bitField0_ = (bitField0_ & ~0x00000001);
inboundsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getInboundsFieldBuilder() : null;
} else {
inboundsBuilder_.addAllMessages(other.inbounds_);
}
}
}
if (outboundsBuilder_ == null) {
if (!other.outbounds_.isEmpty()) {
if (outbounds_.isEmpty()) {
outbounds_ = other.outbounds_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureOutboundsIsMutable();
outbounds_.addAll(other.outbounds_);
}
onChanged();
}
} else {
if (!other.outbounds_.isEmpty()) {
if (outboundsBuilder_.isEmpty()) {
outboundsBuilder_.dispose();
outboundsBuilder_ = null;
outbounds_ = other.outbounds_;
bitField0_ = (bitField0_ & ~0x00000002);
outboundsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getOutboundsFieldBuilder() : null;
} else {
outboundsBuilder_.addAllMessages(other.outbounds_);
}
}
}
if (other.hasToken()) {
mergeToken(other.getToken());
}
if (other.hasOwners()) {
mergeOwners(other.getOwners());
}
if (other.hasBusiness()) {
mergeBusiness(other.getBusiness());
}
if (other.hasDepartment()) {
mergeDepartment(other.getDepartment());
}
if (other.hasComment()) {
mergeComment(other.getComment());
}
if (other.hasCtime()) {
mergeCtime(other.getCtime());
}
if (other.hasMtime()) {
mergeMtime(other.getMtime());
}
if (other.hasRevision()) {
mergeRevision(other.getRevision());
}
if (rulesBuilder_ == null) {
if (!other.rules_.isEmpty()) {
if (rules_.isEmpty()) {
rules_ = other.rules_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureRulesIsMutable();
rules_.addAll(other.rules_);
}
onChanged();
}
} else {
if (!other.rules_.isEmpty()) {
if (rulesBuilder_.isEmpty()) {
rulesBuilder_.dispose();
rulesBuilder_ = null;
rules_ = other.rules_;
bitField0_ = (bitField0_ & ~0x00000004);
rulesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getRulesFieldBuilder() : null;
} else {
rulesBuilder_.addAllMessages(other.rules_);
}
}
}
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(
getIdFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 10
case 18: {
input.readMessage(
getVersionFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 18
case 26: {
input.readMessage(
getNameFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 26
case 34: {
input.readMessage(
getNamespaceFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 34
case 42: {
input.readMessage(
getServiceFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 42
case 50: {
input.readMessage(
getServiceNamespaceFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 50
case 58: {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule m =
input.readMessage(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.parser(),
extensionRegistry);
if (inboundsBuilder_ == null) {
ensureInboundsIsMutable();
inbounds_.add(m);
} else {
inboundsBuilder_.addMessage(m);
}
break;
} // case 58
case 66: {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule m =
input.readMessage(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.parser(),
extensionRegistry);
if (outboundsBuilder_ == null) {
ensureOutboundsIsMutable();
outbounds_.add(m);
} else {
outboundsBuilder_.addMessage(m);
}
break;
} // case 66
case 74: {
input.readMessage(
getTokenFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 74
case 82: {
input.readMessage(
getOwnersFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 82
case 90: {
input.readMessage(
getBusinessFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 90
case 98: {
input.readMessage(
getDepartmentFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 98
case 106: {
input.readMessage(
getCommentFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 106
case 114: {
input.readMessage(
getCtimeFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 114
case 122: {
input.readMessage(
getMtimeFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 122
case 130: {
input.readMessage(
getRevisionFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 130
case 170: {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule m =
input.readMessage(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule.parser(),
extensionRegistry);
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
rules_.add(m);
} else {
rulesBuilder_.addMessage(m);
}
break;
} // case 170
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 id_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> idBuilder_;
/**
*
* deprecated
*
*
* .google.protobuf.StringValue id = 1;
* @return Whether the id field is set.
*/
public boolean hasId() {
return idBuilder_ != null || id_ != null;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue id = 1;
* @return The id.
*/
public com.google.protobuf.StringValue getId() {
if (idBuilder_ == null) {
return id_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : id_;
} else {
return idBuilder_.getMessage();
}
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue id = 1;
*/
public Builder setId(com.google.protobuf.StringValue value) {
if (idBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
} else {
idBuilder_.setMessage(value);
}
return this;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue id = 1;
*/
public Builder setId(
com.google.protobuf.StringValue.Builder builderForValue) {
if (idBuilder_ == null) {
id_ = builderForValue.build();
onChanged();
} else {
idBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue id = 1;
*/
public Builder mergeId(com.google.protobuf.StringValue value) {
if (idBuilder_ == null) {
if (id_ != null) {
id_ =
com.google.protobuf.StringValue.newBuilder(id_).mergeFrom(value).buildPartial();
} else {
id_ = value;
}
onChanged();
} else {
idBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue id = 1;
*/
public Builder clearId() {
if (idBuilder_ == null) {
id_ = null;
onChanged();
} else {
id_ = null;
idBuilder_ = null;
}
return this;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue id = 1;
*/
public com.google.protobuf.StringValue.Builder getIdBuilder() {
onChanged();
return getIdFieldBuilder().getBuilder();
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue id = 1;
*/
public com.google.protobuf.StringValueOrBuilder getIdOrBuilder() {
if (idBuilder_ != null) {
return idBuilder_.getMessageOrBuilder();
} else {
return id_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : id_;
}
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue id = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>
getIdFieldBuilder() {
if (idBuilder_ == null) {
idBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>(
getId(),
getParentForChildren(),
isClean());
id_ = null;
}
return idBuilder_;
}
private com.google.protobuf.StringValue version_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> versionBuilder_;
/**
*
* 规则版本
* deprecated
*
*
* .google.protobuf.StringValue version = 2;
* @return Whether the version field is set.
*/
public boolean hasVersion() {
return versionBuilder_ != null || version_ != null;
}
/**
*
* 规则版本
* deprecated
*
*
* .google.protobuf.StringValue version = 2;
* @return The version.
*/
public com.google.protobuf.StringValue getVersion() {
if (versionBuilder_ == null) {
return version_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : version_;
} else {
return versionBuilder_.getMessage();
}
}
/**
*
* 规则版本
* deprecated
*
*
* .google.protobuf.StringValue version = 2;
*/
public Builder setVersion(com.google.protobuf.StringValue value) {
if (versionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
version_ = value;
onChanged();
} else {
versionBuilder_.setMessage(value);
}
return this;
}
/**
*
* 规则版本
* deprecated
*
*
* .google.protobuf.StringValue version = 2;
*/
public Builder setVersion(
com.google.protobuf.StringValue.Builder builderForValue) {
if (versionBuilder_ == null) {
version_ = builderForValue.build();
onChanged();
} else {
versionBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 规则版本
* deprecated
*
*
* .google.protobuf.StringValue version = 2;
*/
public Builder mergeVersion(com.google.protobuf.StringValue value) {
if (versionBuilder_ == null) {
if (version_ != null) {
version_ =
com.google.protobuf.StringValue.newBuilder(version_).mergeFrom(value).buildPartial();
} else {
version_ = value;
}
onChanged();
} else {
versionBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 规则版本
* deprecated
*
*
* .google.protobuf.StringValue version = 2;
*/
public Builder clearVersion() {
if (versionBuilder_ == null) {
version_ = null;
onChanged();
} else {
version_ = null;
versionBuilder_ = null;
}
return this;
}
/**
*
* 规则版本
* deprecated
*
*
* .google.protobuf.StringValue version = 2;
*/
public com.google.protobuf.StringValue.Builder getVersionBuilder() {
onChanged();
return getVersionFieldBuilder().getBuilder();
}
/**
*
* 规则版本
* deprecated
*
*
* .google.protobuf.StringValue version = 2;
*/
public com.google.protobuf.StringValueOrBuilder getVersionOrBuilder() {
if (versionBuilder_ != null) {
return versionBuilder_.getMessageOrBuilder();
} else {
return version_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : version_;
}
}
/**
*
* 规则版本
* deprecated
*
*
* .google.protobuf.StringValue version = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>
getVersionFieldBuilder() {
if (versionBuilder_ == null) {
versionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>(
getVersion(),
getParentForChildren(),
isClean());
version_ = null;
}
return versionBuilder_;
}
private com.google.protobuf.StringValue name_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> nameBuilder_;
/**
*
* 规则名
* deprecated
*
*
* .google.protobuf.StringValue name = 3;
* @return Whether the name field is set.
*/
public boolean hasName() {
return nameBuilder_ != null || name_ != null;
}
/**
*
* 规则名
* deprecated
*
*
* .google.protobuf.StringValue name = 3;
* @return The name.
*/
public com.google.protobuf.StringValue getName() {
if (nameBuilder_ == null) {
return name_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : name_;
} else {
return nameBuilder_.getMessage();
}
}
/**
*
* 规则名
* deprecated
*
*
* .google.protobuf.StringValue name = 3;
*/
public Builder setName(com.google.protobuf.StringValue value) {
if (nameBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
} else {
nameBuilder_.setMessage(value);
}
return this;
}
/**
*
* 规则名
* deprecated
*
*
* .google.protobuf.StringValue name = 3;
*/
public Builder setName(
com.google.protobuf.StringValue.Builder builderForValue) {
if (nameBuilder_ == null) {
name_ = builderForValue.build();
onChanged();
} else {
nameBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 规则名
* deprecated
*
*
* .google.protobuf.StringValue name = 3;
*/
public Builder mergeName(com.google.protobuf.StringValue value) {
if (nameBuilder_ == null) {
if (name_ != null) {
name_ =
com.google.protobuf.StringValue.newBuilder(name_).mergeFrom(value).buildPartial();
} else {
name_ = value;
}
onChanged();
} else {
nameBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 规则名
* deprecated
*
*
* .google.protobuf.StringValue name = 3;
*/
public Builder clearName() {
if (nameBuilder_ == null) {
name_ = null;
onChanged();
} else {
name_ = null;
nameBuilder_ = null;
}
return this;
}
/**
*
* 规则名
* deprecated
*
*
* .google.protobuf.StringValue name = 3;
*/
public com.google.protobuf.StringValue.Builder getNameBuilder() {
onChanged();
return getNameFieldBuilder().getBuilder();
}
/**
*
* 规则名
* deprecated
*
*
* .google.protobuf.StringValue name = 3;
*/
public com.google.protobuf.StringValueOrBuilder getNameOrBuilder() {
if (nameBuilder_ != null) {
return nameBuilder_.getMessageOrBuilder();
} else {
return name_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : name_;
}
}
/**
*
* 规则名
* deprecated
*
*
* .google.protobuf.StringValue name = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>
getNameFieldBuilder() {
if (nameBuilder_ == null) {
nameBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>(
getName(),
getParentForChildren(),
isClean());
name_ = null;
}
return nameBuilder_;
}
private com.google.protobuf.StringValue namespace_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> namespaceBuilder_;
/**
*
* 规则命名空间
* deprecated
*
*
* .google.protobuf.StringValue namespace = 4;
* @return Whether the namespace field is set.
*/
public boolean hasNamespace() {
return namespaceBuilder_ != null || namespace_ != null;
}
/**
*
* 规则命名空间
* deprecated
*
*
* .google.protobuf.StringValue namespace = 4;
* @return The namespace.
*/
public com.google.protobuf.StringValue getNamespace() {
if (namespaceBuilder_ == null) {
return namespace_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : namespace_;
} else {
return namespaceBuilder_.getMessage();
}
}
/**
*
* 规则命名空间
* deprecated
*
*
* .google.protobuf.StringValue namespace = 4;
*/
public Builder setNamespace(com.google.protobuf.StringValue value) {
if (namespaceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
namespace_ = value;
onChanged();
} else {
namespaceBuilder_.setMessage(value);
}
return this;
}
/**
*
* 规则命名空间
* deprecated
*
*
* .google.protobuf.StringValue namespace = 4;
*/
public Builder setNamespace(
com.google.protobuf.StringValue.Builder builderForValue) {
if (namespaceBuilder_ == null) {
namespace_ = builderForValue.build();
onChanged();
} else {
namespaceBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 规则命名空间
* deprecated
*
*
* .google.protobuf.StringValue namespace = 4;
*/
public Builder mergeNamespace(com.google.protobuf.StringValue value) {
if (namespaceBuilder_ == null) {
if (namespace_ != null) {
namespace_ =
com.google.protobuf.StringValue.newBuilder(namespace_).mergeFrom(value).buildPartial();
} else {
namespace_ = value;
}
onChanged();
} else {
namespaceBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 规则命名空间
* deprecated
*
*
* .google.protobuf.StringValue namespace = 4;
*/
public Builder clearNamespace() {
if (namespaceBuilder_ == null) {
namespace_ = null;
onChanged();
} else {
namespace_ = null;
namespaceBuilder_ = null;
}
return this;
}
/**
*
* 规则命名空间
* deprecated
*
*
* .google.protobuf.StringValue namespace = 4;
*/
public com.google.protobuf.StringValue.Builder getNamespaceBuilder() {
onChanged();
return getNamespaceFieldBuilder().getBuilder();
}
/**
*
* 规则命名空间
* deprecated
*
*
* .google.protobuf.StringValue namespace = 4;
*/
public com.google.protobuf.StringValueOrBuilder getNamespaceOrBuilder() {
if (namespaceBuilder_ != null) {
return namespaceBuilder_.getMessageOrBuilder();
} else {
return namespace_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : namespace_;
}
}
/**
*
* 规则命名空间
* deprecated
*
*
* .google.protobuf.StringValue namespace = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>
getNamespaceFieldBuilder() {
if (namespaceBuilder_ == null) {
namespaceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>(
getNamespace(),
getParentForChildren(),
isClean());
namespace_ = null;
}
return namespaceBuilder_;
}
private com.google.protobuf.StringValue service_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> serviceBuilder_;
/**
*
* 规则所属服务
*
*
* .google.protobuf.StringValue service = 5;
* @return Whether the service field is set.
*/
public boolean hasService() {
return serviceBuilder_ != null || service_ != null;
}
/**
*
* 规则所属服务
*
*
* .google.protobuf.StringValue service = 5;
* @return The service.
*/
public com.google.protobuf.StringValue getService() {
if (serviceBuilder_ == null) {
return service_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : service_;
} else {
return serviceBuilder_.getMessage();
}
}
/**
*
* 规则所属服务
*
*
* .google.protobuf.StringValue service = 5;
*/
public Builder setService(com.google.protobuf.StringValue value) {
if (serviceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
service_ = value;
onChanged();
} else {
serviceBuilder_.setMessage(value);
}
return this;
}
/**
*
* 规则所属服务
*
*
* .google.protobuf.StringValue service = 5;
*/
public Builder setService(
com.google.protobuf.StringValue.Builder builderForValue) {
if (serviceBuilder_ == null) {
service_ = builderForValue.build();
onChanged();
} else {
serviceBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 规则所属服务
*
*
* .google.protobuf.StringValue service = 5;
*/
public Builder mergeService(com.google.protobuf.StringValue value) {
if (serviceBuilder_ == null) {
if (service_ != null) {
service_ =
com.google.protobuf.StringValue.newBuilder(service_).mergeFrom(value).buildPartial();
} else {
service_ = value;
}
onChanged();
} else {
serviceBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 规则所属服务
*
*
* .google.protobuf.StringValue service = 5;
*/
public Builder clearService() {
if (serviceBuilder_ == null) {
service_ = null;
onChanged();
} else {
service_ = null;
serviceBuilder_ = null;
}
return this;
}
/**
*
* 规则所属服务
*
*
* .google.protobuf.StringValue service = 5;
*/
public com.google.protobuf.StringValue.Builder getServiceBuilder() {
onChanged();
return getServiceFieldBuilder().getBuilder();
}
/**
*
* 规则所属服务
*
*
* .google.protobuf.StringValue service = 5;
*/
public com.google.protobuf.StringValueOrBuilder getServiceOrBuilder() {
if (serviceBuilder_ != null) {
return serviceBuilder_.getMessageOrBuilder();
} else {
return service_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : service_;
}
}
/**
*
* 规则所属服务
*
*
* .google.protobuf.StringValue service = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>
getServiceFieldBuilder() {
if (serviceBuilder_ == null) {
serviceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>(
getService(),
getParentForChildren(),
isClean());
service_ = null;
}
return serviceBuilder_;
}
private com.google.protobuf.StringValue serviceNamespace_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> serviceNamespaceBuilder_;
/**
* .google.protobuf.StringValue service_namespace = 6;
* @return Whether the serviceNamespace field is set.
*/
public boolean hasServiceNamespace() {
return serviceNamespaceBuilder_ != null || serviceNamespace_ != null;
}
/**
* .google.protobuf.StringValue service_namespace = 6;
* @return The serviceNamespace.
*/
public com.google.protobuf.StringValue getServiceNamespace() {
if (serviceNamespaceBuilder_ == null) {
return serviceNamespace_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : serviceNamespace_;
} else {
return serviceNamespaceBuilder_.getMessage();
}
}
/**
* .google.protobuf.StringValue service_namespace = 6;
*/
public Builder setServiceNamespace(com.google.protobuf.StringValue value) {
if (serviceNamespaceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
serviceNamespace_ = value;
onChanged();
} else {
serviceNamespaceBuilder_.setMessage(value);
}
return this;
}
/**
* .google.protobuf.StringValue service_namespace = 6;
*/
public Builder setServiceNamespace(
com.google.protobuf.StringValue.Builder builderForValue) {
if (serviceNamespaceBuilder_ == null) {
serviceNamespace_ = builderForValue.build();
onChanged();
} else {
serviceNamespaceBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .google.protobuf.StringValue service_namespace = 6;
*/
public Builder mergeServiceNamespace(com.google.protobuf.StringValue value) {
if (serviceNamespaceBuilder_ == null) {
if (serviceNamespace_ != null) {
serviceNamespace_ =
com.google.protobuf.StringValue.newBuilder(serviceNamespace_).mergeFrom(value).buildPartial();
} else {
serviceNamespace_ = value;
}
onChanged();
} else {
serviceNamespaceBuilder_.mergeFrom(value);
}
return this;
}
/**
* .google.protobuf.StringValue service_namespace = 6;
*/
public Builder clearServiceNamespace() {
if (serviceNamespaceBuilder_ == null) {
serviceNamespace_ = null;
onChanged();
} else {
serviceNamespace_ = null;
serviceNamespaceBuilder_ = null;
}
return this;
}
/**
* .google.protobuf.StringValue service_namespace = 6;
*/
public com.google.protobuf.StringValue.Builder getServiceNamespaceBuilder() {
onChanged();
return getServiceNamespaceFieldBuilder().getBuilder();
}
/**
* .google.protobuf.StringValue service_namespace = 6;
*/
public com.google.protobuf.StringValueOrBuilder getServiceNamespaceOrBuilder() {
if (serviceNamespaceBuilder_ != null) {
return serviceNamespaceBuilder_.getMessageOrBuilder();
} else {
return serviceNamespace_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : serviceNamespace_;
}
}
/**
* .google.protobuf.StringValue service_namespace = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>
getServiceNamespaceFieldBuilder() {
if (serviceNamespaceBuilder_ == null) {
serviceNamespaceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>(
getServiceNamespace(),
getParentForChildren(),
isClean());
serviceNamespace_ = null;
}
return serviceNamespaceBuilder_;
}
private java.util.List inbounds_ =
java.util.Collections.emptyList();
private void ensureInboundsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
inbounds_ = new java.util.ArrayList(inbounds_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRuleOrBuilder> inboundsBuilder_;
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
public java.util.List getInboundsList() {
if (inboundsBuilder_ == null) {
return java.util.Collections.unmodifiableList(inbounds_);
} else {
return inboundsBuilder_.getMessageList();
}
}
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
public int getInboundsCount() {
if (inboundsBuilder_ == null) {
return inbounds_.size();
} else {
return inboundsBuilder_.getCount();
}
}
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule getInbounds(int index) {
if (inboundsBuilder_ == null) {
return inbounds_.get(index);
} else {
return inboundsBuilder_.getMessage(index);
}
}
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
public Builder setInbounds(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule value) {
if (inboundsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInboundsIsMutable();
inbounds_.set(index, value);
onChanged();
} else {
inboundsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
public Builder setInbounds(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.Builder builderForValue) {
if (inboundsBuilder_ == null) {
ensureInboundsIsMutable();
inbounds_.set(index, builderForValue.build());
onChanged();
} else {
inboundsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
public Builder addInbounds(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule value) {
if (inboundsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInboundsIsMutable();
inbounds_.add(value);
onChanged();
} else {
inboundsBuilder_.addMessage(value);
}
return this;
}
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
public Builder addInbounds(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule value) {
if (inboundsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInboundsIsMutable();
inbounds_.add(index, value);
onChanged();
} else {
inboundsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
public Builder addInbounds(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.Builder builderForValue) {
if (inboundsBuilder_ == null) {
ensureInboundsIsMutable();
inbounds_.add(builderForValue.build());
onChanged();
} else {
inboundsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
public Builder addInbounds(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.Builder builderForValue) {
if (inboundsBuilder_ == null) {
ensureInboundsIsMutable();
inbounds_.add(index, builderForValue.build());
onChanged();
} else {
inboundsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
public Builder addAllInbounds(
java.lang.Iterable extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule> values) {
if (inboundsBuilder_ == null) {
ensureInboundsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, inbounds_);
onChanged();
} else {
inboundsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
public Builder clearInbounds() {
if (inboundsBuilder_ == null) {
inbounds_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
inboundsBuilder_.clear();
}
return this;
}
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
public Builder removeInbounds(int index) {
if (inboundsBuilder_ == null) {
ensureInboundsIsMutable();
inbounds_.remove(index);
onChanged();
} else {
inboundsBuilder_.remove(index);
}
return this;
}
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.Builder getInboundsBuilder(
int index) {
return getInboundsFieldBuilder().getBuilder(index);
}
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRuleOrBuilder getInboundsOrBuilder(
int index) {
if (inboundsBuilder_ == null) {
return inbounds_.get(index); } else {
return inboundsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
public java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRuleOrBuilder>
getInboundsOrBuilderList() {
if (inboundsBuilder_ != null) {
return inboundsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(inbounds_);
}
}
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.Builder addInboundsBuilder() {
return getInboundsFieldBuilder().addBuilder(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.getDefaultInstance());
}
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.Builder addInboundsBuilder(
int index) {
return getInboundsFieldBuilder().addBuilder(
index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.getDefaultInstance());
}
/**
*
*熔断规则可以分为被调规则和主调规则
*被调规则针对所有的指定主调生效,假如不指定则对所有的主调生效
*主调规则为当前主调方的规则,假如不指定则针对所有被调生效
* deprecated
*
*
* repeated .v1.CbRule inbounds = 7;
*/
public java.util.List
getInboundsBuilderList() {
return getInboundsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRuleOrBuilder>
getInboundsFieldBuilder() {
if (inboundsBuilder_ == null) {
inboundsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRuleOrBuilder>(
inbounds_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
inbounds_ = null;
}
return inboundsBuilder_;
}
private java.util.List outbounds_ =
java.util.Collections.emptyList();
private void ensureOutboundsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
outbounds_ = new java.util.ArrayList(outbounds_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRuleOrBuilder> outboundsBuilder_;
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
public java.util.List getOutboundsList() {
if (outboundsBuilder_ == null) {
return java.util.Collections.unmodifiableList(outbounds_);
} else {
return outboundsBuilder_.getMessageList();
}
}
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
public int getOutboundsCount() {
if (outboundsBuilder_ == null) {
return outbounds_.size();
} else {
return outboundsBuilder_.getCount();
}
}
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule getOutbounds(int index) {
if (outboundsBuilder_ == null) {
return outbounds_.get(index);
} else {
return outboundsBuilder_.getMessage(index);
}
}
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
public Builder setOutbounds(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule value) {
if (outboundsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureOutboundsIsMutable();
outbounds_.set(index, value);
onChanged();
} else {
outboundsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
public Builder setOutbounds(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.Builder builderForValue) {
if (outboundsBuilder_ == null) {
ensureOutboundsIsMutable();
outbounds_.set(index, builderForValue.build());
onChanged();
} else {
outboundsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
public Builder addOutbounds(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule value) {
if (outboundsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureOutboundsIsMutable();
outbounds_.add(value);
onChanged();
} else {
outboundsBuilder_.addMessage(value);
}
return this;
}
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
public Builder addOutbounds(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule value) {
if (outboundsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureOutboundsIsMutable();
outbounds_.add(index, value);
onChanged();
} else {
outboundsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
public Builder addOutbounds(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.Builder builderForValue) {
if (outboundsBuilder_ == null) {
ensureOutboundsIsMutable();
outbounds_.add(builderForValue.build());
onChanged();
} else {
outboundsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
public Builder addOutbounds(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.Builder builderForValue) {
if (outboundsBuilder_ == null) {
ensureOutboundsIsMutable();
outbounds_.add(index, builderForValue.build());
onChanged();
} else {
outboundsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
public Builder addAllOutbounds(
java.lang.Iterable extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule> values) {
if (outboundsBuilder_ == null) {
ensureOutboundsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, outbounds_);
onChanged();
} else {
outboundsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
public Builder clearOutbounds() {
if (outboundsBuilder_ == null) {
outbounds_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
outboundsBuilder_.clear();
}
return this;
}
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
public Builder removeOutbounds(int index) {
if (outboundsBuilder_ == null) {
ensureOutboundsIsMutable();
outbounds_.remove(index);
onChanged();
} else {
outboundsBuilder_.remove(index);
}
return this;
}
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.Builder getOutboundsBuilder(
int index) {
return getOutboundsFieldBuilder().getBuilder(index);
}
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRuleOrBuilder getOutboundsOrBuilder(
int index) {
if (outboundsBuilder_ == null) {
return outbounds_.get(index); } else {
return outboundsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
public java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRuleOrBuilder>
getOutboundsOrBuilderList() {
if (outboundsBuilder_ != null) {
return outboundsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(outbounds_);
}
}
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.Builder addOutboundsBuilder() {
return getOutboundsFieldBuilder().addBuilder(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.getDefaultInstance());
}
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.Builder addOutboundsBuilder(
int index) {
return getOutboundsFieldBuilder().addBuilder(
index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.getDefaultInstance());
}
/**
*
* deprecated
*
*
* repeated .v1.CbRule outbounds = 8;
*/
public java.util.List
getOutboundsBuilderList() {
return getOutboundsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRuleOrBuilder>
getOutboundsFieldBuilder() {
if (outboundsBuilder_ == null) {
outboundsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRuleOrBuilder>(
outbounds_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
outbounds_ = null;
}
return outboundsBuilder_;
}
private com.google.protobuf.StringValue token_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> tokenBuilder_;
/**
*
* deprecated
*
*
* .google.protobuf.StringValue token = 9;
* @return Whether the token field is set.
*/
public boolean hasToken() {
return tokenBuilder_ != null || token_ != null;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue token = 9;
* @return The token.
*/
public com.google.protobuf.StringValue getToken() {
if (tokenBuilder_ == null) {
return token_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : token_;
} else {
return tokenBuilder_.getMessage();
}
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue token = 9;
*/
public Builder setToken(com.google.protobuf.StringValue value) {
if (tokenBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
token_ = value;
onChanged();
} else {
tokenBuilder_.setMessage(value);
}
return this;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue token = 9;
*/
public Builder setToken(
com.google.protobuf.StringValue.Builder builderForValue) {
if (tokenBuilder_ == null) {
token_ = builderForValue.build();
onChanged();
} else {
tokenBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue token = 9;
*/
public Builder mergeToken(com.google.protobuf.StringValue value) {
if (tokenBuilder_ == null) {
if (token_ != null) {
token_ =
com.google.protobuf.StringValue.newBuilder(token_).mergeFrom(value).buildPartial();
} else {
token_ = value;
}
onChanged();
} else {
tokenBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue token = 9;
*/
public Builder clearToken() {
if (tokenBuilder_ == null) {
token_ = null;
onChanged();
} else {
token_ = null;
tokenBuilder_ = null;
}
return this;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue token = 9;
*/
public com.google.protobuf.StringValue.Builder getTokenBuilder() {
onChanged();
return getTokenFieldBuilder().getBuilder();
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue token = 9;
*/
public com.google.protobuf.StringValueOrBuilder getTokenOrBuilder() {
if (tokenBuilder_ != null) {
return tokenBuilder_.getMessageOrBuilder();
} else {
return token_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : token_;
}
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue token = 9;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>
getTokenFieldBuilder() {
if (tokenBuilder_ == null) {
tokenBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>(
getToken(),
getParentForChildren(),
isClean());
token_ = null;
}
return tokenBuilder_;
}
private com.google.protobuf.StringValue owners_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> ownersBuilder_;
/**
*
* deprecated
*
*
* .google.protobuf.StringValue owners = 10;
* @return Whether the owners field is set.
*/
public boolean hasOwners() {
return ownersBuilder_ != null || owners_ != null;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue owners = 10;
* @return The owners.
*/
public com.google.protobuf.StringValue getOwners() {
if (ownersBuilder_ == null) {
return owners_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : owners_;
} else {
return ownersBuilder_.getMessage();
}
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue owners = 10;
*/
public Builder setOwners(com.google.protobuf.StringValue value) {
if (ownersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
owners_ = value;
onChanged();
} else {
ownersBuilder_.setMessage(value);
}
return this;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue owners = 10;
*/
public Builder setOwners(
com.google.protobuf.StringValue.Builder builderForValue) {
if (ownersBuilder_ == null) {
owners_ = builderForValue.build();
onChanged();
} else {
ownersBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue owners = 10;
*/
public Builder mergeOwners(com.google.protobuf.StringValue value) {
if (ownersBuilder_ == null) {
if (owners_ != null) {
owners_ =
com.google.protobuf.StringValue.newBuilder(owners_).mergeFrom(value).buildPartial();
} else {
owners_ = value;
}
onChanged();
} else {
ownersBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue owners = 10;
*/
public Builder clearOwners() {
if (ownersBuilder_ == null) {
owners_ = null;
onChanged();
} else {
owners_ = null;
ownersBuilder_ = null;
}
return this;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue owners = 10;
*/
public com.google.protobuf.StringValue.Builder getOwnersBuilder() {
onChanged();
return getOwnersFieldBuilder().getBuilder();
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue owners = 10;
*/
public com.google.protobuf.StringValueOrBuilder getOwnersOrBuilder() {
if (ownersBuilder_ != null) {
return ownersBuilder_.getMessageOrBuilder();
} else {
return owners_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : owners_;
}
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue owners = 10;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>
getOwnersFieldBuilder() {
if (ownersBuilder_ == null) {
ownersBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>(
getOwners(),
getParentForChildren(),
isClean());
owners_ = null;
}
return ownersBuilder_;
}
private com.google.protobuf.StringValue business_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> businessBuilder_;
/**
*
* 业务
* deprecated
*
*
* .google.protobuf.StringValue business = 11;
* @return Whether the business field is set.
*/
public boolean hasBusiness() {
return businessBuilder_ != null || business_ != null;
}
/**
*
* 业务
* deprecated
*
*
* .google.protobuf.StringValue business = 11;
* @return The business.
*/
public com.google.protobuf.StringValue getBusiness() {
if (businessBuilder_ == null) {
return business_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : business_;
} else {
return businessBuilder_.getMessage();
}
}
/**
*
* 业务
* deprecated
*
*
* .google.protobuf.StringValue business = 11;
*/
public Builder setBusiness(com.google.protobuf.StringValue value) {
if (businessBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
business_ = value;
onChanged();
} else {
businessBuilder_.setMessage(value);
}
return this;
}
/**
*
* 业务
* deprecated
*
*
* .google.protobuf.StringValue business = 11;
*/
public Builder setBusiness(
com.google.protobuf.StringValue.Builder builderForValue) {
if (businessBuilder_ == null) {
business_ = builderForValue.build();
onChanged();
} else {
businessBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 业务
* deprecated
*
*
* .google.protobuf.StringValue business = 11;
*/
public Builder mergeBusiness(com.google.protobuf.StringValue value) {
if (businessBuilder_ == null) {
if (business_ != null) {
business_ =
com.google.protobuf.StringValue.newBuilder(business_).mergeFrom(value).buildPartial();
} else {
business_ = value;
}
onChanged();
} else {
businessBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 业务
* deprecated
*
*
* .google.protobuf.StringValue business = 11;
*/
public Builder clearBusiness() {
if (businessBuilder_ == null) {
business_ = null;
onChanged();
} else {
business_ = null;
businessBuilder_ = null;
}
return this;
}
/**
*
* 业务
* deprecated
*
*
* .google.protobuf.StringValue business = 11;
*/
public com.google.protobuf.StringValue.Builder getBusinessBuilder() {
onChanged();
return getBusinessFieldBuilder().getBuilder();
}
/**
*
* 业务
* deprecated
*
*
* .google.protobuf.StringValue business = 11;
*/
public com.google.protobuf.StringValueOrBuilder getBusinessOrBuilder() {
if (businessBuilder_ != null) {
return businessBuilder_.getMessageOrBuilder();
} else {
return business_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : business_;
}
}
/**
*
* 业务
* deprecated
*
*
* .google.protobuf.StringValue business = 11;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>
getBusinessFieldBuilder() {
if (businessBuilder_ == null) {
businessBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>(
getBusiness(),
getParentForChildren(),
isClean());
business_ = null;
}
return businessBuilder_;
}
private com.google.protobuf.StringValue department_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> departmentBuilder_;
/**
*
* 部门
* deprecated
*
*
* .google.protobuf.StringValue department = 12;
* @return Whether the department field is set.
*/
public boolean hasDepartment() {
return departmentBuilder_ != null || department_ != null;
}
/**
*
* 部门
* deprecated
*
*
* .google.protobuf.StringValue department = 12;
* @return The department.
*/
public com.google.protobuf.StringValue getDepartment() {
if (departmentBuilder_ == null) {
return department_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : department_;
} else {
return departmentBuilder_.getMessage();
}
}
/**
*
* 部门
* deprecated
*
*
* .google.protobuf.StringValue department = 12;
*/
public Builder setDepartment(com.google.protobuf.StringValue value) {
if (departmentBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
department_ = value;
onChanged();
} else {
departmentBuilder_.setMessage(value);
}
return this;
}
/**
*
* 部门
* deprecated
*
*
* .google.protobuf.StringValue department = 12;
*/
public Builder setDepartment(
com.google.protobuf.StringValue.Builder builderForValue) {
if (departmentBuilder_ == null) {
department_ = builderForValue.build();
onChanged();
} else {
departmentBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 部门
* deprecated
*
*
* .google.protobuf.StringValue department = 12;
*/
public Builder mergeDepartment(com.google.protobuf.StringValue value) {
if (departmentBuilder_ == null) {
if (department_ != null) {
department_ =
com.google.protobuf.StringValue.newBuilder(department_).mergeFrom(value).buildPartial();
} else {
department_ = value;
}
onChanged();
} else {
departmentBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 部门
* deprecated
*
*
* .google.protobuf.StringValue department = 12;
*/
public Builder clearDepartment() {
if (departmentBuilder_ == null) {
department_ = null;
onChanged();
} else {
department_ = null;
departmentBuilder_ = null;
}
return this;
}
/**
*
* 部门
* deprecated
*
*
* .google.protobuf.StringValue department = 12;
*/
public com.google.protobuf.StringValue.Builder getDepartmentBuilder() {
onChanged();
return getDepartmentFieldBuilder().getBuilder();
}
/**
*
* 部门
* deprecated
*
*
* .google.protobuf.StringValue department = 12;
*/
public com.google.protobuf.StringValueOrBuilder getDepartmentOrBuilder() {
if (departmentBuilder_ != null) {
return departmentBuilder_.getMessageOrBuilder();
} else {
return department_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : department_;
}
}
/**
*
* 部门
* deprecated
*
*
* .google.protobuf.StringValue department = 12;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>
getDepartmentFieldBuilder() {
if (departmentBuilder_ == null) {
departmentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>(
getDepartment(),
getParentForChildren(),
isClean());
department_ = null;
}
return departmentBuilder_;
}
private com.google.protobuf.StringValue comment_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> commentBuilder_;
/**
*
* 规则描述
* deprecated
*
*
* .google.protobuf.StringValue comment = 13;
* @return Whether the comment field is set.
*/
public boolean hasComment() {
return commentBuilder_ != null || comment_ != null;
}
/**
*
* 规则描述
* deprecated
*
*
* .google.protobuf.StringValue comment = 13;
* @return The comment.
*/
public com.google.protobuf.StringValue getComment() {
if (commentBuilder_ == null) {
return comment_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : comment_;
} else {
return commentBuilder_.getMessage();
}
}
/**
*
* 规则描述
* deprecated
*
*
* .google.protobuf.StringValue comment = 13;
*/
public Builder setComment(com.google.protobuf.StringValue value) {
if (commentBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
comment_ = value;
onChanged();
} else {
commentBuilder_.setMessage(value);
}
return this;
}
/**
*
* 规则描述
* deprecated
*
*
* .google.protobuf.StringValue comment = 13;
*/
public Builder setComment(
com.google.protobuf.StringValue.Builder builderForValue) {
if (commentBuilder_ == null) {
comment_ = builderForValue.build();
onChanged();
} else {
commentBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 规则描述
* deprecated
*
*
* .google.protobuf.StringValue comment = 13;
*/
public Builder mergeComment(com.google.protobuf.StringValue value) {
if (commentBuilder_ == null) {
if (comment_ != null) {
comment_ =
com.google.protobuf.StringValue.newBuilder(comment_).mergeFrom(value).buildPartial();
} else {
comment_ = value;
}
onChanged();
} else {
commentBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 规则描述
* deprecated
*
*
* .google.protobuf.StringValue comment = 13;
*/
public Builder clearComment() {
if (commentBuilder_ == null) {
comment_ = null;
onChanged();
} else {
comment_ = null;
commentBuilder_ = null;
}
return this;
}
/**
*
* 规则描述
* deprecated
*
*
* .google.protobuf.StringValue comment = 13;
*/
public com.google.protobuf.StringValue.Builder getCommentBuilder() {
onChanged();
return getCommentFieldBuilder().getBuilder();
}
/**
*
* 规则描述
* deprecated
*
*
* .google.protobuf.StringValue comment = 13;
*/
public com.google.protobuf.StringValueOrBuilder getCommentOrBuilder() {
if (commentBuilder_ != null) {
return commentBuilder_.getMessageOrBuilder();
} else {
return comment_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : comment_;
}
}
/**
*
* 规则描述
* deprecated
*
*
* .google.protobuf.StringValue comment = 13;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>
getCommentFieldBuilder() {
if (commentBuilder_ == null) {
commentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>(
getComment(),
getParentForChildren(),
isClean());
comment_ = null;
}
return commentBuilder_;
}
private com.google.protobuf.StringValue ctime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> ctimeBuilder_;
/**
*
* deprecated
*
*
* .google.protobuf.StringValue ctime = 14;
* @return Whether the ctime field is set.
*/
public boolean hasCtime() {
return ctimeBuilder_ != null || ctime_ != null;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue ctime = 14;
* @return The ctime.
*/
public com.google.protobuf.StringValue getCtime() {
if (ctimeBuilder_ == null) {
return ctime_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : ctime_;
} else {
return ctimeBuilder_.getMessage();
}
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue ctime = 14;
*/
public Builder setCtime(com.google.protobuf.StringValue value) {
if (ctimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ctime_ = value;
onChanged();
} else {
ctimeBuilder_.setMessage(value);
}
return this;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue ctime = 14;
*/
public Builder setCtime(
com.google.protobuf.StringValue.Builder builderForValue) {
if (ctimeBuilder_ == null) {
ctime_ = builderForValue.build();
onChanged();
} else {
ctimeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue ctime = 14;
*/
public Builder mergeCtime(com.google.protobuf.StringValue value) {
if (ctimeBuilder_ == null) {
if (ctime_ != null) {
ctime_ =
com.google.protobuf.StringValue.newBuilder(ctime_).mergeFrom(value).buildPartial();
} else {
ctime_ = value;
}
onChanged();
} else {
ctimeBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue ctime = 14;
*/
public Builder clearCtime() {
if (ctimeBuilder_ == null) {
ctime_ = null;
onChanged();
} else {
ctime_ = null;
ctimeBuilder_ = null;
}
return this;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue ctime = 14;
*/
public com.google.protobuf.StringValue.Builder getCtimeBuilder() {
onChanged();
return getCtimeFieldBuilder().getBuilder();
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue ctime = 14;
*/
public com.google.protobuf.StringValueOrBuilder getCtimeOrBuilder() {
if (ctimeBuilder_ != null) {
return ctimeBuilder_.getMessageOrBuilder();
} else {
return ctime_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : ctime_;
}
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue ctime = 14;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>
getCtimeFieldBuilder() {
if (ctimeBuilder_ == null) {
ctimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>(
getCtime(),
getParentForChildren(),
isClean());
ctime_ = null;
}
return ctimeBuilder_;
}
private com.google.protobuf.StringValue mtime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> mtimeBuilder_;
/**
*
* deprecated
*
*
* .google.protobuf.StringValue mtime = 15;
* @return Whether the mtime field is set.
*/
public boolean hasMtime() {
return mtimeBuilder_ != null || mtime_ != null;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue mtime = 15;
* @return The mtime.
*/
public com.google.protobuf.StringValue getMtime() {
if (mtimeBuilder_ == null) {
return mtime_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : mtime_;
} else {
return mtimeBuilder_.getMessage();
}
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue mtime = 15;
*/
public Builder setMtime(com.google.protobuf.StringValue value) {
if (mtimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
mtime_ = value;
onChanged();
} else {
mtimeBuilder_.setMessage(value);
}
return this;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue mtime = 15;
*/
public Builder setMtime(
com.google.protobuf.StringValue.Builder builderForValue) {
if (mtimeBuilder_ == null) {
mtime_ = builderForValue.build();
onChanged();
} else {
mtimeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue mtime = 15;
*/
public Builder mergeMtime(com.google.protobuf.StringValue value) {
if (mtimeBuilder_ == null) {
if (mtime_ != null) {
mtime_ =
com.google.protobuf.StringValue.newBuilder(mtime_).mergeFrom(value).buildPartial();
} else {
mtime_ = value;
}
onChanged();
} else {
mtimeBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue mtime = 15;
*/
public Builder clearMtime() {
if (mtimeBuilder_ == null) {
mtime_ = null;
onChanged();
} else {
mtime_ = null;
mtimeBuilder_ = null;
}
return this;
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue mtime = 15;
*/
public com.google.protobuf.StringValue.Builder getMtimeBuilder() {
onChanged();
return getMtimeFieldBuilder().getBuilder();
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue mtime = 15;
*/
public com.google.protobuf.StringValueOrBuilder getMtimeOrBuilder() {
if (mtimeBuilder_ != null) {
return mtimeBuilder_.getMessageOrBuilder();
} else {
return mtime_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : mtime_;
}
}
/**
*
* deprecated
*
*
* .google.protobuf.StringValue mtime = 15;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>
getMtimeFieldBuilder() {
if (mtimeBuilder_ == null) {
mtimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>(
getMtime(),
getParentForChildren(),
isClean());
mtime_ = null;
}
return mtimeBuilder_;
}
private com.google.protobuf.StringValue revision_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> revisionBuilder_;
/**
* .google.protobuf.StringValue revision = 16;
* @return Whether the revision field is set.
*/
public boolean hasRevision() {
return revisionBuilder_ != null || revision_ != null;
}
/**
* .google.protobuf.StringValue revision = 16;
* @return The revision.
*/
public com.google.protobuf.StringValue getRevision() {
if (revisionBuilder_ == null) {
return revision_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : revision_;
} else {
return revisionBuilder_.getMessage();
}
}
/**
* .google.protobuf.StringValue revision = 16;
*/
public Builder setRevision(com.google.protobuf.StringValue value) {
if (revisionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
revision_ = value;
onChanged();
} else {
revisionBuilder_.setMessage(value);
}
return this;
}
/**
* .google.protobuf.StringValue revision = 16;
*/
public Builder setRevision(
com.google.protobuf.StringValue.Builder builderForValue) {
if (revisionBuilder_ == null) {
revision_ = builderForValue.build();
onChanged();
} else {
revisionBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .google.protobuf.StringValue revision = 16;
*/
public Builder mergeRevision(com.google.protobuf.StringValue value) {
if (revisionBuilder_ == null) {
if (revision_ != null) {
revision_ =
com.google.protobuf.StringValue.newBuilder(revision_).mergeFrom(value).buildPartial();
} else {
revision_ = value;
}
onChanged();
} else {
revisionBuilder_.mergeFrom(value);
}
return this;
}
/**
* .google.protobuf.StringValue revision = 16;
*/
public Builder clearRevision() {
if (revisionBuilder_ == null) {
revision_ = null;
onChanged();
} else {
revision_ = null;
revisionBuilder_ = null;
}
return this;
}
/**
* .google.protobuf.StringValue revision = 16;
*/
public com.google.protobuf.StringValue.Builder getRevisionBuilder() {
onChanged();
return getRevisionFieldBuilder().getBuilder();
}
/**
* .google.protobuf.StringValue revision = 16;
*/
public com.google.protobuf.StringValueOrBuilder getRevisionOrBuilder() {
if (revisionBuilder_ != null) {
return revisionBuilder_.getMessageOrBuilder();
} else {
return revision_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : revision_;
}
}
/**
* .google.protobuf.StringValue revision = 16;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>
getRevisionFieldBuilder() {
if (revisionBuilder_ == null) {
revisionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>(
getRevision(),
getParentForChildren(),
isClean());
revision_ = null;
}
return revisionBuilder_;
}
private java.util.List rules_ =
java.util.Collections.emptyList();
private void ensureRulesIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
rules_ = new java.util.ArrayList(rules_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRuleOrBuilder> rulesBuilder_;
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
public java.util.List getRulesList() {
if (rulesBuilder_ == null) {
return java.util.Collections.unmodifiableList(rules_);
} else {
return rulesBuilder_.getMessageList();
}
}
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
public int getRulesCount() {
if (rulesBuilder_ == null) {
return rules_.size();
} else {
return rulesBuilder_.getCount();
}
}
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule getRules(int index) {
if (rulesBuilder_ == null) {
return rules_.get(index);
} else {
return rulesBuilder_.getMessage(index);
}
}
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
public Builder setRules(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule value) {
if (rulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRulesIsMutable();
rules_.set(index, value);
onChanged();
} else {
rulesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
public Builder setRules(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule.Builder builderForValue) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
rules_.set(index, builderForValue.build());
onChanged();
} else {
rulesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
public Builder addRules(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule value) {
if (rulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRulesIsMutable();
rules_.add(value);
onChanged();
} else {
rulesBuilder_.addMessage(value);
}
return this;
}
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
public Builder addRules(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule value) {
if (rulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRulesIsMutable();
rules_.add(index, value);
onChanged();
} else {
rulesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
public Builder addRules(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule.Builder builderForValue) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
rules_.add(builderForValue.build());
onChanged();
} else {
rulesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
public Builder addRules(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule.Builder builderForValue) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
rules_.add(index, builderForValue.build());
onChanged();
} else {
rulesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
public Builder addAllRules(
java.lang.Iterable extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule> values) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, rules_);
onChanged();
} else {
rulesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
public Builder clearRules() {
if (rulesBuilder_ == null) {
rules_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
rulesBuilder_.clear();
}
return this;
}
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
public Builder removeRules(int index) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
rules_.remove(index);
onChanged();
} else {
rulesBuilder_.remove(index);
}
return this;
}
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule.Builder getRulesBuilder(
int index) {
return getRulesFieldBuilder().getBuilder(index);
}
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRuleOrBuilder getRulesOrBuilder(
int index) {
if (rulesBuilder_ == null) {
return rules_.get(index); } else {
return rulesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
public java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRuleOrBuilder>
getRulesOrBuilderList() {
if (rulesBuilder_ != null) {
return rulesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(rules_);
}
}
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule.Builder addRulesBuilder() {
return getRulesFieldBuilder().addBuilder(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule.getDefaultInstance());
}
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule.Builder addRulesBuilder(
int index) {
return getRulesFieldBuilder().addBuilder(
index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule.getDefaultInstance());
}
/**
*
* circuitbreaker rules for current service
*
*
* repeated .v1.CircuitBreakerRule rules = 21;
*/
public java.util.List
getRulesBuilderList() {
return getRulesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRuleOrBuilder>
getRulesFieldBuilder() {
if (rulesBuilder_ == null) {
rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRuleOrBuilder>(
rules_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
rules_ = null;
}
return rulesBuilder_;
}
@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:v1.CircuitBreaker)
}
// @@protoc_insertion_point(class_scope:v1.CircuitBreaker)
private static final com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker();
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CircuitBreaker 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreaker getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SourceMatcherOrBuilder extends
// @@protoc_insertion_point(interface_extends:v1.SourceMatcher)
com.google.protobuf.MessageOrBuilder {
/**
*
* 主调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
* @return Whether the service field is set.
*/
boolean hasService();
/**
*
* 主调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
* @return The service.
*/
com.google.protobuf.StringValue getService();
/**
*
* 主调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
*/
com.google.protobuf.StringValueOrBuilder getServiceOrBuilder();
/**
* .google.protobuf.StringValue namespace = 2;
* @return Whether the namespace field is set.
*/
boolean hasNamespace();
/**
* .google.protobuf.StringValue namespace = 2;
* @return The namespace.
*/
com.google.protobuf.StringValue getNamespace();
/**
* .google.protobuf.StringValue namespace = 2;
*/
com.google.protobuf.StringValueOrBuilder getNamespaceOrBuilder();
/**
*
* 可选,主调业务标签,用于匹配是否使用该熔断规则,可放置用户的接口信息等
*
*
* map<string, .v1.MatchString> labels = 3;
*/
int getLabelsCount();
/**
*
* 可选,主调业务标签,用于匹配是否使用该熔断规则,可放置用户的接口信息等
*
*
* map<string, .v1.MatchString> labels = 3;
*/
boolean containsLabels(
java.lang.String key);
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getLabels();
/**
*
* 可选,主调业务标签,用于匹配是否使用该熔断规则,可放置用户的接口信息等
*
*
* map<string, .v1.MatchString> labels = 3;
*/
java.util.Map
getLabelsMap();
/**
*
* 可选,主调业务标签,用于匹配是否使用该熔断规则,可放置用户的接口信息等
*
*
* map<string, .v1.MatchString> labels = 3;
*/
/* nullable */
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString getLabelsOrDefault(
java.lang.String key,
/* nullable */
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString defaultValue);
/**
*
* 可选,主调业务标签,用于匹配是否使用该熔断规则,可放置用户的接口信息等
*
*
* map<string, .v1.MatchString> labels = 3;
*/
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString getLabelsOrThrow(
java.lang.String key);
}
/**
*
* 主调匹配规则
*
*
* Protobuf type {@code v1.SourceMatcher}
*/
public static final class SourceMatcher extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:v1.SourceMatcher)
SourceMatcherOrBuilder {
private static final long serialVersionUID = 0L;
// Use SourceMatcher.newBuilder() to construct.
private SourceMatcher(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SourceMatcher() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SourceMatcher();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_SourceMatcher_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 3:
return internalGetLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_SourceMatcher_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher.Builder.class);
}
public static final int SERVICE_FIELD_NUMBER = 1;
private com.google.protobuf.StringValue service_;
/**
*
* 主调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
* @return Whether the service field is set.
*/
@java.lang.Override
public boolean hasService() {
return service_ != null;
}
/**
*
* 主调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
* @return The service.
*/
@java.lang.Override
public com.google.protobuf.StringValue getService() {
return service_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : service_;
}
/**
*
* 主调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getServiceOrBuilder() {
return getService();
}
public static final int NAMESPACE_FIELD_NUMBER = 2;
private com.google.protobuf.StringValue namespace_;
/**
* .google.protobuf.StringValue namespace = 2;
* @return Whether the namespace field is set.
*/
@java.lang.Override
public boolean hasNamespace() {
return namespace_ != null;
}
/**
* .google.protobuf.StringValue namespace = 2;
* @return The namespace.
*/
@java.lang.Override
public com.google.protobuf.StringValue getNamespace() {
return namespace_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : namespace_;
}
/**
* .google.protobuf.StringValue namespace = 2;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getNamespaceOrBuilder() {
return getNamespace();
}
public static final int LABELS_FIELD_NUMBER = 3;
private static final class LabelsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_SourceMatcher_LabelsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.String, com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString> labels_;
private com.google.protobuf.MapField
internalGetLabels() {
if (labels_ == null) {
return com.google.protobuf.MapField.emptyMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
*
* 可选,主调业务标签,用于匹配是否使用该熔断规则,可放置用户的接口信息等
*
*
* map<string, .v1.MatchString> labels = 3;
*/
@java.lang.Override
public boolean containsLabels(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetLabels().getMap().containsKey(key);
}
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getLabels() {
return getLabelsMap();
}
/**
*
* 可选,主调业务标签,用于匹配是否使用该熔断规则,可放置用户的接口信息等
*
*
* map<string, .v1.MatchString> labels = 3;
*/
@java.lang.Override
public java.util.Map getLabelsMap() {
return internalGetLabels().getMap();
}
/**
*
* 可选,主调业务标签,用于匹配是否使用该熔断规则,可放置用户的接口信息等
*
*
* map<string, .v1.MatchString> labels = 3;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString getLabelsOrDefault(
java.lang.String key,
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* 可选,主调业务标签,用于匹配是否使用该熔断规则,可放置用户的接口信息等
*
*
* map<string, .v1.MatchString> labels = 3;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString getLabelsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (service_ != null) {
output.writeMessage(1, getService());
}
if (namespace_ != null) {
output.writeMessage(2, getNamespace());
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetLabels(),
LabelsDefaultEntryHolder.defaultEntry,
3);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (service_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getService());
}
if (namespace_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getNamespace());
}
for (java.util.Map.Entry entry
: internalGetLabels().getMap().entrySet()) {
com.google.protobuf.MapEntry
labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, labels__);
}
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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher)) {
return super.equals(obj);
}
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher other = (com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher) obj;
if (hasService() != other.hasService()) return false;
if (hasService()) {
if (!getService()
.equals(other.getService())) return false;
}
if (hasNamespace() != other.hasNamespace()) return false;
if (hasNamespace()) {
if (!getNamespace()
.equals(other.getNamespace())) return false;
}
if (!internalGetLabels().equals(
other.internalGetLabels())) 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 (hasService()) {
hash = (37 * hash) + SERVICE_FIELD_NUMBER;
hash = (53 * hash) + getService().hashCode();
}
if (hasNamespace()) {
hash = (37 * hash) + NAMESPACE_FIELD_NUMBER;
hash = (53 * hash) + getNamespace().hashCode();
}
if (!internalGetLabels().getMap().isEmpty()) {
hash = (37 * hash) + LABELS_FIELD_NUMBER;
hash = (53 * hash) + internalGetLabels().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher 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(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher 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 v1.SourceMatcher}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:v1.SourceMatcher)
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcherOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_SourceMatcher_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 3:
return internalGetLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 3:
return internalGetMutableLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_SourceMatcher_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher.Builder.class);
}
// Construct using com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
if (serviceBuilder_ == null) {
service_ = null;
} else {
service_ = null;
serviceBuilder_ = null;
}
if (namespaceBuilder_ == null) {
namespace_ = null;
} else {
namespace_ = null;
namespaceBuilder_ = null;
}
internalGetMutableLabels().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_SourceMatcher_descriptor;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher getDefaultInstanceForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher.getDefaultInstance();
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher build() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher buildPartial() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher result = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher(this);
int from_bitField0_ = bitField0_;
if (serviceBuilder_ == null) {
result.service_ = service_;
} else {
result.service_ = serviceBuilder_.build();
}
if (namespaceBuilder_ == null) {
result.namespace_ = namespace_;
} else {
result.namespace_ = namespaceBuilder_.build();
}
result.labels_ = internalGetLabels();
result.labels_.makeImmutable();
onBuilt();
return result;
}
@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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher) {
return mergeFrom((com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher other) {
if (other == com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher.getDefaultInstance()) return this;
if (other.hasService()) {
mergeService(other.getService());
}
if (other.hasNamespace()) {
mergeNamespace(other.getNamespace());
}
internalGetMutableLabels().mergeFrom(
other.internalGetLabels());
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(
getServiceFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 10
case 18: {
input.readMessage(
getNamespaceFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 18
case 26: {
com.google.protobuf.MapEntry
labels__ = input.readMessage(
LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableLabels().getMutableMap().put(
labels__.getKey(), labels__.getValue());
break;
} // case 26
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 service_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> serviceBuilder_;
/**
*
* 主调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
* @return Whether the service field is set.
*/
public boolean hasService() {
return serviceBuilder_ != null || service_ != null;
}
/**
*
* 主调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
* @return The service.
*/
public com.google.protobuf.StringValue getService() {
if (serviceBuilder_ == null) {
return service_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : service_;
} else {
return serviceBuilder_.getMessage();
}
}
/**
*
* 主调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
*/
public Builder setService(com.google.protobuf.StringValue value) {
if (serviceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
service_ = value;
onChanged();
} else {
serviceBuilder_.setMessage(value);
}
return this;
}
/**
*
* 主调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
*/
public Builder setService(
com.google.protobuf.StringValue.Builder builderForValue) {
if (serviceBuilder_ == null) {
service_ = builderForValue.build();
onChanged();
} else {
serviceBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 主调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
*/
public Builder mergeService(com.google.protobuf.StringValue value) {
if (serviceBuilder_ == null) {
if (service_ != null) {
service_ =
com.google.protobuf.StringValue.newBuilder(service_).mergeFrom(value).buildPartial();
} else {
service_ = value;
}
onChanged();
} else {
serviceBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 主调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
*/
public Builder clearService() {
if (serviceBuilder_ == null) {
service_ = null;
onChanged();
} else {
service_ = null;
serviceBuilder_ = null;
}
return this;
}
/**
*
* 主调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
*/
public com.google.protobuf.StringValue.Builder getServiceBuilder() {
onChanged();
return getServiceFieldBuilder().getBuilder();
}
/**
*
* 主调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
*/
public com.google.protobuf.StringValueOrBuilder getServiceOrBuilder() {
if (serviceBuilder_ != null) {
return serviceBuilder_.getMessageOrBuilder();
} else {
return service_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : service_;
}
}
/**
*
* 主调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>
getServiceFieldBuilder() {
if (serviceBuilder_ == null) {
serviceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>(
getService(),
getParentForChildren(),
isClean());
service_ = null;
}
return serviceBuilder_;
}
private com.google.protobuf.StringValue namespace_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> namespaceBuilder_;
/**
* .google.protobuf.StringValue namespace = 2;
* @return Whether the namespace field is set.
*/
public boolean hasNamespace() {
return namespaceBuilder_ != null || namespace_ != null;
}
/**
* .google.protobuf.StringValue namespace = 2;
* @return The namespace.
*/
public com.google.protobuf.StringValue getNamespace() {
if (namespaceBuilder_ == null) {
return namespace_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : namespace_;
} else {
return namespaceBuilder_.getMessage();
}
}
/**
* .google.protobuf.StringValue namespace = 2;
*/
public Builder setNamespace(com.google.protobuf.StringValue value) {
if (namespaceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
namespace_ = value;
onChanged();
} else {
namespaceBuilder_.setMessage(value);
}
return this;
}
/**
* .google.protobuf.StringValue namespace = 2;
*/
public Builder setNamespace(
com.google.protobuf.StringValue.Builder builderForValue) {
if (namespaceBuilder_ == null) {
namespace_ = builderForValue.build();
onChanged();
} else {
namespaceBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .google.protobuf.StringValue namespace = 2;
*/
public Builder mergeNamespace(com.google.protobuf.StringValue value) {
if (namespaceBuilder_ == null) {
if (namespace_ != null) {
namespace_ =
com.google.protobuf.StringValue.newBuilder(namespace_).mergeFrom(value).buildPartial();
} else {
namespace_ = value;
}
onChanged();
} else {
namespaceBuilder_.mergeFrom(value);
}
return this;
}
/**
* .google.protobuf.StringValue namespace = 2;
*/
public Builder clearNamespace() {
if (namespaceBuilder_ == null) {
namespace_ = null;
onChanged();
} else {
namespace_ = null;
namespaceBuilder_ = null;
}
return this;
}
/**
* .google.protobuf.StringValue namespace = 2;
*/
public com.google.protobuf.StringValue.Builder getNamespaceBuilder() {
onChanged();
return getNamespaceFieldBuilder().getBuilder();
}
/**
* .google.protobuf.StringValue namespace = 2;
*/
public com.google.protobuf.StringValueOrBuilder getNamespaceOrBuilder() {
if (namespaceBuilder_ != null) {
return namespaceBuilder_.getMessageOrBuilder();
} else {
return namespace_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : namespace_;
}
}
/**
* .google.protobuf.StringValue namespace = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>
getNamespaceFieldBuilder() {
if (namespaceBuilder_ == null) {
namespaceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>(
getNamespace(),
getParentForChildren(),
isClean());
namespace_ = null;
}
return namespaceBuilder_;
}
private com.google.protobuf.MapField<
java.lang.String, com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString> labels_;
private com.google.protobuf.MapField
internalGetLabels() {
if (labels_ == null) {
return com.google.protobuf.MapField.emptyMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
private com.google.protobuf.MapField
internalGetMutableLabels() {
onChanged();;
if (labels_ == null) {
labels_ = com.google.protobuf.MapField.newMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
if (!labels_.isMutable()) {
labels_ = labels_.copy();
}
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
*
* 可选,主调业务标签,用于匹配是否使用该熔断规则,可放置用户的接口信息等
*
*
* map<string, .v1.MatchString> labels = 3;
*/
@java.lang.Override
public boolean containsLabels(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetLabels().getMap().containsKey(key);
}
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getLabels() {
return getLabelsMap();
}
/**
*
* 可选,主调业务标签,用于匹配是否使用该熔断规则,可放置用户的接口信息等
*
*
* map<string, .v1.MatchString> labels = 3;
*/
@java.lang.Override
public java.util.Map getLabelsMap() {
return internalGetLabels().getMap();
}
/**
*
* 可选,主调业务标签,用于匹配是否使用该熔断规则,可放置用户的接口信息等
*
*
* map<string, .v1.MatchString> labels = 3;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString getLabelsOrDefault(
java.lang.String key,
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* 可选,主调业务标签,用于匹配是否使用该熔断规则,可放置用户的接口信息等
*
*
* map<string, .v1.MatchString> labels = 3;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString getLabelsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearLabels() {
internalGetMutableLabels().getMutableMap()
.clear();
return this;
}
/**
*
* 可选,主调业务标签,用于匹配是否使用该熔断规则,可放置用户的接口信息等
*
*
* map<string, .v1.MatchString> labels = 3;
*/
public Builder removeLabels(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableLabels().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableLabels() {
return internalGetMutableLabels().getMutableMap();
}
/**
*
* 可选,主调业务标签,用于匹配是否使用该熔断规则,可放置用户的接口信息等
*
*
* map<string, .v1.MatchString> labels = 3;
*/
public Builder putLabels(
java.lang.String key,
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) {
throw new NullPointerException("map value");
}
internalGetMutableLabels().getMutableMap()
.put(key, value);
return this;
}
/**
*
* 可选,主调业务标签,用于匹配是否使用该熔断规则,可放置用户的接口信息等
*
*
* map<string, .v1.MatchString> labels = 3;
*/
public Builder putAllLabels(
java.util.Map values) {
internalGetMutableLabels().getMutableMap()
.putAll(values);
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:v1.SourceMatcher)
}
// @@protoc_insertion_point(class_scope:v1.SourceMatcher)
private static final com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher();
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SourceMatcher 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface RecoverConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:v1.RecoverConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
* 触发熔断后到半开状态之间的等待间隔
*
*
* .google.protobuf.Duration sleepWindow = 1;
* @return Whether the sleepWindow field is set.
*/
boolean hasSleepWindow();
/**
*
* 触发熔断后到半开状态之间的等待间隔
*
*
* .google.protobuf.Duration sleepWindow = 1;
* @return The sleepWindow.
*/
com.google.protobuf.Duration getSleepWindow();
/**
*
* 触发熔断后到半开状态之间的等待间隔
*
*
* .google.protobuf.Duration sleepWindow = 1;
*/
com.google.protobuf.DurationOrBuilder getSleepWindowOrBuilder();
/**
*
* 半开后,最多重试多少次恢复
*
*
* .google.protobuf.UInt32Value maxRetryAfterHalfOpen = 2;
* @return Whether the maxRetryAfterHalfOpen field is set.
*/
boolean hasMaxRetryAfterHalfOpen();
/**
*
* 半开后,最多重试多少次恢复
*
*
* .google.protobuf.UInt32Value maxRetryAfterHalfOpen = 2;
* @return The maxRetryAfterHalfOpen.
*/
com.google.protobuf.UInt32Value getMaxRetryAfterHalfOpen();
/**
*
* 半开后,最多重试多少次恢复
*
*
* .google.protobuf.UInt32Value maxRetryAfterHalfOpen = 2;
*/
com.google.protobuf.UInt32ValueOrBuilder getMaxRetryAfterHalfOpenOrBuilder();
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
java.util.List
getRequestRateAfterHalfOpenList();
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
com.google.protobuf.UInt32Value getRequestRateAfterHalfOpen(int index);
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
int getRequestRateAfterHalfOpenCount();
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
java.util.List extends com.google.protobuf.UInt32ValueOrBuilder>
getRequestRateAfterHalfOpenOrBuilderList();
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
com.google.protobuf.UInt32ValueOrBuilder getRequestRateAfterHalfOpenOrBuilder(
int index);
/**
*
* 熔断器半开到关闭所必须的最少成功率,默认100%
*
*
* .google.protobuf.UInt32Value successRateToClose = 4;
* @return Whether the successRateToClose field is set.
*/
boolean hasSuccessRateToClose();
/**
*
* 熔断器半开到关闭所必须的最少成功率,默认100%
*
*
* .google.protobuf.UInt32Value successRateToClose = 4;
* @return The successRateToClose.
*/
com.google.protobuf.UInt32Value getSuccessRateToClose();
/**
*
* 熔断器半开到关闭所必须的最少成功率,默认100%
*
*
* .google.protobuf.UInt32Value successRateToClose = 4;
*/
com.google.protobuf.UInt32ValueOrBuilder getSuccessRateToCloseOrBuilder();
/**
*
* 半开后最大放量数(用户不配置最大百分比时默认使用该配置)
*
*
* .google.protobuf.UInt32Value requestCountAfterHalfOpen = 5;
* @return Whether the requestCountAfterHalfOpen field is set.
*/
boolean hasRequestCountAfterHalfOpen();
/**
*
* 半开后最大放量数(用户不配置最大百分比时默认使用该配置)
*
*
* .google.protobuf.UInt32Value requestCountAfterHalfOpen = 5;
* @return The requestCountAfterHalfOpen.
*/
com.google.protobuf.UInt32Value getRequestCountAfterHalfOpen();
/**
*
* 半开后最大放量数(用户不配置最大百分比时默认使用该配置)
*
*
* .google.protobuf.UInt32Value requestCountAfterHalfOpen = 5;
*/
com.google.protobuf.UInt32ValueOrBuilder getRequestCountAfterHalfOpenOrBuilder();
/**
* .v1.RecoverConfig.OutlierDetectWhen outlierDetectWhen = 6;
* @return The enum numeric value on the wire for outlierDetectWhen.
*/
int getOutlierDetectWhenValue();
/**
* .v1.RecoverConfig.OutlierDetectWhen outlierDetectWhen = 6;
* @return The outlierDetectWhen.
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.OutlierDetectWhen getOutlierDetectWhen();
}
/**
*
* 熔断恢复配置
*
*
* Protobuf type {@code v1.RecoverConfig}
*/
public static final class RecoverConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:v1.RecoverConfig)
RecoverConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use RecoverConfig.newBuilder() to construct.
private RecoverConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RecoverConfig() {
requestRateAfterHalfOpen_ = java.util.Collections.emptyList();
outlierDetectWhen_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RecoverConfig();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RecoverConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RecoverConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.Builder.class);
}
/**
*
*主动探测配置
*
*
* Protobuf enum {@code v1.RecoverConfig.OutlierDetectWhen}
*/
public enum OutlierDetectWhen
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*不开启监控探测
*
*
* NEVER = 0;
*/
NEVER(0),
/**
*
*只有在熔断恢复时才开启健康探测
*
*
* ON_RECOVER = 1;
*/
ON_RECOVER(1),
/**
*
*一直开启健康探测
*
*
* ALWAYS = 2;
*/
ALWAYS(2),
UNRECOGNIZED(-1),
;
/**
*
*不开启监控探测
*
*
* NEVER = 0;
*/
public static final int NEVER_VALUE = 0;
/**
*
*只有在熔断恢复时才开启健康探测
*
*
* ON_RECOVER = 1;
*/
public static final int ON_RECOVER_VALUE = 1;
/**
*
*一直开启健康探测
*
*
* ALWAYS = 2;
*/
public static final int ALWAYS_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static OutlierDetectWhen 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 OutlierDetectWhen forNumber(int value) {
switch (value) {
case 0: return NEVER;
case 1: return ON_RECOVER;
case 2: return ALWAYS;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
OutlierDetectWhen> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public OutlierDetectWhen findValueByNumber(int number) {
return OutlierDetectWhen.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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.getDescriptor().getEnumTypes().get(0);
}
private static final OutlierDetectWhen[] VALUES = values();
public static OutlierDetectWhen 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 OutlierDetectWhen(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:v1.RecoverConfig.OutlierDetectWhen)
}
public static final int SLEEPWINDOW_FIELD_NUMBER = 1;
private com.google.protobuf.Duration sleepWindow_;
/**
*
* 触发熔断后到半开状态之间的等待间隔
*
*
* .google.protobuf.Duration sleepWindow = 1;
* @return Whether the sleepWindow field is set.
*/
@java.lang.Override
public boolean hasSleepWindow() {
return sleepWindow_ != null;
}
/**
*
* 触发熔断后到半开状态之间的等待间隔
*
*
* .google.protobuf.Duration sleepWindow = 1;
* @return The sleepWindow.
*/
@java.lang.Override
public com.google.protobuf.Duration getSleepWindow() {
return sleepWindow_ == null ? com.google.protobuf.Duration.getDefaultInstance() : sleepWindow_;
}
/**
*
* 触发熔断后到半开状态之间的等待间隔
*
*
* .google.protobuf.Duration sleepWindow = 1;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getSleepWindowOrBuilder() {
return getSleepWindow();
}
public static final int MAXRETRYAFTERHALFOPEN_FIELD_NUMBER = 2;
private com.google.protobuf.UInt32Value maxRetryAfterHalfOpen_;
/**
*
* 半开后,最多重试多少次恢复
*
*
* .google.protobuf.UInt32Value maxRetryAfterHalfOpen = 2;
* @return Whether the maxRetryAfterHalfOpen field is set.
*/
@java.lang.Override
public boolean hasMaxRetryAfterHalfOpen() {
return maxRetryAfterHalfOpen_ != null;
}
/**
*
* 半开后,最多重试多少次恢复
*
*
* .google.protobuf.UInt32Value maxRetryAfterHalfOpen = 2;
* @return The maxRetryAfterHalfOpen.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getMaxRetryAfterHalfOpen() {
return maxRetryAfterHalfOpen_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : maxRetryAfterHalfOpen_;
}
/**
*
* 半开后,最多重试多少次恢复
*
*
* .google.protobuf.UInt32Value maxRetryAfterHalfOpen = 2;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getMaxRetryAfterHalfOpenOrBuilder() {
return getMaxRetryAfterHalfOpen();
}
public static final int REQUESTRATEAFTERHALFOPEN_FIELD_NUMBER = 3;
private java.util.List requestRateAfterHalfOpen_;
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
@java.lang.Override
public java.util.List getRequestRateAfterHalfOpenList() {
return requestRateAfterHalfOpen_;
}
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
@java.lang.Override
public java.util.List extends com.google.protobuf.UInt32ValueOrBuilder>
getRequestRateAfterHalfOpenOrBuilderList() {
return requestRateAfterHalfOpen_;
}
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
@java.lang.Override
public int getRequestRateAfterHalfOpenCount() {
return requestRateAfterHalfOpen_.size();
}
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getRequestRateAfterHalfOpen(int index) {
return requestRateAfterHalfOpen_.get(index);
}
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getRequestRateAfterHalfOpenOrBuilder(
int index) {
return requestRateAfterHalfOpen_.get(index);
}
public static final int SUCCESSRATETOCLOSE_FIELD_NUMBER = 4;
private com.google.protobuf.UInt32Value successRateToClose_;
/**
*
* 熔断器半开到关闭所必须的最少成功率,默认100%
*
*
* .google.protobuf.UInt32Value successRateToClose = 4;
* @return Whether the successRateToClose field is set.
*/
@java.lang.Override
public boolean hasSuccessRateToClose() {
return successRateToClose_ != null;
}
/**
*
* 熔断器半开到关闭所必须的最少成功率,默认100%
*
*
* .google.protobuf.UInt32Value successRateToClose = 4;
* @return The successRateToClose.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getSuccessRateToClose() {
return successRateToClose_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : successRateToClose_;
}
/**
*
* 熔断器半开到关闭所必须的最少成功率,默认100%
*
*
* .google.protobuf.UInt32Value successRateToClose = 4;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getSuccessRateToCloseOrBuilder() {
return getSuccessRateToClose();
}
public static final int REQUESTCOUNTAFTERHALFOPEN_FIELD_NUMBER = 5;
private com.google.protobuf.UInt32Value requestCountAfterHalfOpen_;
/**
*
* 半开后最大放量数(用户不配置最大百分比时默认使用该配置)
*
*
* .google.protobuf.UInt32Value requestCountAfterHalfOpen = 5;
* @return Whether the requestCountAfterHalfOpen field is set.
*/
@java.lang.Override
public boolean hasRequestCountAfterHalfOpen() {
return requestCountAfterHalfOpen_ != null;
}
/**
*
* 半开后最大放量数(用户不配置最大百分比时默认使用该配置)
*
*
* .google.protobuf.UInt32Value requestCountAfterHalfOpen = 5;
* @return The requestCountAfterHalfOpen.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getRequestCountAfterHalfOpen() {
return requestCountAfterHalfOpen_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : requestCountAfterHalfOpen_;
}
/**
*
* 半开后最大放量数(用户不配置最大百分比时默认使用该配置)
*
*
* .google.protobuf.UInt32Value requestCountAfterHalfOpen = 5;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getRequestCountAfterHalfOpenOrBuilder() {
return getRequestCountAfterHalfOpen();
}
public static final int OUTLIERDETECTWHEN_FIELD_NUMBER = 6;
private int outlierDetectWhen_;
/**
* .v1.RecoverConfig.OutlierDetectWhen outlierDetectWhen = 6;
* @return The enum numeric value on the wire for outlierDetectWhen.
*/
@java.lang.Override public int getOutlierDetectWhenValue() {
return outlierDetectWhen_;
}
/**
* .v1.RecoverConfig.OutlierDetectWhen outlierDetectWhen = 6;
* @return The outlierDetectWhen.
*/
@java.lang.Override public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.OutlierDetectWhen getOutlierDetectWhen() {
@SuppressWarnings("deprecation")
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.OutlierDetectWhen result = com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.OutlierDetectWhen.valueOf(outlierDetectWhen_);
return result == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.OutlierDetectWhen.UNRECOGNIZED : result;
}
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 (sleepWindow_ != null) {
output.writeMessage(1, getSleepWindow());
}
if (maxRetryAfterHalfOpen_ != null) {
output.writeMessage(2, getMaxRetryAfterHalfOpen());
}
for (int i = 0; i < requestRateAfterHalfOpen_.size(); i++) {
output.writeMessage(3, requestRateAfterHalfOpen_.get(i));
}
if (successRateToClose_ != null) {
output.writeMessage(4, getSuccessRateToClose());
}
if (requestCountAfterHalfOpen_ != null) {
output.writeMessage(5, getRequestCountAfterHalfOpen());
}
if (outlierDetectWhen_ != com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.OutlierDetectWhen.NEVER.getNumber()) {
output.writeEnum(6, outlierDetectWhen_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (sleepWindow_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getSleepWindow());
}
if (maxRetryAfterHalfOpen_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getMaxRetryAfterHalfOpen());
}
for (int i = 0; i < requestRateAfterHalfOpen_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, requestRateAfterHalfOpen_.get(i));
}
if (successRateToClose_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getSuccessRateToClose());
}
if (requestCountAfterHalfOpen_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getRequestCountAfterHalfOpen());
}
if (outlierDetectWhen_ != com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.OutlierDetectWhen.NEVER.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(6, outlierDetectWhen_);
}
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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig)) {
return super.equals(obj);
}
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig other = (com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig) obj;
if (hasSleepWindow() != other.hasSleepWindow()) return false;
if (hasSleepWindow()) {
if (!getSleepWindow()
.equals(other.getSleepWindow())) return false;
}
if (hasMaxRetryAfterHalfOpen() != other.hasMaxRetryAfterHalfOpen()) return false;
if (hasMaxRetryAfterHalfOpen()) {
if (!getMaxRetryAfterHalfOpen()
.equals(other.getMaxRetryAfterHalfOpen())) return false;
}
if (!getRequestRateAfterHalfOpenList()
.equals(other.getRequestRateAfterHalfOpenList())) return false;
if (hasSuccessRateToClose() != other.hasSuccessRateToClose()) return false;
if (hasSuccessRateToClose()) {
if (!getSuccessRateToClose()
.equals(other.getSuccessRateToClose())) return false;
}
if (hasRequestCountAfterHalfOpen() != other.hasRequestCountAfterHalfOpen()) return false;
if (hasRequestCountAfterHalfOpen()) {
if (!getRequestCountAfterHalfOpen()
.equals(other.getRequestCountAfterHalfOpen())) return false;
}
if (outlierDetectWhen_ != other.outlierDetectWhen_) 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 (hasSleepWindow()) {
hash = (37 * hash) + SLEEPWINDOW_FIELD_NUMBER;
hash = (53 * hash) + getSleepWindow().hashCode();
}
if (hasMaxRetryAfterHalfOpen()) {
hash = (37 * hash) + MAXRETRYAFTERHALFOPEN_FIELD_NUMBER;
hash = (53 * hash) + getMaxRetryAfterHalfOpen().hashCode();
}
if (getRequestRateAfterHalfOpenCount() > 0) {
hash = (37 * hash) + REQUESTRATEAFTERHALFOPEN_FIELD_NUMBER;
hash = (53 * hash) + getRequestRateAfterHalfOpenList().hashCode();
}
if (hasSuccessRateToClose()) {
hash = (37 * hash) + SUCCESSRATETOCLOSE_FIELD_NUMBER;
hash = (53 * hash) + getSuccessRateToClose().hashCode();
}
if (hasRequestCountAfterHalfOpen()) {
hash = (37 * hash) + REQUESTCOUNTAFTERHALFOPEN_FIELD_NUMBER;
hash = (53 * hash) + getRequestCountAfterHalfOpen().hashCode();
}
hash = (37 * hash) + OUTLIERDETECTWHEN_FIELD_NUMBER;
hash = (53 * hash) + outlierDetectWhen_;
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig 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(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig 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 v1.RecoverConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:v1.RecoverConfig)
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RecoverConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RecoverConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.Builder.class);
}
// Construct using com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
if (sleepWindowBuilder_ == null) {
sleepWindow_ = null;
} else {
sleepWindow_ = null;
sleepWindowBuilder_ = null;
}
if (maxRetryAfterHalfOpenBuilder_ == null) {
maxRetryAfterHalfOpen_ = null;
} else {
maxRetryAfterHalfOpen_ = null;
maxRetryAfterHalfOpenBuilder_ = null;
}
if (requestRateAfterHalfOpenBuilder_ == null) {
requestRateAfterHalfOpen_ = java.util.Collections.emptyList();
} else {
requestRateAfterHalfOpen_ = null;
requestRateAfterHalfOpenBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
if (successRateToCloseBuilder_ == null) {
successRateToClose_ = null;
} else {
successRateToClose_ = null;
successRateToCloseBuilder_ = null;
}
if (requestCountAfterHalfOpenBuilder_ == null) {
requestCountAfterHalfOpen_ = null;
} else {
requestCountAfterHalfOpen_ = null;
requestCountAfterHalfOpenBuilder_ = null;
}
outlierDetectWhen_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RecoverConfig_descriptor;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig getDefaultInstanceForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.getDefaultInstance();
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig build() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig buildPartial() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig result = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig(this);
int from_bitField0_ = bitField0_;
if (sleepWindowBuilder_ == null) {
result.sleepWindow_ = sleepWindow_;
} else {
result.sleepWindow_ = sleepWindowBuilder_.build();
}
if (maxRetryAfterHalfOpenBuilder_ == null) {
result.maxRetryAfterHalfOpen_ = maxRetryAfterHalfOpen_;
} else {
result.maxRetryAfterHalfOpen_ = maxRetryAfterHalfOpenBuilder_.build();
}
if (requestRateAfterHalfOpenBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
requestRateAfterHalfOpen_ = java.util.Collections.unmodifiableList(requestRateAfterHalfOpen_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.requestRateAfterHalfOpen_ = requestRateAfterHalfOpen_;
} else {
result.requestRateAfterHalfOpen_ = requestRateAfterHalfOpenBuilder_.build();
}
if (successRateToCloseBuilder_ == null) {
result.successRateToClose_ = successRateToClose_;
} else {
result.successRateToClose_ = successRateToCloseBuilder_.build();
}
if (requestCountAfterHalfOpenBuilder_ == null) {
result.requestCountAfterHalfOpen_ = requestCountAfterHalfOpen_;
} else {
result.requestCountAfterHalfOpen_ = requestCountAfterHalfOpenBuilder_.build();
}
result.outlierDetectWhen_ = outlierDetectWhen_;
onBuilt();
return result;
}
@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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig) {
return mergeFrom((com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig other) {
if (other == com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.getDefaultInstance()) return this;
if (other.hasSleepWindow()) {
mergeSleepWindow(other.getSleepWindow());
}
if (other.hasMaxRetryAfterHalfOpen()) {
mergeMaxRetryAfterHalfOpen(other.getMaxRetryAfterHalfOpen());
}
if (requestRateAfterHalfOpenBuilder_ == null) {
if (!other.requestRateAfterHalfOpen_.isEmpty()) {
if (requestRateAfterHalfOpen_.isEmpty()) {
requestRateAfterHalfOpen_ = other.requestRateAfterHalfOpen_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureRequestRateAfterHalfOpenIsMutable();
requestRateAfterHalfOpen_.addAll(other.requestRateAfterHalfOpen_);
}
onChanged();
}
} else {
if (!other.requestRateAfterHalfOpen_.isEmpty()) {
if (requestRateAfterHalfOpenBuilder_.isEmpty()) {
requestRateAfterHalfOpenBuilder_.dispose();
requestRateAfterHalfOpenBuilder_ = null;
requestRateAfterHalfOpen_ = other.requestRateAfterHalfOpen_;
bitField0_ = (bitField0_ & ~0x00000001);
requestRateAfterHalfOpenBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getRequestRateAfterHalfOpenFieldBuilder() : null;
} else {
requestRateAfterHalfOpenBuilder_.addAllMessages(other.requestRateAfterHalfOpen_);
}
}
}
if (other.hasSuccessRateToClose()) {
mergeSuccessRateToClose(other.getSuccessRateToClose());
}
if (other.hasRequestCountAfterHalfOpen()) {
mergeRequestCountAfterHalfOpen(other.getRequestCountAfterHalfOpen());
}
if (other.outlierDetectWhen_ != 0) {
setOutlierDetectWhenValue(other.getOutlierDetectWhenValue());
}
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(
getSleepWindowFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 10
case 18: {
input.readMessage(
getMaxRetryAfterHalfOpenFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 18
case 26: {
com.google.protobuf.UInt32Value m =
input.readMessage(
com.google.protobuf.UInt32Value.parser(),
extensionRegistry);
if (requestRateAfterHalfOpenBuilder_ == null) {
ensureRequestRateAfterHalfOpenIsMutable();
requestRateAfterHalfOpen_.add(m);
} else {
requestRateAfterHalfOpenBuilder_.addMessage(m);
}
break;
} // case 26
case 34: {
input.readMessage(
getSuccessRateToCloseFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 34
case 42: {
input.readMessage(
getRequestCountAfterHalfOpenFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 42
case 48: {
outlierDetectWhen_ = input.readEnum();
break;
} // case 48
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.Duration sleepWindow_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> sleepWindowBuilder_;
/**
*
* 触发熔断后到半开状态之间的等待间隔
*
*
* .google.protobuf.Duration sleepWindow = 1;
* @return Whether the sleepWindow field is set.
*/
public boolean hasSleepWindow() {
return sleepWindowBuilder_ != null || sleepWindow_ != null;
}
/**
*
* 触发熔断后到半开状态之间的等待间隔
*
*
* .google.protobuf.Duration sleepWindow = 1;
* @return The sleepWindow.
*/
public com.google.protobuf.Duration getSleepWindow() {
if (sleepWindowBuilder_ == null) {
return sleepWindow_ == null ? com.google.protobuf.Duration.getDefaultInstance() : sleepWindow_;
} else {
return sleepWindowBuilder_.getMessage();
}
}
/**
*
* 触发熔断后到半开状态之间的等待间隔
*
*
* .google.protobuf.Duration sleepWindow = 1;
*/
public Builder setSleepWindow(com.google.protobuf.Duration value) {
if (sleepWindowBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sleepWindow_ = value;
onChanged();
} else {
sleepWindowBuilder_.setMessage(value);
}
return this;
}
/**
*
* 触发熔断后到半开状态之间的等待间隔
*
*
* .google.protobuf.Duration sleepWindow = 1;
*/
public Builder setSleepWindow(
com.google.protobuf.Duration.Builder builderForValue) {
if (sleepWindowBuilder_ == null) {
sleepWindow_ = builderForValue.build();
onChanged();
} else {
sleepWindowBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 触发熔断后到半开状态之间的等待间隔
*
*
* .google.protobuf.Duration sleepWindow = 1;
*/
public Builder mergeSleepWindow(com.google.protobuf.Duration value) {
if (sleepWindowBuilder_ == null) {
if (sleepWindow_ != null) {
sleepWindow_ =
com.google.protobuf.Duration.newBuilder(sleepWindow_).mergeFrom(value).buildPartial();
} else {
sleepWindow_ = value;
}
onChanged();
} else {
sleepWindowBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 触发熔断后到半开状态之间的等待间隔
*
*
* .google.protobuf.Duration sleepWindow = 1;
*/
public Builder clearSleepWindow() {
if (sleepWindowBuilder_ == null) {
sleepWindow_ = null;
onChanged();
} else {
sleepWindow_ = null;
sleepWindowBuilder_ = null;
}
return this;
}
/**
*
* 触发熔断后到半开状态之间的等待间隔
*
*
* .google.protobuf.Duration sleepWindow = 1;
*/
public com.google.protobuf.Duration.Builder getSleepWindowBuilder() {
onChanged();
return getSleepWindowFieldBuilder().getBuilder();
}
/**
*
* 触发熔断后到半开状态之间的等待间隔
*
*
* .google.protobuf.Duration sleepWindow = 1;
*/
public com.google.protobuf.DurationOrBuilder getSleepWindowOrBuilder() {
if (sleepWindowBuilder_ != null) {
return sleepWindowBuilder_.getMessageOrBuilder();
} else {
return sleepWindow_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : sleepWindow_;
}
}
/**
*
* 触发熔断后到半开状态之间的等待间隔
*
*
* .google.protobuf.Duration sleepWindow = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getSleepWindowFieldBuilder() {
if (sleepWindowBuilder_ == null) {
sleepWindowBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getSleepWindow(),
getParentForChildren(),
isClean());
sleepWindow_ = null;
}
return sleepWindowBuilder_;
}
private com.google.protobuf.UInt32Value maxRetryAfterHalfOpen_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> maxRetryAfterHalfOpenBuilder_;
/**
*
* 半开后,最多重试多少次恢复
*
*
* .google.protobuf.UInt32Value maxRetryAfterHalfOpen = 2;
* @return Whether the maxRetryAfterHalfOpen field is set.
*/
public boolean hasMaxRetryAfterHalfOpen() {
return maxRetryAfterHalfOpenBuilder_ != null || maxRetryAfterHalfOpen_ != null;
}
/**
*
* 半开后,最多重试多少次恢复
*
*
* .google.protobuf.UInt32Value maxRetryAfterHalfOpen = 2;
* @return The maxRetryAfterHalfOpen.
*/
public com.google.protobuf.UInt32Value getMaxRetryAfterHalfOpen() {
if (maxRetryAfterHalfOpenBuilder_ == null) {
return maxRetryAfterHalfOpen_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : maxRetryAfterHalfOpen_;
} else {
return maxRetryAfterHalfOpenBuilder_.getMessage();
}
}
/**
*
* 半开后,最多重试多少次恢复
*
*
* .google.protobuf.UInt32Value maxRetryAfterHalfOpen = 2;
*/
public Builder setMaxRetryAfterHalfOpen(com.google.protobuf.UInt32Value value) {
if (maxRetryAfterHalfOpenBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
maxRetryAfterHalfOpen_ = value;
onChanged();
} else {
maxRetryAfterHalfOpenBuilder_.setMessage(value);
}
return this;
}
/**
*
* 半开后,最多重试多少次恢复
*
*
* .google.protobuf.UInt32Value maxRetryAfterHalfOpen = 2;
*/
public Builder setMaxRetryAfterHalfOpen(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (maxRetryAfterHalfOpenBuilder_ == null) {
maxRetryAfterHalfOpen_ = builderForValue.build();
onChanged();
} else {
maxRetryAfterHalfOpenBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 半开后,最多重试多少次恢复
*
*
* .google.protobuf.UInt32Value maxRetryAfterHalfOpen = 2;
*/
public Builder mergeMaxRetryAfterHalfOpen(com.google.protobuf.UInt32Value value) {
if (maxRetryAfterHalfOpenBuilder_ == null) {
if (maxRetryAfterHalfOpen_ != null) {
maxRetryAfterHalfOpen_ =
com.google.protobuf.UInt32Value.newBuilder(maxRetryAfterHalfOpen_).mergeFrom(value).buildPartial();
} else {
maxRetryAfterHalfOpen_ = value;
}
onChanged();
} else {
maxRetryAfterHalfOpenBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 半开后,最多重试多少次恢复
*
*
* .google.protobuf.UInt32Value maxRetryAfterHalfOpen = 2;
*/
public Builder clearMaxRetryAfterHalfOpen() {
if (maxRetryAfterHalfOpenBuilder_ == null) {
maxRetryAfterHalfOpen_ = null;
onChanged();
} else {
maxRetryAfterHalfOpen_ = null;
maxRetryAfterHalfOpenBuilder_ = null;
}
return this;
}
/**
*
* 半开后,最多重试多少次恢复
*
*
* .google.protobuf.UInt32Value maxRetryAfterHalfOpen = 2;
*/
public com.google.protobuf.UInt32Value.Builder getMaxRetryAfterHalfOpenBuilder() {
onChanged();
return getMaxRetryAfterHalfOpenFieldBuilder().getBuilder();
}
/**
*
* 半开后,最多重试多少次恢复
*
*
* .google.protobuf.UInt32Value maxRetryAfterHalfOpen = 2;
*/
public com.google.protobuf.UInt32ValueOrBuilder getMaxRetryAfterHalfOpenOrBuilder() {
if (maxRetryAfterHalfOpenBuilder_ != null) {
return maxRetryAfterHalfOpenBuilder_.getMessageOrBuilder();
} else {
return maxRetryAfterHalfOpen_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : maxRetryAfterHalfOpen_;
}
}
/**
*
* 半开后,最多重试多少次恢复
*
*
* .google.protobuf.UInt32Value maxRetryAfterHalfOpen = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getMaxRetryAfterHalfOpenFieldBuilder() {
if (maxRetryAfterHalfOpenBuilder_ == null) {
maxRetryAfterHalfOpenBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getMaxRetryAfterHalfOpen(),
getParentForChildren(),
isClean());
maxRetryAfterHalfOpen_ = null;
}
return maxRetryAfterHalfOpenBuilder_;
}
private java.util.List requestRateAfterHalfOpen_ =
java.util.Collections.emptyList();
private void ensureRequestRateAfterHalfOpenIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
requestRateAfterHalfOpen_ = new java.util.ArrayList(requestRateAfterHalfOpen_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> requestRateAfterHalfOpenBuilder_;
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
public java.util.List getRequestRateAfterHalfOpenList() {
if (requestRateAfterHalfOpenBuilder_ == null) {
return java.util.Collections.unmodifiableList(requestRateAfterHalfOpen_);
} else {
return requestRateAfterHalfOpenBuilder_.getMessageList();
}
}
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
public int getRequestRateAfterHalfOpenCount() {
if (requestRateAfterHalfOpenBuilder_ == null) {
return requestRateAfterHalfOpen_.size();
} else {
return requestRateAfterHalfOpenBuilder_.getCount();
}
}
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
public com.google.protobuf.UInt32Value getRequestRateAfterHalfOpen(int index) {
if (requestRateAfterHalfOpenBuilder_ == null) {
return requestRateAfterHalfOpen_.get(index);
} else {
return requestRateAfterHalfOpenBuilder_.getMessage(index);
}
}
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
public Builder setRequestRateAfterHalfOpen(
int index, com.google.protobuf.UInt32Value value) {
if (requestRateAfterHalfOpenBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRequestRateAfterHalfOpenIsMutable();
requestRateAfterHalfOpen_.set(index, value);
onChanged();
} else {
requestRateAfterHalfOpenBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
public Builder setRequestRateAfterHalfOpen(
int index, com.google.protobuf.UInt32Value.Builder builderForValue) {
if (requestRateAfterHalfOpenBuilder_ == null) {
ensureRequestRateAfterHalfOpenIsMutable();
requestRateAfterHalfOpen_.set(index, builderForValue.build());
onChanged();
} else {
requestRateAfterHalfOpenBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
public Builder addRequestRateAfterHalfOpen(com.google.protobuf.UInt32Value value) {
if (requestRateAfterHalfOpenBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRequestRateAfterHalfOpenIsMutable();
requestRateAfterHalfOpen_.add(value);
onChanged();
} else {
requestRateAfterHalfOpenBuilder_.addMessage(value);
}
return this;
}
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
public Builder addRequestRateAfterHalfOpen(
int index, com.google.protobuf.UInt32Value value) {
if (requestRateAfterHalfOpenBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRequestRateAfterHalfOpenIsMutable();
requestRateAfterHalfOpen_.add(index, value);
onChanged();
} else {
requestRateAfterHalfOpenBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
public Builder addRequestRateAfterHalfOpen(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (requestRateAfterHalfOpenBuilder_ == null) {
ensureRequestRateAfterHalfOpenIsMutable();
requestRateAfterHalfOpen_.add(builderForValue.build());
onChanged();
} else {
requestRateAfterHalfOpenBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
public Builder addRequestRateAfterHalfOpen(
int index, com.google.protobuf.UInt32Value.Builder builderForValue) {
if (requestRateAfterHalfOpenBuilder_ == null) {
ensureRequestRateAfterHalfOpenIsMutable();
requestRateAfterHalfOpen_.add(index, builderForValue.build());
onChanged();
} else {
requestRateAfterHalfOpenBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
public Builder addAllRequestRateAfterHalfOpen(
java.lang.Iterable extends com.google.protobuf.UInt32Value> values) {
if (requestRateAfterHalfOpenBuilder_ == null) {
ensureRequestRateAfterHalfOpenIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, requestRateAfterHalfOpen_);
onChanged();
} else {
requestRateAfterHalfOpenBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
public Builder clearRequestRateAfterHalfOpen() {
if (requestRateAfterHalfOpenBuilder_ == null) {
requestRateAfterHalfOpen_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
requestRateAfterHalfOpenBuilder_.clear();
}
return this;
}
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
public Builder removeRequestRateAfterHalfOpen(int index) {
if (requestRateAfterHalfOpenBuilder_ == null) {
ensureRequestRateAfterHalfOpenIsMutable();
requestRateAfterHalfOpen_.remove(index);
onChanged();
} else {
requestRateAfterHalfOpenBuilder_.remove(index);
}
return this;
}
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
public com.google.protobuf.UInt32Value.Builder getRequestRateAfterHalfOpenBuilder(
int index) {
return getRequestRateAfterHalfOpenFieldBuilder().getBuilder(index);
}
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
public com.google.protobuf.UInt32ValueOrBuilder getRequestRateAfterHalfOpenOrBuilder(
int index) {
if (requestRateAfterHalfOpenBuilder_ == null) {
return requestRateAfterHalfOpen_.get(index); } else {
return requestRateAfterHalfOpenBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
public java.util.List extends com.google.protobuf.UInt32ValueOrBuilder>
getRequestRateAfterHalfOpenOrBuilderList() {
if (requestRateAfterHalfOpenBuilder_ != null) {
return requestRateAfterHalfOpenBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(requestRateAfterHalfOpen_);
}
}
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
public com.google.protobuf.UInt32Value.Builder addRequestRateAfterHalfOpenBuilder() {
return getRequestRateAfterHalfOpenFieldBuilder().addBuilder(
com.google.protobuf.UInt32Value.getDefaultInstance());
}
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
public com.google.protobuf.UInt32Value.Builder addRequestRateAfterHalfOpenBuilder(
int index) {
return getRequestRateAfterHalfOpenFieldBuilder().addBuilder(
index, com.google.protobuf.UInt32Value.getDefaultInstance());
}
/**
*
* 半开后放量的最大百分比
*
*
* repeated .google.protobuf.UInt32Value requestRateAfterHalfOpen = 3;
*/
public java.util.List
getRequestRateAfterHalfOpenBuilderList() {
return getRequestRateAfterHalfOpenFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getRequestRateAfterHalfOpenFieldBuilder() {
if (requestRateAfterHalfOpenBuilder_ == null) {
requestRateAfterHalfOpenBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
requestRateAfterHalfOpen_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
requestRateAfterHalfOpen_ = null;
}
return requestRateAfterHalfOpenBuilder_;
}
private com.google.protobuf.UInt32Value successRateToClose_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> successRateToCloseBuilder_;
/**
*
* 熔断器半开到关闭所必须的最少成功率,默认100%
*
*
* .google.protobuf.UInt32Value successRateToClose = 4;
* @return Whether the successRateToClose field is set.
*/
public boolean hasSuccessRateToClose() {
return successRateToCloseBuilder_ != null || successRateToClose_ != null;
}
/**
*
* 熔断器半开到关闭所必须的最少成功率,默认100%
*
*
* .google.protobuf.UInt32Value successRateToClose = 4;
* @return The successRateToClose.
*/
public com.google.protobuf.UInt32Value getSuccessRateToClose() {
if (successRateToCloseBuilder_ == null) {
return successRateToClose_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : successRateToClose_;
} else {
return successRateToCloseBuilder_.getMessage();
}
}
/**
*
* 熔断器半开到关闭所必须的最少成功率,默认100%
*
*
* .google.protobuf.UInt32Value successRateToClose = 4;
*/
public Builder setSuccessRateToClose(com.google.protobuf.UInt32Value value) {
if (successRateToCloseBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
successRateToClose_ = value;
onChanged();
} else {
successRateToCloseBuilder_.setMessage(value);
}
return this;
}
/**
*
* 熔断器半开到关闭所必须的最少成功率,默认100%
*
*
* .google.protobuf.UInt32Value successRateToClose = 4;
*/
public Builder setSuccessRateToClose(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (successRateToCloseBuilder_ == null) {
successRateToClose_ = builderForValue.build();
onChanged();
} else {
successRateToCloseBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 熔断器半开到关闭所必须的最少成功率,默认100%
*
*
* .google.protobuf.UInt32Value successRateToClose = 4;
*/
public Builder mergeSuccessRateToClose(com.google.protobuf.UInt32Value value) {
if (successRateToCloseBuilder_ == null) {
if (successRateToClose_ != null) {
successRateToClose_ =
com.google.protobuf.UInt32Value.newBuilder(successRateToClose_).mergeFrom(value).buildPartial();
} else {
successRateToClose_ = value;
}
onChanged();
} else {
successRateToCloseBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 熔断器半开到关闭所必须的最少成功率,默认100%
*
*
* .google.protobuf.UInt32Value successRateToClose = 4;
*/
public Builder clearSuccessRateToClose() {
if (successRateToCloseBuilder_ == null) {
successRateToClose_ = null;
onChanged();
} else {
successRateToClose_ = null;
successRateToCloseBuilder_ = null;
}
return this;
}
/**
*
* 熔断器半开到关闭所必须的最少成功率,默认100%
*
*
* .google.protobuf.UInt32Value successRateToClose = 4;
*/
public com.google.protobuf.UInt32Value.Builder getSuccessRateToCloseBuilder() {
onChanged();
return getSuccessRateToCloseFieldBuilder().getBuilder();
}
/**
*
* 熔断器半开到关闭所必须的最少成功率,默认100%
*
*
* .google.protobuf.UInt32Value successRateToClose = 4;
*/
public com.google.protobuf.UInt32ValueOrBuilder getSuccessRateToCloseOrBuilder() {
if (successRateToCloseBuilder_ != null) {
return successRateToCloseBuilder_.getMessageOrBuilder();
} else {
return successRateToClose_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : successRateToClose_;
}
}
/**
*
* 熔断器半开到关闭所必须的最少成功率,默认100%
*
*
* .google.protobuf.UInt32Value successRateToClose = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getSuccessRateToCloseFieldBuilder() {
if (successRateToCloseBuilder_ == null) {
successRateToCloseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getSuccessRateToClose(),
getParentForChildren(),
isClean());
successRateToClose_ = null;
}
return successRateToCloseBuilder_;
}
private com.google.protobuf.UInt32Value requestCountAfterHalfOpen_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> requestCountAfterHalfOpenBuilder_;
/**
*
* 半开后最大放量数(用户不配置最大百分比时默认使用该配置)
*
*
* .google.protobuf.UInt32Value requestCountAfterHalfOpen = 5;
* @return Whether the requestCountAfterHalfOpen field is set.
*/
public boolean hasRequestCountAfterHalfOpen() {
return requestCountAfterHalfOpenBuilder_ != null || requestCountAfterHalfOpen_ != null;
}
/**
*
* 半开后最大放量数(用户不配置最大百分比时默认使用该配置)
*
*
* .google.protobuf.UInt32Value requestCountAfterHalfOpen = 5;
* @return The requestCountAfterHalfOpen.
*/
public com.google.protobuf.UInt32Value getRequestCountAfterHalfOpen() {
if (requestCountAfterHalfOpenBuilder_ == null) {
return requestCountAfterHalfOpen_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : requestCountAfterHalfOpen_;
} else {
return requestCountAfterHalfOpenBuilder_.getMessage();
}
}
/**
*
* 半开后最大放量数(用户不配置最大百分比时默认使用该配置)
*
*
* .google.protobuf.UInt32Value requestCountAfterHalfOpen = 5;
*/
public Builder setRequestCountAfterHalfOpen(com.google.protobuf.UInt32Value value) {
if (requestCountAfterHalfOpenBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
requestCountAfterHalfOpen_ = value;
onChanged();
} else {
requestCountAfterHalfOpenBuilder_.setMessage(value);
}
return this;
}
/**
*
* 半开后最大放量数(用户不配置最大百分比时默认使用该配置)
*
*
* .google.protobuf.UInt32Value requestCountAfterHalfOpen = 5;
*/
public Builder setRequestCountAfterHalfOpen(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (requestCountAfterHalfOpenBuilder_ == null) {
requestCountAfterHalfOpen_ = builderForValue.build();
onChanged();
} else {
requestCountAfterHalfOpenBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 半开后最大放量数(用户不配置最大百分比时默认使用该配置)
*
*
* .google.protobuf.UInt32Value requestCountAfterHalfOpen = 5;
*/
public Builder mergeRequestCountAfterHalfOpen(com.google.protobuf.UInt32Value value) {
if (requestCountAfterHalfOpenBuilder_ == null) {
if (requestCountAfterHalfOpen_ != null) {
requestCountAfterHalfOpen_ =
com.google.protobuf.UInt32Value.newBuilder(requestCountAfterHalfOpen_).mergeFrom(value).buildPartial();
} else {
requestCountAfterHalfOpen_ = value;
}
onChanged();
} else {
requestCountAfterHalfOpenBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 半开后最大放量数(用户不配置最大百分比时默认使用该配置)
*
*
* .google.protobuf.UInt32Value requestCountAfterHalfOpen = 5;
*/
public Builder clearRequestCountAfterHalfOpen() {
if (requestCountAfterHalfOpenBuilder_ == null) {
requestCountAfterHalfOpen_ = null;
onChanged();
} else {
requestCountAfterHalfOpen_ = null;
requestCountAfterHalfOpenBuilder_ = null;
}
return this;
}
/**
*
* 半开后最大放量数(用户不配置最大百分比时默认使用该配置)
*
*
* .google.protobuf.UInt32Value requestCountAfterHalfOpen = 5;
*/
public com.google.protobuf.UInt32Value.Builder getRequestCountAfterHalfOpenBuilder() {
onChanged();
return getRequestCountAfterHalfOpenFieldBuilder().getBuilder();
}
/**
*
* 半开后最大放量数(用户不配置最大百分比时默认使用该配置)
*
*
* .google.protobuf.UInt32Value requestCountAfterHalfOpen = 5;
*/
public com.google.protobuf.UInt32ValueOrBuilder getRequestCountAfterHalfOpenOrBuilder() {
if (requestCountAfterHalfOpenBuilder_ != null) {
return requestCountAfterHalfOpenBuilder_.getMessageOrBuilder();
} else {
return requestCountAfterHalfOpen_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : requestCountAfterHalfOpen_;
}
}
/**
*
* 半开后最大放量数(用户不配置最大百分比时默认使用该配置)
*
*
* .google.protobuf.UInt32Value requestCountAfterHalfOpen = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getRequestCountAfterHalfOpenFieldBuilder() {
if (requestCountAfterHalfOpenBuilder_ == null) {
requestCountAfterHalfOpenBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getRequestCountAfterHalfOpen(),
getParentForChildren(),
isClean());
requestCountAfterHalfOpen_ = null;
}
return requestCountAfterHalfOpenBuilder_;
}
private int outlierDetectWhen_ = 0;
/**
* .v1.RecoverConfig.OutlierDetectWhen outlierDetectWhen = 6;
* @return The enum numeric value on the wire for outlierDetectWhen.
*/
@java.lang.Override public int getOutlierDetectWhenValue() {
return outlierDetectWhen_;
}
/**
* .v1.RecoverConfig.OutlierDetectWhen outlierDetectWhen = 6;
* @param value The enum numeric value on the wire for outlierDetectWhen to set.
* @return This builder for chaining.
*/
public Builder setOutlierDetectWhenValue(int value) {
outlierDetectWhen_ = value;
onChanged();
return this;
}
/**
* .v1.RecoverConfig.OutlierDetectWhen outlierDetectWhen = 6;
* @return The outlierDetectWhen.
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.OutlierDetectWhen getOutlierDetectWhen() {
@SuppressWarnings("deprecation")
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.OutlierDetectWhen result = com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.OutlierDetectWhen.valueOf(outlierDetectWhen_);
return result == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.OutlierDetectWhen.UNRECOGNIZED : result;
}
/**
* .v1.RecoverConfig.OutlierDetectWhen outlierDetectWhen = 6;
* @param value The outlierDetectWhen to set.
* @return This builder for chaining.
*/
public Builder setOutlierDetectWhen(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.OutlierDetectWhen value) {
if (value == null) {
throw new NullPointerException();
}
outlierDetectWhen_ = value.getNumber();
onChanged();
return this;
}
/**
* .v1.RecoverConfig.OutlierDetectWhen outlierDetectWhen = 6;
* @return This builder for chaining.
*/
public Builder clearOutlierDetectWhen() {
outlierDetectWhen_ = 0;
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:v1.RecoverConfig)
}
// @@protoc_insertion_point(class_scope:v1.RecoverConfig)
private static final com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig();
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RecoverConfig 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CbPolicyOrBuilder extends
// @@protoc_insertion_point(interface_extends:v1.CbPolicy)
com.google.protobuf.MessageOrBuilder {
/**
* .v1.CbPolicy.ErrRateConfig errorRate = 1;
* @return Whether the errorRate field is set.
*/
boolean hasErrorRate();
/**
* .v1.CbPolicy.ErrRateConfig errorRate = 1;
* @return The errorRate.
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig getErrorRate();
/**
* .v1.CbPolicy.ErrRateConfig errorRate = 1;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfigOrBuilder getErrorRateOrBuilder();
/**
* .v1.CbPolicy.SlowRateConfig slowRate = 2;
* @return Whether the slowRate field is set.
*/
boolean hasSlowRate();
/**
* .v1.CbPolicy.SlowRateConfig slowRate = 2;
* @return The slowRate.
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig getSlowRate();
/**
* .v1.CbPolicy.SlowRateConfig slowRate = 2;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfigOrBuilder getSlowRateOrBuilder();
/**
*
* 熔断的决策周期,多久触发一次熔断决策
*
*
* .google.protobuf.Duration judgeDuration = 3;
* @return Whether the judgeDuration field is set.
*/
boolean hasJudgeDuration();
/**
*
* 熔断的决策周期,多久触发一次熔断决策
*
*
* .google.protobuf.Duration judgeDuration = 3;
* @return The judgeDuration.
*/
com.google.protobuf.Duration getJudgeDuration();
/**
*
* 熔断的决策周期,多久触发一次熔断决策
*
*
* .google.protobuf.Duration judgeDuration = 3;
*/
com.google.protobuf.DurationOrBuilder getJudgeDurationOrBuilder();
/**
*
*最大熔断比例,超过多少比例后不会继续熔断
*
*
* .google.protobuf.UInt32Value maxEjectionPercent = 4;
* @return Whether the maxEjectionPercent field is set.
*/
boolean hasMaxEjectionPercent();
/**
*
*最大熔断比例,超过多少比例后不会继续熔断
*
*
* .google.protobuf.UInt32Value maxEjectionPercent = 4;
* @return The maxEjectionPercent.
*/
com.google.protobuf.UInt32Value getMaxEjectionPercent();
/**
*
*最大熔断比例,超过多少比例后不会继续熔断
*
*
* .google.protobuf.UInt32Value maxEjectionPercent = 4;
*/
com.google.protobuf.UInt32ValueOrBuilder getMaxEjectionPercentOrBuilder();
/**
* .v1.CbPolicy.ConsecutiveErrConfig consecutive = 5;
* @return Whether the consecutive field is set.
*/
boolean hasConsecutive();
/**
* .v1.CbPolicy.ConsecutiveErrConfig consecutive = 5;
* @return The consecutive.
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig getConsecutive();
/**
* .v1.CbPolicy.ConsecutiveErrConfig consecutive = 5;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfigOrBuilder getConsecutiveOrBuilder();
}
/**
*
* 熔断策略
*
*
* Protobuf type {@code v1.CbPolicy}
*/
public static final class CbPolicy extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:v1.CbPolicy)
CbPolicyOrBuilder {
private static final long serialVersionUID = 0L;
// Use CbPolicy.newBuilder() to construct.
private CbPolicy(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CbPolicy() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CbPolicy();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.Builder.class);
}
public interface ErrRateConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:v1.CbPolicy.ErrRateConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
*是否启用错误率配置
*
*
* .google.protobuf.BoolValue enable = 1;
* @return Whether the enable field is set.
*/
boolean hasEnable();
/**
*
*是否启用错误率配置
*
*
* .google.protobuf.BoolValue enable = 1;
* @return The enable.
*/
com.google.protobuf.BoolValue getEnable();
/**
*
*是否启用错误率配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
com.google.protobuf.BoolValueOrBuilder getEnableOrBuilder();
/**
*
* 触发错误率熔断的最低请求阈值
*
*
* .google.protobuf.UInt32Value requestVolumeThreshold = 2;
* @return Whether the requestVolumeThreshold field is set.
*/
boolean hasRequestVolumeThreshold();
/**
*
* 触发错误率熔断的最低请求阈值
*
*
* .google.protobuf.UInt32Value requestVolumeThreshold = 2;
* @return The requestVolumeThreshold.
*/
com.google.protobuf.UInt32Value getRequestVolumeThreshold();
/**
*
* 触发错误率熔断的最低请求阈值
*
*
* .google.protobuf.UInt32Value requestVolumeThreshold = 2;
*/
com.google.protobuf.UInt32ValueOrBuilder getRequestVolumeThresholdOrBuilder();
/**
*
* 可选。触发保持状态的错误率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
* @return Whether the errorRateToPreserved field is set.
*/
boolean hasErrorRateToPreserved();
/**
*
* 可选。触发保持状态的错误率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
* @return The errorRateToPreserved.
*/
com.google.protobuf.UInt32Value getErrorRateToPreserved();
/**
*
* 可选。触发保持状态的错误率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
*/
com.google.protobuf.UInt32ValueOrBuilder getErrorRateToPreservedOrBuilder();
/**
*
* 触发熔断的错误率阈值
*
*
* .google.protobuf.UInt32Value errorRateToOpen = 4;
* @return Whether the errorRateToOpen field is set.
*/
boolean hasErrorRateToOpen();
/**
*
* 触发熔断的错误率阈值
*
*
* .google.protobuf.UInt32Value errorRateToOpen = 4;
* @return The errorRateToOpen.
*/
com.google.protobuf.UInt32Value getErrorRateToOpen();
/**
*
* 触发熔断的错误率阈值
*
*
* .google.protobuf.UInt32Value errorRateToOpen = 4;
*/
com.google.protobuf.UInt32ValueOrBuilder getErrorRateToOpenOrBuilder();
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
java.util.List
getSpecialsList();
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig getSpecials(int index);
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
int getSpecialsCount();
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfigOrBuilder>
getSpecialsOrBuilderList();
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfigOrBuilder getSpecialsOrBuilder(
int index);
}
/**
*
* 错误率熔断配置
*
*
* Protobuf type {@code v1.CbPolicy.ErrRateConfig}
*/
public static final class ErrRateConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:v1.CbPolicy.ErrRateConfig)
ErrRateConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use ErrRateConfig.newBuilder() to construct.
private ErrRateConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ErrRateConfig() {
specials_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ErrRateConfig();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_ErrRateConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_ErrRateConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.Builder.class);
}
public interface SpecialConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:v1.CbPolicy.ErrRateConfig.SpecialConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
* 熔断关心的错误类型,用户可以自己定义
*
*
* .google.protobuf.StringValue type = 1;
* @return Whether the type field is set.
*/
boolean hasType();
/**
*
* 熔断关心的错误类型,用户可以自己定义
*
*
* .google.protobuf.StringValue type = 1;
* @return The type.
*/
com.google.protobuf.StringValue getType();
/**
*
* 熔断关心的错误类型,用户可以自己定义
*
*
* .google.protobuf.StringValue type = 1;
*/
com.google.protobuf.StringValueOrBuilder getTypeOrBuilder();
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
java.util.List
getErrorCodesList();
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
com.google.protobuf.Int64Value getErrorCodes(int index);
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
int getErrorCodesCount();
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
java.util.List extends com.google.protobuf.Int64ValueOrBuilder>
getErrorCodesOrBuilderList();
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
com.google.protobuf.Int64ValueOrBuilder getErrorCodesOrBuilder(
int index);
/**
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
* @return Whether the errorRateToPreserved field is set.
*/
boolean hasErrorRateToPreserved();
/**
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
* @return The errorRateToPreserved.
*/
com.google.protobuf.UInt32Value getErrorRateToPreserved();
/**
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
*/
com.google.protobuf.UInt32ValueOrBuilder getErrorRateToPreservedOrBuilder();
/**
* .google.protobuf.UInt32Value errorRateToOpen = 4;
* @return Whether the errorRateToOpen field is set.
*/
boolean hasErrorRateToOpen();
/**
* .google.protobuf.UInt32Value errorRateToOpen = 4;
* @return The errorRateToOpen.
*/
com.google.protobuf.UInt32Value getErrorRateToOpen();
/**
* .google.protobuf.UInt32Value errorRateToOpen = 4;
*/
com.google.protobuf.UInt32ValueOrBuilder getErrorRateToOpenOrBuilder();
}
/**
*
*错误码相关特定配置
*
*
* Protobuf type {@code v1.CbPolicy.ErrRateConfig.SpecialConfig}
*/
public static final class SpecialConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:v1.CbPolicy.ErrRateConfig.SpecialConfig)
SpecialConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use SpecialConfig.newBuilder() to construct.
private SpecialConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SpecialConfig() {
errorCodes_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SpecialConfig();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_ErrRateConfig_SpecialConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_ErrRateConfig_SpecialConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig.Builder.class);
}
public static final int TYPE_FIELD_NUMBER = 1;
private com.google.protobuf.StringValue type_;
/**
*
* 熔断关心的错误类型,用户可以自己定义
*
*
* .google.protobuf.StringValue type = 1;
* @return Whether the type field is set.
*/
@java.lang.Override
public boolean hasType() {
return type_ != null;
}
/**
*
* 熔断关心的错误类型,用户可以自己定义
*
*
* .google.protobuf.StringValue type = 1;
* @return The type.
*/
@java.lang.Override
public com.google.protobuf.StringValue getType() {
return type_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : type_;
}
/**
*
* 熔断关心的错误类型,用户可以自己定义
*
*
* .google.protobuf.StringValue type = 1;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getTypeOrBuilder() {
return getType();
}
public static final int ERRORCODES_FIELD_NUMBER = 2;
private java.util.List errorCodes_;
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
@java.lang.Override
public java.util.List getErrorCodesList() {
return errorCodes_;
}
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
@java.lang.Override
public java.util.List extends com.google.protobuf.Int64ValueOrBuilder>
getErrorCodesOrBuilderList() {
return errorCodes_;
}
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
@java.lang.Override
public int getErrorCodesCount() {
return errorCodes_.size();
}
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
@java.lang.Override
public com.google.protobuf.Int64Value getErrorCodes(int index) {
return errorCodes_.get(index);
}
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
@java.lang.Override
public com.google.protobuf.Int64ValueOrBuilder getErrorCodesOrBuilder(
int index) {
return errorCodes_.get(index);
}
public static final int ERRORRATETOPRESERVED_FIELD_NUMBER = 3;
private com.google.protobuf.UInt32Value errorRateToPreserved_;
/**
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
* @return Whether the errorRateToPreserved field is set.
*/
@java.lang.Override
public boolean hasErrorRateToPreserved() {
return errorRateToPreserved_ != null;
}
/**
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
* @return The errorRateToPreserved.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getErrorRateToPreserved() {
return errorRateToPreserved_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : errorRateToPreserved_;
}
/**
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getErrorRateToPreservedOrBuilder() {
return getErrorRateToPreserved();
}
public static final int ERRORRATETOOPEN_FIELD_NUMBER = 4;
private com.google.protobuf.UInt32Value errorRateToOpen_;
/**
* .google.protobuf.UInt32Value errorRateToOpen = 4;
* @return Whether the errorRateToOpen field is set.
*/
@java.lang.Override
public boolean hasErrorRateToOpen() {
return errorRateToOpen_ != null;
}
/**
* .google.protobuf.UInt32Value errorRateToOpen = 4;
* @return The errorRateToOpen.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getErrorRateToOpen() {
return errorRateToOpen_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : errorRateToOpen_;
}
/**
* .google.protobuf.UInt32Value errorRateToOpen = 4;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getErrorRateToOpenOrBuilder() {
return getErrorRateToOpen();
}
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 (type_ != null) {
output.writeMessage(1, getType());
}
for (int i = 0; i < errorCodes_.size(); i++) {
output.writeMessage(2, errorCodes_.get(i));
}
if (errorRateToPreserved_ != null) {
output.writeMessage(3, getErrorRateToPreserved());
}
if (errorRateToOpen_ != null) {
output.writeMessage(4, getErrorRateToOpen());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (type_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getType());
}
for (int i = 0; i < errorCodes_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, errorCodes_.get(i));
}
if (errorRateToPreserved_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getErrorRateToPreserved());
}
if (errorRateToOpen_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getErrorRateToOpen());
}
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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig)) {
return super.equals(obj);
}
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig other = (com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig) obj;
if (hasType() != other.hasType()) return false;
if (hasType()) {
if (!getType()
.equals(other.getType())) return false;
}
if (!getErrorCodesList()
.equals(other.getErrorCodesList())) return false;
if (hasErrorRateToPreserved() != other.hasErrorRateToPreserved()) return false;
if (hasErrorRateToPreserved()) {
if (!getErrorRateToPreserved()
.equals(other.getErrorRateToPreserved())) return false;
}
if (hasErrorRateToOpen() != other.hasErrorRateToOpen()) return false;
if (hasErrorRateToOpen()) {
if (!getErrorRateToOpen()
.equals(other.getErrorRateToOpen())) 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 (hasType()) {
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + getType().hashCode();
}
if (getErrorCodesCount() > 0) {
hash = (37 * hash) + ERRORCODES_FIELD_NUMBER;
hash = (53 * hash) + getErrorCodesList().hashCode();
}
if (hasErrorRateToPreserved()) {
hash = (37 * hash) + ERRORRATETOPRESERVED_FIELD_NUMBER;
hash = (53 * hash) + getErrorRateToPreserved().hashCode();
}
if (hasErrorRateToOpen()) {
hash = (37 * hash) + ERRORRATETOOPEN_FIELD_NUMBER;
hash = (53 * hash) + getErrorRateToOpen().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig 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(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig 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 v1.CbPolicy.ErrRateConfig.SpecialConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:v1.CbPolicy.ErrRateConfig.SpecialConfig)
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_ErrRateConfig_SpecialConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_ErrRateConfig_SpecialConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig.Builder.class);
}
// Construct using com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
if (typeBuilder_ == null) {
type_ = null;
} else {
type_ = null;
typeBuilder_ = null;
}
if (errorCodesBuilder_ == null) {
errorCodes_ = java.util.Collections.emptyList();
} else {
errorCodes_ = null;
errorCodesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
if (errorRateToPreservedBuilder_ == null) {
errorRateToPreserved_ = null;
} else {
errorRateToPreserved_ = null;
errorRateToPreservedBuilder_ = null;
}
if (errorRateToOpenBuilder_ == null) {
errorRateToOpen_ = null;
} else {
errorRateToOpen_ = null;
errorRateToOpenBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_ErrRateConfig_SpecialConfig_descriptor;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig getDefaultInstanceForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig.getDefaultInstance();
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig build() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig buildPartial() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig result = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig(this);
int from_bitField0_ = bitField0_;
if (typeBuilder_ == null) {
result.type_ = type_;
} else {
result.type_ = typeBuilder_.build();
}
if (errorCodesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
errorCodes_ = java.util.Collections.unmodifiableList(errorCodes_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.errorCodes_ = errorCodes_;
} else {
result.errorCodes_ = errorCodesBuilder_.build();
}
if (errorRateToPreservedBuilder_ == null) {
result.errorRateToPreserved_ = errorRateToPreserved_;
} else {
result.errorRateToPreserved_ = errorRateToPreservedBuilder_.build();
}
if (errorRateToOpenBuilder_ == null) {
result.errorRateToOpen_ = errorRateToOpen_;
} else {
result.errorRateToOpen_ = errorRateToOpenBuilder_.build();
}
onBuilt();
return result;
}
@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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig) {
return mergeFrom((com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig other) {
if (other == com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig.getDefaultInstance()) return this;
if (other.hasType()) {
mergeType(other.getType());
}
if (errorCodesBuilder_ == null) {
if (!other.errorCodes_.isEmpty()) {
if (errorCodes_.isEmpty()) {
errorCodes_ = other.errorCodes_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureErrorCodesIsMutable();
errorCodes_.addAll(other.errorCodes_);
}
onChanged();
}
} else {
if (!other.errorCodes_.isEmpty()) {
if (errorCodesBuilder_.isEmpty()) {
errorCodesBuilder_.dispose();
errorCodesBuilder_ = null;
errorCodes_ = other.errorCodes_;
bitField0_ = (bitField0_ & ~0x00000001);
errorCodesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getErrorCodesFieldBuilder() : null;
} else {
errorCodesBuilder_.addAllMessages(other.errorCodes_);
}
}
}
if (other.hasErrorRateToPreserved()) {
mergeErrorRateToPreserved(other.getErrorRateToPreserved());
}
if (other.hasErrorRateToOpen()) {
mergeErrorRateToOpen(other.getErrorRateToOpen());
}
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(
getTypeFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 10
case 18: {
com.google.protobuf.Int64Value m =
input.readMessage(
com.google.protobuf.Int64Value.parser(),
extensionRegistry);
if (errorCodesBuilder_ == null) {
ensureErrorCodesIsMutable();
errorCodes_.add(m);
} else {
errorCodesBuilder_.addMessage(m);
}
break;
} // case 18
case 26: {
input.readMessage(
getErrorRateToPreservedFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 26
case 34: {
input.readMessage(
getErrorRateToOpenFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 34
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 type_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> typeBuilder_;
/**
*
* 熔断关心的错误类型,用户可以自己定义
*
*
* .google.protobuf.StringValue type = 1;
* @return Whether the type field is set.
*/
public boolean hasType() {
return typeBuilder_ != null || type_ != null;
}
/**
*
* 熔断关心的错误类型,用户可以自己定义
*
*
* .google.protobuf.StringValue type = 1;
* @return The type.
*/
public com.google.protobuf.StringValue getType() {
if (typeBuilder_ == null) {
return type_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : type_;
} else {
return typeBuilder_.getMessage();
}
}
/**
*
* 熔断关心的错误类型,用户可以自己定义
*
*
* .google.protobuf.StringValue type = 1;
*/
public Builder setType(com.google.protobuf.StringValue value) {
if (typeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
type_ = value;
onChanged();
} else {
typeBuilder_.setMessage(value);
}
return this;
}
/**
*
* 熔断关心的错误类型,用户可以自己定义
*
*
* .google.protobuf.StringValue type = 1;
*/
public Builder setType(
com.google.protobuf.StringValue.Builder builderForValue) {
if (typeBuilder_ == null) {
type_ = builderForValue.build();
onChanged();
} else {
typeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 熔断关心的错误类型,用户可以自己定义
*
*
* .google.protobuf.StringValue type = 1;
*/
public Builder mergeType(com.google.protobuf.StringValue value) {
if (typeBuilder_ == null) {
if (type_ != null) {
type_ =
com.google.protobuf.StringValue.newBuilder(type_).mergeFrom(value).buildPartial();
} else {
type_ = value;
}
onChanged();
} else {
typeBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 熔断关心的错误类型,用户可以自己定义
*
*
* .google.protobuf.StringValue type = 1;
*/
public Builder clearType() {
if (typeBuilder_ == null) {
type_ = null;
onChanged();
} else {
type_ = null;
typeBuilder_ = null;
}
return this;
}
/**
*
* 熔断关心的错误类型,用户可以自己定义
*
*
* .google.protobuf.StringValue type = 1;
*/
public com.google.protobuf.StringValue.Builder getTypeBuilder() {
onChanged();
return getTypeFieldBuilder().getBuilder();
}
/**
*
* 熔断关心的错误类型,用户可以自己定义
*
*
* .google.protobuf.StringValue type = 1;
*/
public com.google.protobuf.StringValueOrBuilder getTypeOrBuilder() {
if (typeBuilder_ != null) {
return typeBuilder_.getMessageOrBuilder();
} else {
return type_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : type_;
}
}
/**
*
* 熔断关心的错误类型,用户可以自己定义
*
*
* .google.protobuf.StringValue type = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>
getTypeFieldBuilder() {
if (typeBuilder_ == null) {
typeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>(
getType(),
getParentForChildren(),
isClean());
type_ = null;
}
return typeBuilder_;
}
private java.util.List errorCodes_ =
java.util.Collections.emptyList();
private void ensureErrorCodesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
errorCodes_ = new java.util.ArrayList(errorCodes_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> errorCodesBuilder_;
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
public java.util.List getErrorCodesList() {
if (errorCodesBuilder_ == null) {
return java.util.Collections.unmodifiableList(errorCodes_);
} else {
return errorCodesBuilder_.getMessageList();
}
}
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
public int getErrorCodesCount() {
if (errorCodesBuilder_ == null) {
return errorCodes_.size();
} else {
return errorCodesBuilder_.getCount();
}
}
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
public com.google.protobuf.Int64Value getErrorCodes(int index) {
if (errorCodesBuilder_ == null) {
return errorCodes_.get(index);
} else {
return errorCodesBuilder_.getMessage(index);
}
}
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
public Builder setErrorCodes(
int index, com.google.protobuf.Int64Value value) {
if (errorCodesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureErrorCodesIsMutable();
errorCodes_.set(index, value);
onChanged();
} else {
errorCodesBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
public Builder setErrorCodes(
int index, com.google.protobuf.Int64Value.Builder builderForValue) {
if (errorCodesBuilder_ == null) {
ensureErrorCodesIsMutable();
errorCodes_.set(index, builderForValue.build());
onChanged();
} else {
errorCodesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
public Builder addErrorCodes(com.google.protobuf.Int64Value value) {
if (errorCodesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureErrorCodesIsMutable();
errorCodes_.add(value);
onChanged();
} else {
errorCodesBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
public Builder addErrorCodes(
int index, com.google.protobuf.Int64Value value) {
if (errorCodesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureErrorCodesIsMutable();
errorCodes_.add(index, value);
onChanged();
} else {
errorCodesBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
public Builder addErrorCodes(
com.google.protobuf.Int64Value.Builder builderForValue) {
if (errorCodesBuilder_ == null) {
ensureErrorCodesIsMutable();
errorCodes_.add(builderForValue.build());
onChanged();
} else {
errorCodesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
public Builder addErrorCodes(
int index, com.google.protobuf.Int64Value.Builder builderForValue) {
if (errorCodesBuilder_ == null) {
ensureErrorCodesIsMutable();
errorCodes_.add(index, builderForValue.build());
onChanged();
} else {
errorCodesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
public Builder addAllErrorCodes(
java.lang.Iterable extends com.google.protobuf.Int64Value> values) {
if (errorCodesBuilder_ == null) {
ensureErrorCodesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, errorCodes_);
onChanged();
} else {
errorCodesBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
public Builder clearErrorCodes() {
if (errorCodesBuilder_ == null) {
errorCodes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
errorCodesBuilder_.clear();
}
return this;
}
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
public Builder removeErrorCodes(int index) {
if (errorCodesBuilder_ == null) {
ensureErrorCodesIsMutable();
errorCodes_.remove(index);
onChanged();
} else {
errorCodesBuilder_.remove(index);
}
return this;
}
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
public com.google.protobuf.Int64Value.Builder getErrorCodesBuilder(
int index) {
return getErrorCodesFieldBuilder().getBuilder(index);
}
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
public com.google.protobuf.Int64ValueOrBuilder getErrorCodesOrBuilder(
int index) {
if (errorCodesBuilder_ == null) {
return errorCodes_.get(index); } else {
return errorCodesBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
public java.util.List extends com.google.protobuf.Int64ValueOrBuilder>
getErrorCodesOrBuilderList() {
if (errorCodesBuilder_ != null) {
return errorCodesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(errorCodes_);
}
}
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
public com.google.protobuf.Int64Value.Builder addErrorCodesBuilder() {
return getErrorCodesFieldBuilder().addBuilder(
com.google.protobuf.Int64Value.getDefaultInstance());
}
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
public com.google.protobuf.Int64Value.Builder addErrorCodesBuilder(
int index) {
return getErrorCodesFieldBuilder().addBuilder(
index, com.google.protobuf.Int64Value.getDefaultInstance());
}
/**
* repeated .google.protobuf.Int64Value errorCodes = 2;
*/
public java.util.List
getErrorCodesBuilderList() {
return getErrorCodesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>
getErrorCodesFieldBuilder() {
if (errorCodesBuilder_ == null) {
errorCodesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>(
errorCodes_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
errorCodes_ = null;
}
return errorCodesBuilder_;
}
private com.google.protobuf.UInt32Value errorRateToPreserved_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> errorRateToPreservedBuilder_;
/**
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
* @return Whether the errorRateToPreserved field is set.
*/
public boolean hasErrorRateToPreserved() {
return errorRateToPreservedBuilder_ != null || errorRateToPreserved_ != null;
}
/**
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
* @return The errorRateToPreserved.
*/
public com.google.protobuf.UInt32Value getErrorRateToPreserved() {
if (errorRateToPreservedBuilder_ == null) {
return errorRateToPreserved_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : errorRateToPreserved_;
} else {
return errorRateToPreservedBuilder_.getMessage();
}
}
/**
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
*/
public Builder setErrorRateToPreserved(com.google.protobuf.UInt32Value value) {
if (errorRateToPreservedBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
errorRateToPreserved_ = value;
onChanged();
} else {
errorRateToPreservedBuilder_.setMessage(value);
}
return this;
}
/**
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
*/
public Builder setErrorRateToPreserved(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (errorRateToPreservedBuilder_ == null) {
errorRateToPreserved_ = builderForValue.build();
onChanged();
} else {
errorRateToPreservedBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
*/
public Builder mergeErrorRateToPreserved(com.google.protobuf.UInt32Value value) {
if (errorRateToPreservedBuilder_ == null) {
if (errorRateToPreserved_ != null) {
errorRateToPreserved_ =
com.google.protobuf.UInt32Value.newBuilder(errorRateToPreserved_).mergeFrom(value).buildPartial();
} else {
errorRateToPreserved_ = value;
}
onChanged();
} else {
errorRateToPreservedBuilder_.mergeFrom(value);
}
return this;
}
/**
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
*/
public Builder clearErrorRateToPreserved() {
if (errorRateToPreservedBuilder_ == null) {
errorRateToPreserved_ = null;
onChanged();
} else {
errorRateToPreserved_ = null;
errorRateToPreservedBuilder_ = null;
}
return this;
}
/**
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
*/
public com.google.protobuf.UInt32Value.Builder getErrorRateToPreservedBuilder() {
onChanged();
return getErrorRateToPreservedFieldBuilder().getBuilder();
}
/**
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
*/
public com.google.protobuf.UInt32ValueOrBuilder getErrorRateToPreservedOrBuilder() {
if (errorRateToPreservedBuilder_ != null) {
return errorRateToPreservedBuilder_.getMessageOrBuilder();
} else {
return errorRateToPreserved_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : errorRateToPreserved_;
}
}
/**
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getErrorRateToPreservedFieldBuilder() {
if (errorRateToPreservedBuilder_ == null) {
errorRateToPreservedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getErrorRateToPreserved(),
getParentForChildren(),
isClean());
errorRateToPreserved_ = null;
}
return errorRateToPreservedBuilder_;
}
private com.google.protobuf.UInt32Value errorRateToOpen_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> errorRateToOpenBuilder_;
/**
* .google.protobuf.UInt32Value errorRateToOpen = 4;
* @return Whether the errorRateToOpen field is set.
*/
public boolean hasErrorRateToOpen() {
return errorRateToOpenBuilder_ != null || errorRateToOpen_ != null;
}
/**
* .google.protobuf.UInt32Value errorRateToOpen = 4;
* @return The errorRateToOpen.
*/
public com.google.protobuf.UInt32Value getErrorRateToOpen() {
if (errorRateToOpenBuilder_ == null) {
return errorRateToOpen_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : errorRateToOpen_;
} else {
return errorRateToOpenBuilder_.getMessage();
}
}
/**
* .google.protobuf.UInt32Value errorRateToOpen = 4;
*/
public Builder setErrorRateToOpen(com.google.protobuf.UInt32Value value) {
if (errorRateToOpenBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
errorRateToOpen_ = value;
onChanged();
} else {
errorRateToOpenBuilder_.setMessage(value);
}
return this;
}
/**
* .google.protobuf.UInt32Value errorRateToOpen = 4;
*/
public Builder setErrorRateToOpen(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (errorRateToOpenBuilder_ == null) {
errorRateToOpen_ = builderForValue.build();
onChanged();
} else {
errorRateToOpenBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .google.protobuf.UInt32Value errorRateToOpen = 4;
*/
public Builder mergeErrorRateToOpen(com.google.protobuf.UInt32Value value) {
if (errorRateToOpenBuilder_ == null) {
if (errorRateToOpen_ != null) {
errorRateToOpen_ =
com.google.protobuf.UInt32Value.newBuilder(errorRateToOpen_).mergeFrom(value).buildPartial();
} else {
errorRateToOpen_ = value;
}
onChanged();
} else {
errorRateToOpenBuilder_.mergeFrom(value);
}
return this;
}
/**
* .google.protobuf.UInt32Value errorRateToOpen = 4;
*/
public Builder clearErrorRateToOpen() {
if (errorRateToOpenBuilder_ == null) {
errorRateToOpen_ = null;
onChanged();
} else {
errorRateToOpen_ = null;
errorRateToOpenBuilder_ = null;
}
return this;
}
/**
* .google.protobuf.UInt32Value errorRateToOpen = 4;
*/
public com.google.protobuf.UInt32Value.Builder getErrorRateToOpenBuilder() {
onChanged();
return getErrorRateToOpenFieldBuilder().getBuilder();
}
/**
* .google.protobuf.UInt32Value errorRateToOpen = 4;
*/
public com.google.protobuf.UInt32ValueOrBuilder getErrorRateToOpenOrBuilder() {
if (errorRateToOpenBuilder_ != null) {
return errorRateToOpenBuilder_.getMessageOrBuilder();
} else {
return errorRateToOpen_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : errorRateToOpen_;
}
}
/**
* .google.protobuf.UInt32Value errorRateToOpen = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getErrorRateToOpenFieldBuilder() {
if (errorRateToOpenBuilder_ == null) {
errorRateToOpenBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getErrorRateToOpen(),
getParentForChildren(),
isClean());
errorRateToOpen_ = null;
}
return errorRateToOpenBuilder_;
}
@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:v1.CbPolicy.ErrRateConfig.SpecialConfig)
}
// @@protoc_insertion_point(class_scope:v1.CbPolicy.ErrRateConfig.SpecialConfig)
private static final com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig();
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SpecialConfig 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int ENABLE_FIELD_NUMBER = 1;
private com.google.protobuf.BoolValue enable_;
/**
*
*是否启用错误率配置
*
*
* .google.protobuf.BoolValue enable = 1;
* @return Whether the enable field is set.
*/
@java.lang.Override
public boolean hasEnable() {
return enable_ != null;
}
/**
*
*是否启用错误率配置
*
*
* .google.protobuf.BoolValue enable = 1;
* @return The enable.
*/
@java.lang.Override
public com.google.protobuf.BoolValue getEnable() {
return enable_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enable_;
}
/**
*
*是否启用错误率配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
@java.lang.Override
public com.google.protobuf.BoolValueOrBuilder getEnableOrBuilder() {
return getEnable();
}
public static final int REQUESTVOLUMETHRESHOLD_FIELD_NUMBER = 2;
private com.google.protobuf.UInt32Value requestVolumeThreshold_;
/**
*
* 触发错误率熔断的最低请求阈值
*
*
* .google.protobuf.UInt32Value requestVolumeThreshold = 2;
* @return Whether the requestVolumeThreshold field is set.
*/
@java.lang.Override
public boolean hasRequestVolumeThreshold() {
return requestVolumeThreshold_ != null;
}
/**
*
* 触发错误率熔断的最低请求阈值
*
*
* .google.protobuf.UInt32Value requestVolumeThreshold = 2;
* @return The requestVolumeThreshold.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getRequestVolumeThreshold() {
return requestVolumeThreshold_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : requestVolumeThreshold_;
}
/**
*
* 触发错误率熔断的最低请求阈值
*
*
* .google.protobuf.UInt32Value requestVolumeThreshold = 2;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getRequestVolumeThresholdOrBuilder() {
return getRequestVolumeThreshold();
}
public static final int ERRORRATETOPRESERVED_FIELD_NUMBER = 3;
private com.google.protobuf.UInt32Value errorRateToPreserved_;
/**
*
* 可选。触发保持状态的错误率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
* @return Whether the errorRateToPreserved field is set.
*/
@java.lang.Override
public boolean hasErrorRateToPreserved() {
return errorRateToPreserved_ != null;
}
/**
*
* 可选。触发保持状态的错误率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
* @return The errorRateToPreserved.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getErrorRateToPreserved() {
return errorRateToPreserved_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : errorRateToPreserved_;
}
/**
*
* 可选。触发保持状态的错误率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getErrorRateToPreservedOrBuilder() {
return getErrorRateToPreserved();
}
public static final int ERRORRATETOOPEN_FIELD_NUMBER = 4;
private com.google.protobuf.UInt32Value errorRateToOpen_;
/**
*
* 触发熔断的错误率阈值
*
*
* .google.protobuf.UInt32Value errorRateToOpen = 4;
* @return Whether the errorRateToOpen field is set.
*/
@java.lang.Override
public boolean hasErrorRateToOpen() {
return errorRateToOpen_ != null;
}
/**
*
* 触发熔断的错误率阈值
*
*
* .google.protobuf.UInt32Value errorRateToOpen = 4;
* @return The errorRateToOpen.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getErrorRateToOpen() {
return errorRateToOpen_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : errorRateToOpen_;
}
/**
*
* 触发熔断的错误率阈值
*
*
* .google.protobuf.UInt32Value errorRateToOpen = 4;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getErrorRateToOpenOrBuilder() {
return getErrorRateToOpen();
}
public static final int SPECIALS_FIELD_NUMBER = 5;
private java.util.List specials_;
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
@java.lang.Override
public java.util.List getSpecialsList() {
return specials_;
}
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
@java.lang.Override
public java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfigOrBuilder>
getSpecialsOrBuilderList() {
return specials_;
}
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
@java.lang.Override
public int getSpecialsCount() {
return specials_.size();
}
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig getSpecials(int index) {
return specials_.get(index);
}
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfigOrBuilder getSpecialsOrBuilder(
int index) {
return specials_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (enable_ != null) {
output.writeMessage(1, getEnable());
}
if (requestVolumeThreshold_ != null) {
output.writeMessage(2, getRequestVolumeThreshold());
}
if (errorRateToPreserved_ != null) {
output.writeMessage(3, getErrorRateToPreserved());
}
if (errorRateToOpen_ != null) {
output.writeMessage(4, getErrorRateToOpen());
}
for (int i = 0; i < specials_.size(); i++) {
output.writeMessage(5, specials_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (enable_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getEnable());
}
if (requestVolumeThreshold_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getRequestVolumeThreshold());
}
if (errorRateToPreserved_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getErrorRateToPreserved());
}
if (errorRateToOpen_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getErrorRateToOpen());
}
for (int i = 0; i < specials_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, specials_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig)) {
return super.equals(obj);
}
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig other = (com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig) obj;
if (hasEnable() != other.hasEnable()) return false;
if (hasEnable()) {
if (!getEnable()
.equals(other.getEnable())) return false;
}
if (hasRequestVolumeThreshold() != other.hasRequestVolumeThreshold()) return false;
if (hasRequestVolumeThreshold()) {
if (!getRequestVolumeThreshold()
.equals(other.getRequestVolumeThreshold())) return false;
}
if (hasErrorRateToPreserved() != other.hasErrorRateToPreserved()) return false;
if (hasErrorRateToPreserved()) {
if (!getErrorRateToPreserved()
.equals(other.getErrorRateToPreserved())) return false;
}
if (hasErrorRateToOpen() != other.hasErrorRateToOpen()) return false;
if (hasErrorRateToOpen()) {
if (!getErrorRateToOpen()
.equals(other.getErrorRateToOpen())) return false;
}
if (!getSpecialsList()
.equals(other.getSpecialsList())) 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 (hasEnable()) {
hash = (37 * hash) + ENABLE_FIELD_NUMBER;
hash = (53 * hash) + getEnable().hashCode();
}
if (hasRequestVolumeThreshold()) {
hash = (37 * hash) + REQUESTVOLUMETHRESHOLD_FIELD_NUMBER;
hash = (53 * hash) + getRequestVolumeThreshold().hashCode();
}
if (hasErrorRateToPreserved()) {
hash = (37 * hash) + ERRORRATETOPRESERVED_FIELD_NUMBER;
hash = (53 * hash) + getErrorRateToPreserved().hashCode();
}
if (hasErrorRateToOpen()) {
hash = (37 * hash) + ERRORRATETOOPEN_FIELD_NUMBER;
hash = (53 * hash) + getErrorRateToOpen().hashCode();
}
if (getSpecialsCount() > 0) {
hash = (37 * hash) + SPECIALS_FIELD_NUMBER;
hash = (53 * hash) + getSpecialsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig 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(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig 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 v1.CbPolicy.ErrRateConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:v1.CbPolicy.ErrRateConfig)
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_ErrRateConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_ErrRateConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.Builder.class);
}
// Construct using com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
if (enableBuilder_ == null) {
enable_ = null;
} else {
enable_ = null;
enableBuilder_ = null;
}
if (requestVolumeThresholdBuilder_ == null) {
requestVolumeThreshold_ = null;
} else {
requestVolumeThreshold_ = null;
requestVolumeThresholdBuilder_ = null;
}
if (errorRateToPreservedBuilder_ == null) {
errorRateToPreserved_ = null;
} else {
errorRateToPreserved_ = null;
errorRateToPreservedBuilder_ = null;
}
if (errorRateToOpenBuilder_ == null) {
errorRateToOpen_ = null;
} else {
errorRateToOpen_ = null;
errorRateToOpenBuilder_ = null;
}
if (specialsBuilder_ == null) {
specials_ = java.util.Collections.emptyList();
} else {
specials_ = null;
specialsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_ErrRateConfig_descriptor;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig getDefaultInstanceForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.getDefaultInstance();
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig build() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig buildPartial() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig result = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig(this);
int from_bitField0_ = bitField0_;
if (enableBuilder_ == null) {
result.enable_ = enable_;
} else {
result.enable_ = enableBuilder_.build();
}
if (requestVolumeThresholdBuilder_ == null) {
result.requestVolumeThreshold_ = requestVolumeThreshold_;
} else {
result.requestVolumeThreshold_ = requestVolumeThresholdBuilder_.build();
}
if (errorRateToPreservedBuilder_ == null) {
result.errorRateToPreserved_ = errorRateToPreserved_;
} else {
result.errorRateToPreserved_ = errorRateToPreservedBuilder_.build();
}
if (errorRateToOpenBuilder_ == null) {
result.errorRateToOpen_ = errorRateToOpen_;
} else {
result.errorRateToOpen_ = errorRateToOpenBuilder_.build();
}
if (specialsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
specials_ = java.util.Collections.unmodifiableList(specials_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.specials_ = specials_;
} else {
result.specials_ = specialsBuilder_.build();
}
onBuilt();
return result;
}
@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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig) {
return mergeFrom((com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig other) {
if (other == com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.getDefaultInstance()) return this;
if (other.hasEnable()) {
mergeEnable(other.getEnable());
}
if (other.hasRequestVolumeThreshold()) {
mergeRequestVolumeThreshold(other.getRequestVolumeThreshold());
}
if (other.hasErrorRateToPreserved()) {
mergeErrorRateToPreserved(other.getErrorRateToPreserved());
}
if (other.hasErrorRateToOpen()) {
mergeErrorRateToOpen(other.getErrorRateToOpen());
}
if (specialsBuilder_ == null) {
if (!other.specials_.isEmpty()) {
if (specials_.isEmpty()) {
specials_ = other.specials_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureSpecialsIsMutable();
specials_.addAll(other.specials_);
}
onChanged();
}
} else {
if (!other.specials_.isEmpty()) {
if (specialsBuilder_.isEmpty()) {
specialsBuilder_.dispose();
specialsBuilder_ = null;
specials_ = other.specials_;
bitField0_ = (bitField0_ & ~0x00000001);
specialsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getSpecialsFieldBuilder() : null;
} else {
specialsBuilder_.addAllMessages(other.specials_);
}
}
}
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(
getEnableFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 10
case 18: {
input.readMessage(
getRequestVolumeThresholdFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 18
case 26: {
input.readMessage(
getErrorRateToPreservedFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 26
case 34: {
input.readMessage(
getErrorRateToOpenFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 34
case 42: {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig m =
input.readMessage(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig.parser(),
extensionRegistry);
if (specialsBuilder_ == null) {
ensureSpecialsIsMutable();
specials_.add(m);
} else {
specialsBuilder_.addMessage(m);
}
break;
} // case 42
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.protobuf.BoolValue enable_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> enableBuilder_;
/**
*
*是否启用错误率配置
*
*
* .google.protobuf.BoolValue enable = 1;
* @return Whether the enable field is set.
*/
public boolean hasEnable() {
return enableBuilder_ != null || enable_ != null;
}
/**
*
*是否启用错误率配置
*
*
* .google.protobuf.BoolValue enable = 1;
* @return The enable.
*/
public com.google.protobuf.BoolValue getEnable() {
if (enableBuilder_ == null) {
return enable_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enable_;
} else {
return enableBuilder_.getMessage();
}
}
/**
*
*是否启用错误率配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
public Builder setEnable(com.google.protobuf.BoolValue value) {
if (enableBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
enable_ = value;
onChanged();
} else {
enableBuilder_.setMessage(value);
}
return this;
}
/**
*
*是否启用错误率配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
public Builder setEnable(
com.google.protobuf.BoolValue.Builder builderForValue) {
if (enableBuilder_ == null) {
enable_ = builderForValue.build();
onChanged();
} else {
enableBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
*是否启用错误率配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
public Builder mergeEnable(com.google.protobuf.BoolValue value) {
if (enableBuilder_ == null) {
if (enable_ != null) {
enable_ =
com.google.protobuf.BoolValue.newBuilder(enable_).mergeFrom(value).buildPartial();
} else {
enable_ = value;
}
onChanged();
} else {
enableBuilder_.mergeFrom(value);
}
return this;
}
/**
*
*是否启用错误率配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
public Builder clearEnable() {
if (enableBuilder_ == null) {
enable_ = null;
onChanged();
} else {
enable_ = null;
enableBuilder_ = null;
}
return this;
}
/**
*
*是否启用错误率配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
public com.google.protobuf.BoolValue.Builder getEnableBuilder() {
onChanged();
return getEnableFieldBuilder().getBuilder();
}
/**
*
*是否启用错误率配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
public com.google.protobuf.BoolValueOrBuilder getEnableOrBuilder() {
if (enableBuilder_ != null) {
return enableBuilder_.getMessageOrBuilder();
} else {
return enable_ == null ?
com.google.protobuf.BoolValue.getDefaultInstance() : enable_;
}
}
/**
*
*是否启用错误率配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>
getEnableFieldBuilder() {
if (enableBuilder_ == null) {
enableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>(
getEnable(),
getParentForChildren(),
isClean());
enable_ = null;
}
return enableBuilder_;
}
private com.google.protobuf.UInt32Value requestVolumeThreshold_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> requestVolumeThresholdBuilder_;
/**
*
* 触发错误率熔断的最低请求阈值
*
*
* .google.protobuf.UInt32Value requestVolumeThreshold = 2;
* @return Whether the requestVolumeThreshold field is set.
*/
public boolean hasRequestVolumeThreshold() {
return requestVolumeThresholdBuilder_ != null || requestVolumeThreshold_ != null;
}
/**
*
* 触发错误率熔断的最低请求阈值
*
*
* .google.protobuf.UInt32Value requestVolumeThreshold = 2;
* @return The requestVolumeThreshold.
*/
public com.google.protobuf.UInt32Value getRequestVolumeThreshold() {
if (requestVolumeThresholdBuilder_ == null) {
return requestVolumeThreshold_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : requestVolumeThreshold_;
} else {
return requestVolumeThresholdBuilder_.getMessage();
}
}
/**
*
* 触发错误率熔断的最低请求阈值
*
*
* .google.protobuf.UInt32Value requestVolumeThreshold = 2;
*/
public Builder setRequestVolumeThreshold(com.google.protobuf.UInt32Value value) {
if (requestVolumeThresholdBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
requestVolumeThreshold_ = value;
onChanged();
} else {
requestVolumeThresholdBuilder_.setMessage(value);
}
return this;
}
/**
*
* 触发错误率熔断的最低请求阈值
*
*
* .google.protobuf.UInt32Value requestVolumeThreshold = 2;
*/
public Builder setRequestVolumeThreshold(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (requestVolumeThresholdBuilder_ == null) {
requestVolumeThreshold_ = builderForValue.build();
onChanged();
} else {
requestVolumeThresholdBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 触发错误率熔断的最低请求阈值
*
*
* .google.protobuf.UInt32Value requestVolumeThreshold = 2;
*/
public Builder mergeRequestVolumeThreshold(com.google.protobuf.UInt32Value value) {
if (requestVolumeThresholdBuilder_ == null) {
if (requestVolumeThreshold_ != null) {
requestVolumeThreshold_ =
com.google.protobuf.UInt32Value.newBuilder(requestVolumeThreshold_).mergeFrom(value).buildPartial();
} else {
requestVolumeThreshold_ = value;
}
onChanged();
} else {
requestVolumeThresholdBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 触发错误率熔断的最低请求阈值
*
*
* .google.protobuf.UInt32Value requestVolumeThreshold = 2;
*/
public Builder clearRequestVolumeThreshold() {
if (requestVolumeThresholdBuilder_ == null) {
requestVolumeThreshold_ = null;
onChanged();
} else {
requestVolumeThreshold_ = null;
requestVolumeThresholdBuilder_ = null;
}
return this;
}
/**
*
* 触发错误率熔断的最低请求阈值
*
*
* .google.protobuf.UInt32Value requestVolumeThreshold = 2;
*/
public com.google.protobuf.UInt32Value.Builder getRequestVolumeThresholdBuilder() {
onChanged();
return getRequestVolumeThresholdFieldBuilder().getBuilder();
}
/**
*
* 触发错误率熔断的最低请求阈值
*
*
* .google.protobuf.UInt32Value requestVolumeThreshold = 2;
*/
public com.google.protobuf.UInt32ValueOrBuilder getRequestVolumeThresholdOrBuilder() {
if (requestVolumeThresholdBuilder_ != null) {
return requestVolumeThresholdBuilder_.getMessageOrBuilder();
} else {
return requestVolumeThreshold_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : requestVolumeThreshold_;
}
}
/**
*
* 触发错误率熔断的最低请求阈值
*
*
* .google.protobuf.UInt32Value requestVolumeThreshold = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getRequestVolumeThresholdFieldBuilder() {
if (requestVolumeThresholdBuilder_ == null) {
requestVolumeThresholdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getRequestVolumeThreshold(),
getParentForChildren(),
isClean());
requestVolumeThreshold_ = null;
}
return requestVolumeThresholdBuilder_;
}
private com.google.protobuf.UInt32Value errorRateToPreserved_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> errorRateToPreservedBuilder_;
/**
*
* 可选。触发保持状态的错误率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
* @return Whether the errorRateToPreserved field is set.
*/
public boolean hasErrorRateToPreserved() {
return errorRateToPreservedBuilder_ != null || errorRateToPreserved_ != null;
}
/**
*
* 可选。触发保持状态的错误率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
* @return The errorRateToPreserved.
*/
public com.google.protobuf.UInt32Value getErrorRateToPreserved() {
if (errorRateToPreservedBuilder_ == null) {
return errorRateToPreserved_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : errorRateToPreserved_;
} else {
return errorRateToPreservedBuilder_.getMessage();
}
}
/**
*
* 可选。触发保持状态的错误率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
*/
public Builder setErrorRateToPreserved(com.google.protobuf.UInt32Value value) {
if (errorRateToPreservedBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
errorRateToPreserved_ = value;
onChanged();
} else {
errorRateToPreservedBuilder_.setMessage(value);
}
return this;
}
/**
*
* 可选。触发保持状态的错误率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
*/
public Builder setErrorRateToPreserved(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (errorRateToPreservedBuilder_ == null) {
errorRateToPreserved_ = builderForValue.build();
onChanged();
} else {
errorRateToPreservedBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 可选。触发保持状态的错误率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
*/
public Builder mergeErrorRateToPreserved(com.google.protobuf.UInt32Value value) {
if (errorRateToPreservedBuilder_ == null) {
if (errorRateToPreserved_ != null) {
errorRateToPreserved_ =
com.google.protobuf.UInt32Value.newBuilder(errorRateToPreserved_).mergeFrom(value).buildPartial();
} else {
errorRateToPreserved_ = value;
}
onChanged();
} else {
errorRateToPreservedBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 可选。触发保持状态的错误率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
*/
public Builder clearErrorRateToPreserved() {
if (errorRateToPreservedBuilder_ == null) {
errorRateToPreserved_ = null;
onChanged();
} else {
errorRateToPreserved_ = null;
errorRateToPreservedBuilder_ = null;
}
return this;
}
/**
*
* 可选。触发保持状态的错误率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
*/
public com.google.protobuf.UInt32Value.Builder getErrorRateToPreservedBuilder() {
onChanged();
return getErrorRateToPreservedFieldBuilder().getBuilder();
}
/**
*
* 可选。触发保持状态的错误率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
*/
public com.google.protobuf.UInt32ValueOrBuilder getErrorRateToPreservedOrBuilder() {
if (errorRateToPreservedBuilder_ != null) {
return errorRateToPreservedBuilder_.getMessageOrBuilder();
} else {
return errorRateToPreserved_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : errorRateToPreserved_;
}
}
/**
*
* 可选。触发保持状态的错误率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value errorRateToPreserved = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getErrorRateToPreservedFieldBuilder() {
if (errorRateToPreservedBuilder_ == null) {
errorRateToPreservedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getErrorRateToPreserved(),
getParentForChildren(),
isClean());
errorRateToPreserved_ = null;
}
return errorRateToPreservedBuilder_;
}
private com.google.protobuf.UInt32Value errorRateToOpen_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> errorRateToOpenBuilder_;
/**
*
* 触发熔断的错误率阈值
*
*
* .google.protobuf.UInt32Value errorRateToOpen = 4;
* @return Whether the errorRateToOpen field is set.
*/
public boolean hasErrorRateToOpen() {
return errorRateToOpenBuilder_ != null || errorRateToOpen_ != null;
}
/**
*
* 触发熔断的错误率阈值
*
*
* .google.protobuf.UInt32Value errorRateToOpen = 4;
* @return The errorRateToOpen.
*/
public com.google.protobuf.UInt32Value getErrorRateToOpen() {
if (errorRateToOpenBuilder_ == null) {
return errorRateToOpen_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : errorRateToOpen_;
} else {
return errorRateToOpenBuilder_.getMessage();
}
}
/**
*
* 触发熔断的错误率阈值
*
*
* .google.protobuf.UInt32Value errorRateToOpen = 4;
*/
public Builder setErrorRateToOpen(com.google.protobuf.UInt32Value value) {
if (errorRateToOpenBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
errorRateToOpen_ = value;
onChanged();
} else {
errorRateToOpenBuilder_.setMessage(value);
}
return this;
}
/**
*
* 触发熔断的错误率阈值
*
*
* .google.protobuf.UInt32Value errorRateToOpen = 4;
*/
public Builder setErrorRateToOpen(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (errorRateToOpenBuilder_ == null) {
errorRateToOpen_ = builderForValue.build();
onChanged();
} else {
errorRateToOpenBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 触发熔断的错误率阈值
*
*
* .google.protobuf.UInt32Value errorRateToOpen = 4;
*/
public Builder mergeErrorRateToOpen(com.google.protobuf.UInt32Value value) {
if (errorRateToOpenBuilder_ == null) {
if (errorRateToOpen_ != null) {
errorRateToOpen_ =
com.google.protobuf.UInt32Value.newBuilder(errorRateToOpen_).mergeFrom(value).buildPartial();
} else {
errorRateToOpen_ = value;
}
onChanged();
} else {
errorRateToOpenBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 触发熔断的错误率阈值
*
*
* .google.protobuf.UInt32Value errorRateToOpen = 4;
*/
public Builder clearErrorRateToOpen() {
if (errorRateToOpenBuilder_ == null) {
errorRateToOpen_ = null;
onChanged();
} else {
errorRateToOpen_ = null;
errorRateToOpenBuilder_ = null;
}
return this;
}
/**
*
* 触发熔断的错误率阈值
*
*
* .google.protobuf.UInt32Value errorRateToOpen = 4;
*/
public com.google.protobuf.UInt32Value.Builder getErrorRateToOpenBuilder() {
onChanged();
return getErrorRateToOpenFieldBuilder().getBuilder();
}
/**
*
* 触发熔断的错误率阈值
*
*
* .google.protobuf.UInt32Value errorRateToOpen = 4;
*/
public com.google.protobuf.UInt32ValueOrBuilder getErrorRateToOpenOrBuilder() {
if (errorRateToOpenBuilder_ != null) {
return errorRateToOpenBuilder_.getMessageOrBuilder();
} else {
return errorRateToOpen_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : errorRateToOpen_;
}
}
/**
*
* 触发熔断的错误率阈值
*
*
* .google.protobuf.UInt32Value errorRateToOpen = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getErrorRateToOpenFieldBuilder() {
if (errorRateToOpenBuilder_ == null) {
errorRateToOpenBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getErrorRateToOpen(),
getParentForChildren(),
isClean());
errorRateToOpen_ = null;
}
return errorRateToOpenBuilder_;
}
private java.util.List specials_ =
java.util.Collections.emptyList();
private void ensureSpecialsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
specials_ = new java.util.ArrayList(specials_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfigOrBuilder> specialsBuilder_;
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
public java.util.List getSpecialsList() {
if (specialsBuilder_ == null) {
return java.util.Collections.unmodifiableList(specials_);
} else {
return specialsBuilder_.getMessageList();
}
}
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
public int getSpecialsCount() {
if (specialsBuilder_ == null) {
return specials_.size();
} else {
return specialsBuilder_.getCount();
}
}
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig getSpecials(int index) {
if (specialsBuilder_ == null) {
return specials_.get(index);
} else {
return specialsBuilder_.getMessage(index);
}
}
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
public Builder setSpecials(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig value) {
if (specialsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSpecialsIsMutable();
specials_.set(index, value);
onChanged();
} else {
specialsBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
public Builder setSpecials(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig.Builder builderForValue) {
if (specialsBuilder_ == null) {
ensureSpecialsIsMutable();
specials_.set(index, builderForValue.build());
onChanged();
} else {
specialsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
public Builder addSpecials(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig value) {
if (specialsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSpecialsIsMutable();
specials_.add(value);
onChanged();
} else {
specialsBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
public Builder addSpecials(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig value) {
if (specialsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSpecialsIsMutable();
specials_.add(index, value);
onChanged();
} else {
specialsBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
public Builder addSpecials(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig.Builder builderForValue) {
if (specialsBuilder_ == null) {
ensureSpecialsIsMutable();
specials_.add(builderForValue.build());
onChanged();
} else {
specialsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
public Builder addSpecials(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig.Builder builderForValue) {
if (specialsBuilder_ == null) {
ensureSpecialsIsMutable();
specials_.add(index, builderForValue.build());
onChanged();
} else {
specialsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
public Builder addAllSpecials(
java.lang.Iterable extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig> values) {
if (specialsBuilder_ == null) {
ensureSpecialsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, specials_);
onChanged();
} else {
specialsBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
public Builder clearSpecials() {
if (specialsBuilder_ == null) {
specials_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
specialsBuilder_.clear();
}
return this;
}
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
public Builder removeSpecials(int index) {
if (specialsBuilder_ == null) {
ensureSpecialsIsMutable();
specials_.remove(index);
onChanged();
} else {
specialsBuilder_.remove(index);
}
return this;
}
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig.Builder getSpecialsBuilder(
int index) {
return getSpecialsFieldBuilder().getBuilder(index);
}
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfigOrBuilder getSpecialsOrBuilder(
int index) {
if (specialsBuilder_ == null) {
return specials_.get(index); } else {
return specialsBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
public java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfigOrBuilder>
getSpecialsOrBuilderList() {
if (specialsBuilder_ != null) {
return specialsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(specials_);
}
}
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig.Builder addSpecialsBuilder() {
return getSpecialsFieldBuilder().addBuilder(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig.getDefaultInstance());
}
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig.Builder addSpecialsBuilder(
int index) {
return getSpecialsFieldBuilder().addBuilder(
index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig.getDefaultInstance());
}
/**
* repeated .v1.CbPolicy.ErrRateConfig.SpecialConfig specials = 5;
*/
public java.util.List
getSpecialsBuilderList() {
return getSpecialsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfigOrBuilder>
getSpecialsFieldBuilder() {
if (specialsBuilder_ == null) {
specialsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfig.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.SpecialConfigOrBuilder>(
specials_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
specials_ = null;
}
return specialsBuilder_;
}
@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:v1.CbPolicy.ErrRateConfig)
}
// @@protoc_insertion_point(class_scope:v1.CbPolicy.ErrRateConfig)
private static final com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig();
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ErrRateConfig 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SlowRateConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:v1.CbPolicy.SlowRateConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
* 是否启用慢调用率配置
*
*
* .google.protobuf.BoolValue enable = 1;
* @return Whether the enable field is set.
*/
boolean hasEnable();
/**
*
* 是否启用慢调用率配置
*
*
* .google.protobuf.BoolValue enable = 1;
* @return The enable.
*/
com.google.protobuf.BoolValue getEnable();
/**
*
* 是否启用慢调用率配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
com.google.protobuf.BoolValueOrBuilder getEnableOrBuilder();
/**
*
* 最大响应时间,超过该时间属于慢调用请求
*
*
* .google.protobuf.Duration maxRt = 2;
* @return Whether the maxRt field is set.
*/
boolean hasMaxRt();
/**
*
* 最大响应时间,超过该时间属于慢调用请求
*
*
* .google.protobuf.Duration maxRt = 2;
* @return The maxRt.
*/
com.google.protobuf.Duration getMaxRt();
/**
*
* 最大响应时间,超过该时间属于慢调用请求
*
*
* .google.protobuf.Duration maxRt = 2;
*/
com.google.protobuf.DurationOrBuilder getMaxRtOrBuilder();
/**
*
* 可选。触发保持状态的超时率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value slowRateToPreserved = 3;
* @return Whether the slowRateToPreserved field is set.
*/
boolean hasSlowRateToPreserved();
/**
*
* 可选。触发保持状态的超时率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value slowRateToPreserved = 3;
* @return The slowRateToPreserved.
*/
com.google.protobuf.UInt32Value getSlowRateToPreserved();
/**
*
* 可选。触发保持状态的超时率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value slowRateToPreserved = 3;
*/
com.google.protobuf.UInt32ValueOrBuilder getSlowRateToPreservedOrBuilder();
/**
*
* 触发熔断的超时率阈值
*
*
* .google.protobuf.UInt32Value slowRateToOpen = 4;
* @return Whether the slowRateToOpen field is set.
*/
boolean hasSlowRateToOpen();
/**
*
* 触发熔断的超时率阈值
*
*
* .google.protobuf.UInt32Value slowRateToOpen = 4;
* @return The slowRateToOpen.
*/
com.google.protobuf.UInt32Value getSlowRateToOpen();
/**
*
* 触发熔断的超时率阈值
*
*
* .google.protobuf.UInt32Value slowRateToOpen = 4;
*/
com.google.protobuf.UInt32ValueOrBuilder getSlowRateToOpenOrBuilder();
}
/**
*
* 慢调用率熔断策略配置
*
*
* Protobuf type {@code v1.CbPolicy.SlowRateConfig}
*/
public static final class SlowRateConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:v1.CbPolicy.SlowRateConfig)
SlowRateConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use SlowRateConfig.newBuilder() to construct.
private SlowRateConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SlowRateConfig() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SlowRateConfig();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_SlowRateConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_SlowRateConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig.Builder.class);
}
public static final int ENABLE_FIELD_NUMBER = 1;
private com.google.protobuf.BoolValue enable_;
/**
*
* 是否启用慢调用率配置
*
*
* .google.protobuf.BoolValue enable = 1;
* @return Whether the enable field is set.
*/
@java.lang.Override
public boolean hasEnable() {
return enable_ != null;
}
/**
*
* 是否启用慢调用率配置
*
*
* .google.protobuf.BoolValue enable = 1;
* @return The enable.
*/
@java.lang.Override
public com.google.protobuf.BoolValue getEnable() {
return enable_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enable_;
}
/**
*
* 是否启用慢调用率配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
@java.lang.Override
public com.google.protobuf.BoolValueOrBuilder getEnableOrBuilder() {
return getEnable();
}
public static final int MAXRT_FIELD_NUMBER = 2;
private com.google.protobuf.Duration maxRt_;
/**
*
* 最大响应时间,超过该时间属于慢调用请求
*
*
* .google.protobuf.Duration maxRt = 2;
* @return Whether the maxRt field is set.
*/
@java.lang.Override
public boolean hasMaxRt() {
return maxRt_ != null;
}
/**
*
* 最大响应时间,超过该时间属于慢调用请求
*
*
* .google.protobuf.Duration maxRt = 2;
* @return The maxRt.
*/
@java.lang.Override
public com.google.protobuf.Duration getMaxRt() {
return maxRt_ == null ? com.google.protobuf.Duration.getDefaultInstance() : maxRt_;
}
/**
*
* 最大响应时间,超过该时间属于慢调用请求
*
*
* .google.protobuf.Duration maxRt = 2;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getMaxRtOrBuilder() {
return getMaxRt();
}
public static final int SLOWRATETOPRESERVED_FIELD_NUMBER = 3;
private com.google.protobuf.UInt32Value slowRateToPreserved_;
/**
*
* 可选。触发保持状态的超时率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value slowRateToPreserved = 3;
* @return Whether the slowRateToPreserved field is set.
*/
@java.lang.Override
public boolean hasSlowRateToPreserved() {
return slowRateToPreserved_ != null;
}
/**
*
* 可选。触发保持状态的超时率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value slowRateToPreserved = 3;
* @return The slowRateToPreserved.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getSlowRateToPreserved() {
return slowRateToPreserved_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : slowRateToPreserved_;
}
/**
*
* 可选。触发保持状态的超时率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value slowRateToPreserved = 3;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getSlowRateToPreservedOrBuilder() {
return getSlowRateToPreserved();
}
public static final int SLOWRATETOOPEN_FIELD_NUMBER = 4;
private com.google.protobuf.UInt32Value slowRateToOpen_;
/**
*
* 触发熔断的超时率阈值
*
*
* .google.protobuf.UInt32Value slowRateToOpen = 4;
* @return Whether the slowRateToOpen field is set.
*/
@java.lang.Override
public boolean hasSlowRateToOpen() {
return slowRateToOpen_ != null;
}
/**
*
* 触发熔断的超时率阈值
*
*
* .google.protobuf.UInt32Value slowRateToOpen = 4;
* @return The slowRateToOpen.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getSlowRateToOpen() {
return slowRateToOpen_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : slowRateToOpen_;
}
/**
*
* 触发熔断的超时率阈值
*
*
* .google.protobuf.UInt32Value slowRateToOpen = 4;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getSlowRateToOpenOrBuilder() {
return getSlowRateToOpen();
}
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 (enable_ != null) {
output.writeMessage(1, getEnable());
}
if (maxRt_ != null) {
output.writeMessage(2, getMaxRt());
}
if (slowRateToPreserved_ != null) {
output.writeMessage(3, getSlowRateToPreserved());
}
if (slowRateToOpen_ != null) {
output.writeMessage(4, getSlowRateToOpen());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (enable_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getEnable());
}
if (maxRt_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getMaxRt());
}
if (slowRateToPreserved_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getSlowRateToPreserved());
}
if (slowRateToOpen_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getSlowRateToOpen());
}
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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig)) {
return super.equals(obj);
}
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig other = (com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig) obj;
if (hasEnable() != other.hasEnable()) return false;
if (hasEnable()) {
if (!getEnable()
.equals(other.getEnable())) return false;
}
if (hasMaxRt() != other.hasMaxRt()) return false;
if (hasMaxRt()) {
if (!getMaxRt()
.equals(other.getMaxRt())) return false;
}
if (hasSlowRateToPreserved() != other.hasSlowRateToPreserved()) return false;
if (hasSlowRateToPreserved()) {
if (!getSlowRateToPreserved()
.equals(other.getSlowRateToPreserved())) return false;
}
if (hasSlowRateToOpen() != other.hasSlowRateToOpen()) return false;
if (hasSlowRateToOpen()) {
if (!getSlowRateToOpen()
.equals(other.getSlowRateToOpen())) 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 (hasEnable()) {
hash = (37 * hash) + ENABLE_FIELD_NUMBER;
hash = (53 * hash) + getEnable().hashCode();
}
if (hasMaxRt()) {
hash = (37 * hash) + MAXRT_FIELD_NUMBER;
hash = (53 * hash) + getMaxRt().hashCode();
}
if (hasSlowRateToPreserved()) {
hash = (37 * hash) + SLOWRATETOPRESERVED_FIELD_NUMBER;
hash = (53 * hash) + getSlowRateToPreserved().hashCode();
}
if (hasSlowRateToOpen()) {
hash = (37 * hash) + SLOWRATETOOPEN_FIELD_NUMBER;
hash = (53 * hash) + getSlowRateToOpen().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig 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(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig 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 v1.CbPolicy.SlowRateConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:v1.CbPolicy.SlowRateConfig)
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_SlowRateConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_SlowRateConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig.Builder.class);
}
// Construct using com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
if (enableBuilder_ == null) {
enable_ = null;
} else {
enable_ = null;
enableBuilder_ = null;
}
if (maxRtBuilder_ == null) {
maxRt_ = null;
} else {
maxRt_ = null;
maxRtBuilder_ = null;
}
if (slowRateToPreservedBuilder_ == null) {
slowRateToPreserved_ = null;
} else {
slowRateToPreserved_ = null;
slowRateToPreservedBuilder_ = null;
}
if (slowRateToOpenBuilder_ == null) {
slowRateToOpen_ = null;
} else {
slowRateToOpen_ = null;
slowRateToOpenBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_SlowRateConfig_descriptor;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig getDefaultInstanceForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig.getDefaultInstance();
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig build() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig buildPartial() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig result = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig(this);
if (enableBuilder_ == null) {
result.enable_ = enable_;
} else {
result.enable_ = enableBuilder_.build();
}
if (maxRtBuilder_ == null) {
result.maxRt_ = maxRt_;
} else {
result.maxRt_ = maxRtBuilder_.build();
}
if (slowRateToPreservedBuilder_ == null) {
result.slowRateToPreserved_ = slowRateToPreserved_;
} else {
result.slowRateToPreserved_ = slowRateToPreservedBuilder_.build();
}
if (slowRateToOpenBuilder_ == null) {
result.slowRateToOpen_ = slowRateToOpen_;
} else {
result.slowRateToOpen_ = slowRateToOpenBuilder_.build();
}
onBuilt();
return result;
}
@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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig) {
return mergeFrom((com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig other) {
if (other == com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig.getDefaultInstance()) return this;
if (other.hasEnable()) {
mergeEnable(other.getEnable());
}
if (other.hasMaxRt()) {
mergeMaxRt(other.getMaxRt());
}
if (other.hasSlowRateToPreserved()) {
mergeSlowRateToPreserved(other.getSlowRateToPreserved());
}
if (other.hasSlowRateToOpen()) {
mergeSlowRateToOpen(other.getSlowRateToOpen());
}
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(
getEnableFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 10
case 18: {
input.readMessage(
getMaxRtFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 18
case 26: {
input.readMessage(
getSlowRateToPreservedFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 26
case 34: {
input.readMessage(
getSlowRateToOpenFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 34
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 com.google.protobuf.BoolValue enable_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> enableBuilder_;
/**
*
* 是否启用慢调用率配置
*
*
* .google.protobuf.BoolValue enable = 1;
* @return Whether the enable field is set.
*/
public boolean hasEnable() {
return enableBuilder_ != null || enable_ != null;
}
/**
*
* 是否启用慢调用率配置
*
*
* .google.protobuf.BoolValue enable = 1;
* @return The enable.
*/
public com.google.protobuf.BoolValue getEnable() {
if (enableBuilder_ == null) {
return enable_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enable_;
} else {
return enableBuilder_.getMessage();
}
}
/**
*
* 是否启用慢调用率配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
public Builder setEnable(com.google.protobuf.BoolValue value) {
if (enableBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
enable_ = value;
onChanged();
} else {
enableBuilder_.setMessage(value);
}
return this;
}
/**
*
* 是否启用慢调用率配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
public Builder setEnable(
com.google.protobuf.BoolValue.Builder builderForValue) {
if (enableBuilder_ == null) {
enable_ = builderForValue.build();
onChanged();
} else {
enableBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 是否启用慢调用率配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
public Builder mergeEnable(com.google.protobuf.BoolValue value) {
if (enableBuilder_ == null) {
if (enable_ != null) {
enable_ =
com.google.protobuf.BoolValue.newBuilder(enable_).mergeFrom(value).buildPartial();
} else {
enable_ = value;
}
onChanged();
} else {
enableBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 是否启用慢调用率配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
public Builder clearEnable() {
if (enableBuilder_ == null) {
enable_ = null;
onChanged();
} else {
enable_ = null;
enableBuilder_ = null;
}
return this;
}
/**
*
* 是否启用慢调用率配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
public com.google.protobuf.BoolValue.Builder getEnableBuilder() {
onChanged();
return getEnableFieldBuilder().getBuilder();
}
/**
*
* 是否启用慢调用率配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
public com.google.protobuf.BoolValueOrBuilder getEnableOrBuilder() {
if (enableBuilder_ != null) {
return enableBuilder_.getMessageOrBuilder();
} else {
return enable_ == null ?
com.google.protobuf.BoolValue.getDefaultInstance() : enable_;
}
}
/**
*
* 是否启用慢调用率配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>
getEnableFieldBuilder() {
if (enableBuilder_ == null) {
enableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>(
getEnable(),
getParentForChildren(),
isClean());
enable_ = null;
}
return enableBuilder_;
}
private com.google.protobuf.Duration maxRt_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> maxRtBuilder_;
/**
*
* 最大响应时间,超过该时间属于慢调用请求
*
*
* .google.protobuf.Duration maxRt = 2;
* @return Whether the maxRt field is set.
*/
public boolean hasMaxRt() {
return maxRtBuilder_ != null || maxRt_ != null;
}
/**
*
* 最大响应时间,超过该时间属于慢调用请求
*
*
* .google.protobuf.Duration maxRt = 2;
* @return The maxRt.
*/
public com.google.protobuf.Duration getMaxRt() {
if (maxRtBuilder_ == null) {
return maxRt_ == null ? com.google.protobuf.Duration.getDefaultInstance() : maxRt_;
} else {
return maxRtBuilder_.getMessage();
}
}
/**
*
* 最大响应时间,超过该时间属于慢调用请求
*
*
* .google.protobuf.Duration maxRt = 2;
*/
public Builder setMaxRt(com.google.protobuf.Duration value) {
if (maxRtBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
maxRt_ = value;
onChanged();
} else {
maxRtBuilder_.setMessage(value);
}
return this;
}
/**
*
* 最大响应时间,超过该时间属于慢调用请求
*
*
* .google.protobuf.Duration maxRt = 2;
*/
public Builder setMaxRt(
com.google.protobuf.Duration.Builder builderForValue) {
if (maxRtBuilder_ == null) {
maxRt_ = builderForValue.build();
onChanged();
} else {
maxRtBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 最大响应时间,超过该时间属于慢调用请求
*
*
* .google.protobuf.Duration maxRt = 2;
*/
public Builder mergeMaxRt(com.google.protobuf.Duration value) {
if (maxRtBuilder_ == null) {
if (maxRt_ != null) {
maxRt_ =
com.google.protobuf.Duration.newBuilder(maxRt_).mergeFrom(value).buildPartial();
} else {
maxRt_ = value;
}
onChanged();
} else {
maxRtBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 最大响应时间,超过该时间属于慢调用请求
*
*
* .google.protobuf.Duration maxRt = 2;
*/
public Builder clearMaxRt() {
if (maxRtBuilder_ == null) {
maxRt_ = null;
onChanged();
} else {
maxRt_ = null;
maxRtBuilder_ = null;
}
return this;
}
/**
*
* 最大响应时间,超过该时间属于慢调用请求
*
*
* .google.protobuf.Duration maxRt = 2;
*/
public com.google.protobuf.Duration.Builder getMaxRtBuilder() {
onChanged();
return getMaxRtFieldBuilder().getBuilder();
}
/**
*
* 最大响应时间,超过该时间属于慢调用请求
*
*
* .google.protobuf.Duration maxRt = 2;
*/
public com.google.protobuf.DurationOrBuilder getMaxRtOrBuilder() {
if (maxRtBuilder_ != null) {
return maxRtBuilder_.getMessageOrBuilder();
} else {
return maxRt_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : maxRt_;
}
}
/**
*
* 最大响应时间,超过该时间属于慢调用请求
*
*
* .google.protobuf.Duration maxRt = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getMaxRtFieldBuilder() {
if (maxRtBuilder_ == null) {
maxRtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getMaxRt(),
getParentForChildren(),
isClean());
maxRt_ = null;
}
return maxRtBuilder_;
}
private com.google.protobuf.UInt32Value slowRateToPreserved_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> slowRateToPreservedBuilder_;
/**
*
* 可选。触发保持状态的超时率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value slowRateToPreserved = 3;
* @return Whether the slowRateToPreserved field is set.
*/
public boolean hasSlowRateToPreserved() {
return slowRateToPreservedBuilder_ != null || slowRateToPreserved_ != null;
}
/**
*
* 可选。触发保持状态的超时率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value slowRateToPreserved = 3;
* @return The slowRateToPreserved.
*/
public com.google.protobuf.UInt32Value getSlowRateToPreserved() {
if (slowRateToPreservedBuilder_ == null) {
return slowRateToPreserved_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : slowRateToPreserved_;
} else {
return slowRateToPreservedBuilder_.getMessage();
}
}
/**
*
* 可选。触发保持状态的超时率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value slowRateToPreserved = 3;
*/
public Builder setSlowRateToPreserved(com.google.protobuf.UInt32Value value) {
if (slowRateToPreservedBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
slowRateToPreserved_ = value;
onChanged();
} else {
slowRateToPreservedBuilder_.setMessage(value);
}
return this;
}
/**
*
* 可选。触发保持状态的超时率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value slowRateToPreserved = 3;
*/
public Builder setSlowRateToPreserved(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (slowRateToPreservedBuilder_ == null) {
slowRateToPreserved_ = builderForValue.build();
onChanged();
} else {
slowRateToPreservedBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 可选。触发保持状态的超时率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value slowRateToPreserved = 3;
*/
public Builder mergeSlowRateToPreserved(com.google.protobuf.UInt32Value value) {
if (slowRateToPreservedBuilder_ == null) {
if (slowRateToPreserved_ != null) {
slowRateToPreserved_ =
com.google.protobuf.UInt32Value.newBuilder(slowRateToPreserved_).mergeFrom(value).buildPartial();
} else {
slowRateToPreserved_ = value;
}
onChanged();
} else {
slowRateToPreservedBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 可选。触发保持状态的超时率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value slowRateToPreserved = 3;
*/
public Builder clearSlowRateToPreserved() {
if (slowRateToPreservedBuilder_ == null) {
slowRateToPreserved_ = null;
onChanged();
} else {
slowRateToPreserved_ = null;
slowRateToPreservedBuilder_ = null;
}
return this;
}
/**
*
* 可选。触发保持状态的超时率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value slowRateToPreserved = 3;
*/
public com.google.protobuf.UInt32Value.Builder getSlowRateToPreservedBuilder() {
onChanged();
return getSlowRateToPreservedFieldBuilder().getBuilder();
}
/**
*
* 可选。触发保持状态的超时率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value slowRateToPreserved = 3;
*/
public com.google.protobuf.UInt32ValueOrBuilder getSlowRateToPreservedOrBuilder() {
if (slowRateToPreservedBuilder_ != null) {
return slowRateToPreservedBuilder_.getMessageOrBuilder();
} else {
return slowRateToPreserved_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : slowRateToPreserved_;
}
}
/**
*
* 可选。触发保持状态的超时率阈值,假如不配置,则默认不会进入Preserved状态
*
*
* .google.protobuf.UInt32Value slowRateToPreserved = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getSlowRateToPreservedFieldBuilder() {
if (slowRateToPreservedBuilder_ == null) {
slowRateToPreservedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getSlowRateToPreserved(),
getParentForChildren(),
isClean());
slowRateToPreserved_ = null;
}
return slowRateToPreservedBuilder_;
}
private com.google.protobuf.UInt32Value slowRateToOpen_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> slowRateToOpenBuilder_;
/**
*
* 触发熔断的超时率阈值
*
*
* .google.protobuf.UInt32Value slowRateToOpen = 4;
* @return Whether the slowRateToOpen field is set.
*/
public boolean hasSlowRateToOpen() {
return slowRateToOpenBuilder_ != null || slowRateToOpen_ != null;
}
/**
*
* 触发熔断的超时率阈值
*
*
* .google.protobuf.UInt32Value slowRateToOpen = 4;
* @return The slowRateToOpen.
*/
public com.google.protobuf.UInt32Value getSlowRateToOpen() {
if (slowRateToOpenBuilder_ == null) {
return slowRateToOpen_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : slowRateToOpen_;
} else {
return slowRateToOpenBuilder_.getMessage();
}
}
/**
*
* 触发熔断的超时率阈值
*
*
* .google.protobuf.UInt32Value slowRateToOpen = 4;
*/
public Builder setSlowRateToOpen(com.google.protobuf.UInt32Value value) {
if (slowRateToOpenBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
slowRateToOpen_ = value;
onChanged();
} else {
slowRateToOpenBuilder_.setMessage(value);
}
return this;
}
/**
*
* 触发熔断的超时率阈值
*
*
* .google.protobuf.UInt32Value slowRateToOpen = 4;
*/
public Builder setSlowRateToOpen(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (slowRateToOpenBuilder_ == null) {
slowRateToOpen_ = builderForValue.build();
onChanged();
} else {
slowRateToOpenBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 触发熔断的超时率阈值
*
*
* .google.protobuf.UInt32Value slowRateToOpen = 4;
*/
public Builder mergeSlowRateToOpen(com.google.protobuf.UInt32Value value) {
if (slowRateToOpenBuilder_ == null) {
if (slowRateToOpen_ != null) {
slowRateToOpen_ =
com.google.protobuf.UInt32Value.newBuilder(slowRateToOpen_).mergeFrom(value).buildPartial();
} else {
slowRateToOpen_ = value;
}
onChanged();
} else {
slowRateToOpenBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 触发熔断的超时率阈值
*
*
* .google.protobuf.UInt32Value slowRateToOpen = 4;
*/
public Builder clearSlowRateToOpen() {
if (slowRateToOpenBuilder_ == null) {
slowRateToOpen_ = null;
onChanged();
} else {
slowRateToOpen_ = null;
slowRateToOpenBuilder_ = null;
}
return this;
}
/**
*
* 触发熔断的超时率阈值
*
*
* .google.protobuf.UInt32Value slowRateToOpen = 4;
*/
public com.google.protobuf.UInt32Value.Builder getSlowRateToOpenBuilder() {
onChanged();
return getSlowRateToOpenFieldBuilder().getBuilder();
}
/**
*
* 触发熔断的超时率阈值
*
*
* .google.protobuf.UInt32Value slowRateToOpen = 4;
*/
public com.google.protobuf.UInt32ValueOrBuilder getSlowRateToOpenOrBuilder() {
if (slowRateToOpenBuilder_ != null) {
return slowRateToOpenBuilder_.getMessageOrBuilder();
} else {
return slowRateToOpen_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : slowRateToOpen_;
}
}
/**
*
* 触发熔断的超时率阈值
*
*
* .google.protobuf.UInt32Value slowRateToOpen = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getSlowRateToOpenFieldBuilder() {
if (slowRateToOpenBuilder_ == null) {
slowRateToOpenBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getSlowRateToOpen(),
getParentForChildren(),
isClean());
slowRateToOpen_ = null;
}
return slowRateToOpenBuilder_;
}
@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:v1.CbPolicy.SlowRateConfig)
}
// @@protoc_insertion_point(class_scope:v1.CbPolicy.SlowRateConfig)
private static final com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig();
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SlowRateConfig 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ConsecutiveErrConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:v1.CbPolicy.ConsecutiveErrConfig)
com.google.protobuf.MessageOrBuilder {
/**
*
* 是否启用连续错误数配置
*
*
* .google.protobuf.BoolValue enable = 1;
* @return Whether the enable field is set.
*/
boolean hasEnable();
/**
*
* 是否启用连续错误数配置
*
*
* .google.protobuf.BoolValue enable = 1;
* @return The enable.
*/
com.google.protobuf.BoolValue getEnable();
/**
*
* 是否启用连续错误数配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
com.google.protobuf.BoolValueOrBuilder getEnableOrBuilder();
/**
*
* 连续错误数阈值,进入Preserved状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToPreserved = 2;
* @return Whether the consecutiveErrorToPreserved field is set.
*/
boolean hasConsecutiveErrorToPreserved();
/**
*
* 连续错误数阈值,进入Preserved状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToPreserved = 2;
* @return The consecutiveErrorToPreserved.
*/
com.google.protobuf.UInt32Value getConsecutiveErrorToPreserved();
/**
*
* 连续错误数阈值,进入Preserved状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToPreserved = 2;
*/
com.google.protobuf.UInt32ValueOrBuilder getConsecutiveErrorToPreservedOrBuilder();
/**
*
* 连续错误数阈值,进入Open状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToOpen = 3;
* @return Whether the consecutiveErrorToOpen field is set.
*/
boolean hasConsecutiveErrorToOpen();
/**
*
* 连续错误数阈值,进入Open状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToOpen = 3;
* @return The consecutiveErrorToOpen.
*/
com.google.protobuf.UInt32Value getConsecutiveErrorToOpen();
/**
*
* 连续错误数阈值,进入Open状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToOpen = 3;
*/
com.google.protobuf.UInt32ValueOrBuilder getConsecutiveErrorToOpenOrBuilder();
}
/**
*
*连续错误数熔断配置
*
*
* Protobuf type {@code v1.CbPolicy.ConsecutiveErrConfig}
*/
public static final class ConsecutiveErrConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:v1.CbPolicy.ConsecutiveErrConfig)
ConsecutiveErrConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use ConsecutiveErrConfig.newBuilder() to construct.
private ConsecutiveErrConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ConsecutiveErrConfig() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ConsecutiveErrConfig();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_ConsecutiveErrConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_ConsecutiveErrConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig.Builder.class);
}
public static final int ENABLE_FIELD_NUMBER = 1;
private com.google.protobuf.BoolValue enable_;
/**
*
* 是否启用连续错误数配置
*
*
* .google.protobuf.BoolValue enable = 1;
* @return Whether the enable field is set.
*/
@java.lang.Override
public boolean hasEnable() {
return enable_ != null;
}
/**
*
* 是否启用连续错误数配置
*
*
* .google.protobuf.BoolValue enable = 1;
* @return The enable.
*/
@java.lang.Override
public com.google.protobuf.BoolValue getEnable() {
return enable_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enable_;
}
/**
*
* 是否启用连续错误数配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
@java.lang.Override
public com.google.protobuf.BoolValueOrBuilder getEnableOrBuilder() {
return getEnable();
}
public static final int CONSECUTIVEERRORTOPRESERVED_FIELD_NUMBER = 2;
private com.google.protobuf.UInt32Value consecutiveErrorToPreserved_;
/**
*
* 连续错误数阈值,进入Preserved状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToPreserved = 2;
* @return Whether the consecutiveErrorToPreserved field is set.
*/
@java.lang.Override
public boolean hasConsecutiveErrorToPreserved() {
return consecutiveErrorToPreserved_ != null;
}
/**
*
* 连续错误数阈值,进入Preserved状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToPreserved = 2;
* @return The consecutiveErrorToPreserved.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getConsecutiveErrorToPreserved() {
return consecutiveErrorToPreserved_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : consecutiveErrorToPreserved_;
}
/**
*
* 连续错误数阈值,进入Preserved状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToPreserved = 2;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getConsecutiveErrorToPreservedOrBuilder() {
return getConsecutiveErrorToPreserved();
}
public static final int CONSECUTIVEERRORTOOPEN_FIELD_NUMBER = 3;
private com.google.protobuf.UInt32Value consecutiveErrorToOpen_;
/**
*
* 连续错误数阈值,进入Open状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToOpen = 3;
* @return Whether the consecutiveErrorToOpen field is set.
*/
@java.lang.Override
public boolean hasConsecutiveErrorToOpen() {
return consecutiveErrorToOpen_ != null;
}
/**
*
* 连续错误数阈值,进入Open状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToOpen = 3;
* @return The consecutiveErrorToOpen.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getConsecutiveErrorToOpen() {
return consecutiveErrorToOpen_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : consecutiveErrorToOpen_;
}
/**
*
* 连续错误数阈值,进入Open状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToOpen = 3;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getConsecutiveErrorToOpenOrBuilder() {
return getConsecutiveErrorToOpen();
}
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 (enable_ != null) {
output.writeMessage(1, getEnable());
}
if (consecutiveErrorToPreserved_ != null) {
output.writeMessage(2, getConsecutiveErrorToPreserved());
}
if (consecutiveErrorToOpen_ != null) {
output.writeMessage(3, getConsecutiveErrorToOpen());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (enable_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getEnable());
}
if (consecutiveErrorToPreserved_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getConsecutiveErrorToPreserved());
}
if (consecutiveErrorToOpen_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getConsecutiveErrorToOpen());
}
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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig)) {
return super.equals(obj);
}
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig other = (com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig) obj;
if (hasEnable() != other.hasEnable()) return false;
if (hasEnable()) {
if (!getEnable()
.equals(other.getEnable())) return false;
}
if (hasConsecutiveErrorToPreserved() != other.hasConsecutiveErrorToPreserved()) return false;
if (hasConsecutiveErrorToPreserved()) {
if (!getConsecutiveErrorToPreserved()
.equals(other.getConsecutiveErrorToPreserved())) return false;
}
if (hasConsecutiveErrorToOpen() != other.hasConsecutiveErrorToOpen()) return false;
if (hasConsecutiveErrorToOpen()) {
if (!getConsecutiveErrorToOpen()
.equals(other.getConsecutiveErrorToOpen())) 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 (hasEnable()) {
hash = (37 * hash) + ENABLE_FIELD_NUMBER;
hash = (53 * hash) + getEnable().hashCode();
}
if (hasConsecutiveErrorToPreserved()) {
hash = (37 * hash) + CONSECUTIVEERRORTOPRESERVED_FIELD_NUMBER;
hash = (53 * hash) + getConsecutiveErrorToPreserved().hashCode();
}
if (hasConsecutiveErrorToOpen()) {
hash = (37 * hash) + CONSECUTIVEERRORTOOPEN_FIELD_NUMBER;
hash = (53 * hash) + getConsecutiveErrorToOpen().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig 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(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig 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 v1.CbPolicy.ConsecutiveErrConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:v1.CbPolicy.ConsecutiveErrConfig)
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_ConsecutiveErrConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_ConsecutiveErrConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig.Builder.class);
}
// Construct using com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
if (enableBuilder_ == null) {
enable_ = null;
} else {
enable_ = null;
enableBuilder_ = null;
}
if (consecutiveErrorToPreservedBuilder_ == null) {
consecutiveErrorToPreserved_ = null;
} else {
consecutiveErrorToPreserved_ = null;
consecutiveErrorToPreservedBuilder_ = null;
}
if (consecutiveErrorToOpenBuilder_ == null) {
consecutiveErrorToOpen_ = null;
} else {
consecutiveErrorToOpen_ = null;
consecutiveErrorToOpenBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_ConsecutiveErrConfig_descriptor;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig getDefaultInstanceForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig.getDefaultInstance();
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig build() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig buildPartial() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig result = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig(this);
if (enableBuilder_ == null) {
result.enable_ = enable_;
} else {
result.enable_ = enableBuilder_.build();
}
if (consecutiveErrorToPreservedBuilder_ == null) {
result.consecutiveErrorToPreserved_ = consecutiveErrorToPreserved_;
} else {
result.consecutiveErrorToPreserved_ = consecutiveErrorToPreservedBuilder_.build();
}
if (consecutiveErrorToOpenBuilder_ == null) {
result.consecutiveErrorToOpen_ = consecutiveErrorToOpen_;
} else {
result.consecutiveErrorToOpen_ = consecutiveErrorToOpenBuilder_.build();
}
onBuilt();
return result;
}
@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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig) {
return mergeFrom((com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig other) {
if (other == com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig.getDefaultInstance()) return this;
if (other.hasEnable()) {
mergeEnable(other.getEnable());
}
if (other.hasConsecutiveErrorToPreserved()) {
mergeConsecutiveErrorToPreserved(other.getConsecutiveErrorToPreserved());
}
if (other.hasConsecutiveErrorToOpen()) {
mergeConsecutiveErrorToOpen(other.getConsecutiveErrorToOpen());
}
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(
getEnableFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 10
case 18: {
input.readMessage(
getConsecutiveErrorToPreservedFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 18
case 26: {
input.readMessage(
getConsecutiveErrorToOpenFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 26
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 com.google.protobuf.BoolValue enable_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> enableBuilder_;
/**
*
* 是否启用连续错误数配置
*
*
* .google.protobuf.BoolValue enable = 1;
* @return Whether the enable field is set.
*/
public boolean hasEnable() {
return enableBuilder_ != null || enable_ != null;
}
/**
*
* 是否启用连续错误数配置
*
*
* .google.protobuf.BoolValue enable = 1;
* @return The enable.
*/
public com.google.protobuf.BoolValue getEnable() {
if (enableBuilder_ == null) {
return enable_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enable_;
} else {
return enableBuilder_.getMessage();
}
}
/**
*
* 是否启用连续错误数配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
public Builder setEnable(com.google.protobuf.BoolValue value) {
if (enableBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
enable_ = value;
onChanged();
} else {
enableBuilder_.setMessage(value);
}
return this;
}
/**
*
* 是否启用连续错误数配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
public Builder setEnable(
com.google.protobuf.BoolValue.Builder builderForValue) {
if (enableBuilder_ == null) {
enable_ = builderForValue.build();
onChanged();
} else {
enableBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 是否启用连续错误数配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
public Builder mergeEnable(com.google.protobuf.BoolValue value) {
if (enableBuilder_ == null) {
if (enable_ != null) {
enable_ =
com.google.protobuf.BoolValue.newBuilder(enable_).mergeFrom(value).buildPartial();
} else {
enable_ = value;
}
onChanged();
} else {
enableBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 是否启用连续错误数配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
public Builder clearEnable() {
if (enableBuilder_ == null) {
enable_ = null;
onChanged();
} else {
enable_ = null;
enableBuilder_ = null;
}
return this;
}
/**
*
* 是否启用连续错误数配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
public com.google.protobuf.BoolValue.Builder getEnableBuilder() {
onChanged();
return getEnableFieldBuilder().getBuilder();
}
/**
*
* 是否启用连续错误数配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
public com.google.protobuf.BoolValueOrBuilder getEnableOrBuilder() {
if (enableBuilder_ != null) {
return enableBuilder_.getMessageOrBuilder();
} else {
return enable_ == null ?
com.google.protobuf.BoolValue.getDefaultInstance() : enable_;
}
}
/**
*
* 是否启用连续错误数配置
*
*
* .google.protobuf.BoolValue enable = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>
getEnableFieldBuilder() {
if (enableBuilder_ == null) {
enableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>(
getEnable(),
getParentForChildren(),
isClean());
enable_ = null;
}
return enableBuilder_;
}
private com.google.protobuf.UInt32Value consecutiveErrorToPreserved_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> consecutiveErrorToPreservedBuilder_;
/**
*
* 连续错误数阈值,进入Preserved状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToPreserved = 2;
* @return Whether the consecutiveErrorToPreserved field is set.
*/
public boolean hasConsecutiveErrorToPreserved() {
return consecutiveErrorToPreservedBuilder_ != null || consecutiveErrorToPreserved_ != null;
}
/**
*
* 连续错误数阈值,进入Preserved状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToPreserved = 2;
* @return The consecutiveErrorToPreserved.
*/
public com.google.protobuf.UInt32Value getConsecutiveErrorToPreserved() {
if (consecutiveErrorToPreservedBuilder_ == null) {
return consecutiveErrorToPreserved_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : consecutiveErrorToPreserved_;
} else {
return consecutiveErrorToPreservedBuilder_.getMessage();
}
}
/**
*
* 连续错误数阈值,进入Preserved状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToPreserved = 2;
*/
public Builder setConsecutiveErrorToPreserved(com.google.protobuf.UInt32Value value) {
if (consecutiveErrorToPreservedBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
consecutiveErrorToPreserved_ = value;
onChanged();
} else {
consecutiveErrorToPreservedBuilder_.setMessage(value);
}
return this;
}
/**
*
* 连续错误数阈值,进入Preserved状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToPreserved = 2;
*/
public Builder setConsecutiveErrorToPreserved(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (consecutiveErrorToPreservedBuilder_ == null) {
consecutiveErrorToPreserved_ = builderForValue.build();
onChanged();
} else {
consecutiveErrorToPreservedBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 连续错误数阈值,进入Preserved状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToPreserved = 2;
*/
public Builder mergeConsecutiveErrorToPreserved(com.google.protobuf.UInt32Value value) {
if (consecutiveErrorToPreservedBuilder_ == null) {
if (consecutiveErrorToPreserved_ != null) {
consecutiveErrorToPreserved_ =
com.google.protobuf.UInt32Value.newBuilder(consecutiveErrorToPreserved_).mergeFrom(value).buildPartial();
} else {
consecutiveErrorToPreserved_ = value;
}
onChanged();
} else {
consecutiveErrorToPreservedBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 连续错误数阈值,进入Preserved状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToPreserved = 2;
*/
public Builder clearConsecutiveErrorToPreserved() {
if (consecutiveErrorToPreservedBuilder_ == null) {
consecutiveErrorToPreserved_ = null;
onChanged();
} else {
consecutiveErrorToPreserved_ = null;
consecutiveErrorToPreservedBuilder_ = null;
}
return this;
}
/**
*
* 连续错误数阈值,进入Preserved状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToPreserved = 2;
*/
public com.google.protobuf.UInt32Value.Builder getConsecutiveErrorToPreservedBuilder() {
onChanged();
return getConsecutiveErrorToPreservedFieldBuilder().getBuilder();
}
/**
*
* 连续错误数阈值,进入Preserved状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToPreserved = 2;
*/
public com.google.protobuf.UInt32ValueOrBuilder getConsecutiveErrorToPreservedOrBuilder() {
if (consecutiveErrorToPreservedBuilder_ != null) {
return consecutiveErrorToPreservedBuilder_.getMessageOrBuilder();
} else {
return consecutiveErrorToPreserved_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : consecutiveErrorToPreserved_;
}
}
/**
*
* 连续错误数阈值,进入Preserved状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToPreserved = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getConsecutiveErrorToPreservedFieldBuilder() {
if (consecutiveErrorToPreservedBuilder_ == null) {
consecutiveErrorToPreservedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getConsecutiveErrorToPreserved(),
getParentForChildren(),
isClean());
consecutiveErrorToPreserved_ = null;
}
return consecutiveErrorToPreservedBuilder_;
}
private com.google.protobuf.UInt32Value consecutiveErrorToOpen_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> consecutiveErrorToOpenBuilder_;
/**
*
* 连续错误数阈值,进入Open状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToOpen = 3;
* @return Whether the consecutiveErrorToOpen field is set.
*/
public boolean hasConsecutiveErrorToOpen() {
return consecutiveErrorToOpenBuilder_ != null || consecutiveErrorToOpen_ != null;
}
/**
*
* 连续错误数阈值,进入Open状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToOpen = 3;
* @return The consecutiveErrorToOpen.
*/
public com.google.protobuf.UInt32Value getConsecutiveErrorToOpen() {
if (consecutiveErrorToOpenBuilder_ == null) {
return consecutiveErrorToOpen_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : consecutiveErrorToOpen_;
} else {
return consecutiveErrorToOpenBuilder_.getMessage();
}
}
/**
*
* 连续错误数阈值,进入Open状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToOpen = 3;
*/
public Builder setConsecutiveErrorToOpen(com.google.protobuf.UInt32Value value) {
if (consecutiveErrorToOpenBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
consecutiveErrorToOpen_ = value;
onChanged();
} else {
consecutiveErrorToOpenBuilder_.setMessage(value);
}
return this;
}
/**
*
* 连续错误数阈值,进入Open状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToOpen = 3;
*/
public Builder setConsecutiveErrorToOpen(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (consecutiveErrorToOpenBuilder_ == null) {
consecutiveErrorToOpen_ = builderForValue.build();
onChanged();
} else {
consecutiveErrorToOpenBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 连续错误数阈值,进入Open状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToOpen = 3;
*/
public Builder mergeConsecutiveErrorToOpen(com.google.protobuf.UInt32Value value) {
if (consecutiveErrorToOpenBuilder_ == null) {
if (consecutiveErrorToOpen_ != null) {
consecutiveErrorToOpen_ =
com.google.protobuf.UInt32Value.newBuilder(consecutiveErrorToOpen_).mergeFrom(value).buildPartial();
} else {
consecutiveErrorToOpen_ = value;
}
onChanged();
} else {
consecutiveErrorToOpenBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 连续错误数阈值,进入Open状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToOpen = 3;
*/
public Builder clearConsecutiveErrorToOpen() {
if (consecutiveErrorToOpenBuilder_ == null) {
consecutiveErrorToOpen_ = null;
onChanged();
} else {
consecutiveErrorToOpen_ = null;
consecutiveErrorToOpenBuilder_ = null;
}
return this;
}
/**
*
* 连续错误数阈值,进入Open状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToOpen = 3;
*/
public com.google.protobuf.UInt32Value.Builder getConsecutiveErrorToOpenBuilder() {
onChanged();
return getConsecutiveErrorToOpenFieldBuilder().getBuilder();
}
/**
*
* 连续错误数阈值,进入Open状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToOpen = 3;
*/
public com.google.protobuf.UInt32ValueOrBuilder getConsecutiveErrorToOpenOrBuilder() {
if (consecutiveErrorToOpenBuilder_ != null) {
return consecutiveErrorToOpenBuilder_.getMessageOrBuilder();
} else {
return consecutiveErrorToOpen_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : consecutiveErrorToOpen_;
}
}
/**
*
* 连续错误数阈值,进入Open状态
*
*
* .google.protobuf.UInt32Value consecutiveErrorToOpen = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getConsecutiveErrorToOpenFieldBuilder() {
if (consecutiveErrorToOpenBuilder_ == null) {
consecutiveErrorToOpenBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getConsecutiveErrorToOpen(),
getParentForChildren(),
isClean());
consecutiveErrorToOpen_ = null;
}
return consecutiveErrorToOpenBuilder_;
}
@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:v1.CbPolicy.ConsecutiveErrConfig)
}
// @@protoc_insertion_point(class_scope:v1.CbPolicy.ConsecutiveErrConfig)
private static final com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig();
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ConsecutiveErrConfig 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int ERRORRATE_FIELD_NUMBER = 1;
private com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig errorRate_;
/**
* .v1.CbPolicy.ErrRateConfig errorRate = 1;
* @return Whether the errorRate field is set.
*/
@java.lang.Override
public boolean hasErrorRate() {
return errorRate_ != null;
}
/**
* .v1.CbPolicy.ErrRateConfig errorRate = 1;
* @return The errorRate.
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig getErrorRate() {
return errorRate_ == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.getDefaultInstance() : errorRate_;
}
/**
* .v1.CbPolicy.ErrRateConfig errorRate = 1;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfigOrBuilder getErrorRateOrBuilder() {
return getErrorRate();
}
public static final int SLOWRATE_FIELD_NUMBER = 2;
private com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig slowRate_;
/**
* .v1.CbPolicy.SlowRateConfig slowRate = 2;
* @return Whether the slowRate field is set.
*/
@java.lang.Override
public boolean hasSlowRate() {
return slowRate_ != null;
}
/**
* .v1.CbPolicy.SlowRateConfig slowRate = 2;
* @return The slowRate.
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig getSlowRate() {
return slowRate_ == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig.getDefaultInstance() : slowRate_;
}
/**
* .v1.CbPolicy.SlowRateConfig slowRate = 2;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfigOrBuilder getSlowRateOrBuilder() {
return getSlowRate();
}
public static final int JUDGEDURATION_FIELD_NUMBER = 3;
private com.google.protobuf.Duration judgeDuration_;
/**
*
* 熔断的决策周期,多久触发一次熔断决策
*
*
* .google.protobuf.Duration judgeDuration = 3;
* @return Whether the judgeDuration field is set.
*/
@java.lang.Override
public boolean hasJudgeDuration() {
return judgeDuration_ != null;
}
/**
*
* 熔断的决策周期,多久触发一次熔断决策
*
*
* .google.protobuf.Duration judgeDuration = 3;
* @return The judgeDuration.
*/
@java.lang.Override
public com.google.protobuf.Duration getJudgeDuration() {
return judgeDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : judgeDuration_;
}
/**
*
* 熔断的决策周期,多久触发一次熔断决策
*
*
* .google.protobuf.Duration judgeDuration = 3;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getJudgeDurationOrBuilder() {
return getJudgeDuration();
}
public static final int MAXEJECTIONPERCENT_FIELD_NUMBER = 4;
private com.google.protobuf.UInt32Value maxEjectionPercent_;
/**
*
*最大熔断比例,超过多少比例后不会继续熔断
*
*
* .google.protobuf.UInt32Value maxEjectionPercent = 4;
* @return Whether the maxEjectionPercent field is set.
*/
@java.lang.Override
public boolean hasMaxEjectionPercent() {
return maxEjectionPercent_ != null;
}
/**
*
*最大熔断比例,超过多少比例后不会继续熔断
*
*
* .google.protobuf.UInt32Value maxEjectionPercent = 4;
* @return The maxEjectionPercent.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getMaxEjectionPercent() {
return maxEjectionPercent_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : maxEjectionPercent_;
}
/**
*
*最大熔断比例,超过多少比例后不会继续熔断
*
*
* .google.protobuf.UInt32Value maxEjectionPercent = 4;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getMaxEjectionPercentOrBuilder() {
return getMaxEjectionPercent();
}
public static final int CONSECUTIVE_FIELD_NUMBER = 5;
private com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig consecutive_;
/**
* .v1.CbPolicy.ConsecutiveErrConfig consecutive = 5;
* @return Whether the consecutive field is set.
*/
@java.lang.Override
public boolean hasConsecutive() {
return consecutive_ != null;
}
/**
* .v1.CbPolicy.ConsecutiveErrConfig consecutive = 5;
* @return The consecutive.
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig getConsecutive() {
return consecutive_ == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig.getDefaultInstance() : consecutive_;
}
/**
* .v1.CbPolicy.ConsecutiveErrConfig consecutive = 5;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfigOrBuilder getConsecutiveOrBuilder() {
return getConsecutive();
}
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 (errorRate_ != null) {
output.writeMessage(1, getErrorRate());
}
if (slowRate_ != null) {
output.writeMessage(2, getSlowRate());
}
if (judgeDuration_ != null) {
output.writeMessage(3, getJudgeDuration());
}
if (maxEjectionPercent_ != null) {
output.writeMessage(4, getMaxEjectionPercent());
}
if (consecutive_ != null) {
output.writeMessage(5, getConsecutive());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (errorRate_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getErrorRate());
}
if (slowRate_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getSlowRate());
}
if (judgeDuration_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getJudgeDuration());
}
if (maxEjectionPercent_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getMaxEjectionPercent());
}
if (consecutive_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getConsecutive());
}
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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy)) {
return super.equals(obj);
}
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy other = (com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy) obj;
if (hasErrorRate() != other.hasErrorRate()) return false;
if (hasErrorRate()) {
if (!getErrorRate()
.equals(other.getErrorRate())) return false;
}
if (hasSlowRate() != other.hasSlowRate()) return false;
if (hasSlowRate()) {
if (!getSlowRate()
.equals(other.getSlowRate())) return false;
}
if (hasJudgeDuration() != other.hasJudgeDuration()) return false;
if (hasJudgeDuration()) {
if (!getJudgeDuration()
.equals(other.getJudgeDuration())) return false;
}
if (hasMaxEjectionPercent() != other.hasMaxEjectionPercent()) return false;
if (hasMaxEjectionPercent()) {
if (!getMaxEjectionPercent()
.equals(other.getMaxEjectionPercent())) return false;
}
if (hasConsecutive() != other.hasConsecutive()) return false;
if (hasConsecutive()) {
if (!getConsecutive()
.equals(other.getConsecutive())) 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 (hasErrorRate()) {
hash = (37 * hash) + ERRORRATE_FIELD_NUMBER;
hash = (53 * hash) + getErrorRate().hashCode();
}
if (hasSlowRate()) {
hash = (37 * hash) + SLOWRATE_FIELD_NUMBER;
hash = (53 * hash) + getSlowRate().hashCode();
}
if (hasJudgeDuration()) {
hash = (37 * hash) + JUDGEDURATION_FIELD_NUMBER;
hash = (53 * hash) + getJudgeDuration().hashCode();
}
if (hasMaxEjectionPercent()) {
hash = (37 * hash) + MAXEJECTIONPERCENT_FIELD_NUMBER;
hash = (53 * hash) + getMaxEjectionPercent().hashCode();
}
if (hasConsecutive()) {
hash = (37 * hash) + CONSECUTIVE_FIELD_NUMBER;
hash = (53 * hash) + getConsecutive().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy 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(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy 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 v1.CbPolicy}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:v1.CbPolicy)
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.Builder.class);
}
// Construct using com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
if (errorRateBuilder_ == null) {
errorRate_ = null;
} else {
errorRate_ = null;
errorRateBuilder_ = null;
}
if (slowRateBuilder_ == null) {
slowRate_ = null;
} else {
slowRate_ = null;
slowRateBuilder_ = null;
}
if (judgeDurationBuilder_ == null) {
judgeDuration_ = null;
} else {
judgeDuration_ = null;
judgeDurationBuilder_ = null;
}
if (maxEjectionPercentBuilder_ == null) {
maxEjectionPercent_ = null;
} else {
maxEjectionPercent_ = null;
maxEjectionPercentBuilder_ = null;
}
if (consecutiveBuilder_ == null) {
consecutive_ = null;
} else {
consecutive_ = null;
consecutiveBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbPolicy_descriptor;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy getDefaultInstanceForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.getDefaultInstance();
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy build() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy buildPartial() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy result = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy(this);
if (errorRateBuilder_ == null) {
result.errorRate_ = errorRate_;
} else {
result.errorRate_ = errorRateBuilder_.build();
}
if (slowRateBuilder_ == null) {
result.slowRate_ = slowRate_;
} else {
result.slowRate_ = slowRateBuilder_.build();
}
if (judgeDurationBuilder_ == null) {
result.judgeDuration_ = judgeDuration_;
} else {
result.judgeDuration_ = judgeDurationBuilder_.build();
}
if (maxEjectionPercentBuilder_ == null) {
result.maxEjectionPercent_ = maxEjectionPercent_;
} else {
result.maxEjectionPercent_ = maxEjectionPercentBuilder_.build();
}
if (consecutiveBuilder_ == null) {
result.consecutive_ = consecutive_;
} else {
result.consecutive_ = consecutiveBuilder_.build();
}
onBuilt();
return result;
}
@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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy) {
return mergeFrom((com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy other) {
if (other == com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.getDefaultInstance()) return this;
if (other.hasErrorRate()) {
mergeErrorRate(other.getErrorRate());
}
if (other.hasSlowRate()) {
mergeSlowRate(other.getSlowRate());
}
if (other.hasJudgeDuration()) {
mergeJudgeDuration(other.getJudgeDuration());
}
if (other.hasMaxEjectionPercent()) {
mergeMaxEjectionPercent(other.getMaxEjectionPercent());
}
if (other.hasConsecutive()) {
mergeConsecutive(other.getConsecutive());
}
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(
getErrorRateFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 10
case 18: {
input.readMessage(
getSlowRateFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 18
case 26: {
input.readMessage(
getJudgeDurationFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 26
case 34: {
input.readMessage(
getMaxEjectionPercentFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 34
case 42: {
input.readMessage(
getConsecutiveFieldBuilder().getBuilder(),
extensionRegistry);
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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig errorRate_;
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfigOrBuilder> errorRateBuilder_;
/**
* .v1.CbPolicy.ErrRateConfig errorRate = 1;
* @return Whether the errorRate field is set.
*/
public boolean hasErrorRate() {
return errorRateBuilder_ != null || errorRate_ != null;
}
/**
* .v1.CbPolicy.ErrRateConfig errorRate = 1;
* @return The errorRate.
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig getErrorRate() {
if (errorRateBuilder_ == null) {
return errorRate_ == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.getDefaultInstance() : errorRate_;
} else {
return errorRateBuilder_.getMessage();
}
}
/**
* .v1.CbPolicy.ErrRateConfig errorRate = 1;
*/
public Builder setErrorRate(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig value) {
if (errorRateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
errorRate_ = value;
onChanged();
} else {
errorRateBuilder_.setMessage(value);
}
return this;
}
/**
* .v1.CbPolicy.ErrRateConfig errorRate = 1;
*/
public Builder setErrorRate(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.Builder builderForValue) {
if (errorRateBuilder_ == null) {
errorRate_ = builderForValue.build();
onChanged();
} else {
errorRateBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .v1.CbPolicy.ErrRateConfig errorRate = 1;
*/
public Builder mergeErrorRate(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig value) {
if (errorRateBuilder_ == null) {
if (errorRate_ != null) {
errorRate_ =
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.newBuilder(errorRate_).mergeFrom(value).buildPartial();
} else {
errorRate_ = value;
}
onChanged();
} else {
errorRateBuilder_.mergeFrom(value);
}
return this;
}
/**
* .v1.CbPolicy.ErrRateConfig errorRate = 1;
*/
public Builder clearErrorRate() {
if (errorRateBuilder_ == null) {
errorRate_ = null;
onChanged();
} else {
errorRate_ = null;
errorRateBuilder_ = null;
}
return this;
}
/**
* .v1.CbPolicy.ErrRateConfig errorRate = 1;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.Builder getErrorRateBuilder() {
onChanged();
return getErrorRateFieldBuilder().getBuilder();
}
/**
* .v1.CbPolicy.ErrRateConfig errorRate = 1;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfigOrBuilder getErrorRateOrBuilder() {
if (errorRateBuilder_ != null) {
return errorRateBuilder_.getMessageOrBuilder();
} else {
return errorRate_ == null ?
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.getDefaultInstance() : errorRate_;
}
}
/**
* .v1.CbPolicy.ErrRateConfig errorRate = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfigOrBuilder>
getErrorRateFieldBuilder() {
if (errorRateBuilder_ == null) {
errorRateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfig.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ErrRateConfigOrBuilder>(
getErrorRate(),
getParentForChildren(),
isClean());
errorRate_ = null;
}
return errorRateBuilder_;
}
private com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig slowRate_;
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfigOrBuilder> slowRateBuilder_;
/**
* .v1.CbPolicy.SlowRateConfig slowRate = 2;
* @return Whether the slowRate field is set.
*/
public boolean hasSlowRate() {
return slowRateBuilder_ != null || slowRate_ != null;
}
/**
* .v1.CbPolicy.SlowRateConfig slowRate = 2;
* @return The slowRate.
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig getSlowRate() {
if (slowRateBuilder_ == null) {
return slowRate_ == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig.getDefaultInstance() : slowRate_;
} else {
return slowRateBuilder_.getMessage();
}
}
/**
* .v1.CbPolicy.SlowRateConfig slowRate = 2;
*/
public Builder setSlowRate(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig value) {
if (slowRateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
slowRate_ = value;
onChanged();
} else {
slowRateBuilder_.setMessage(value);
}
return this;
}
/**
* .v1.CbPolicy.SlowRateConfig slowRate = 2;
*/
public Builder setSlowRate(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig.Builder builderForValue) {
if (slowRateBuilder_ == null) {
slowRate_ = builderForValue.build();
onChanged();
} else {
slowRateBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .v1.CbPolicy.SlowRateConfig slowRate = 2;
*/
public Builder mergeSlowRate(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig value) {
if (slowRateBuilder_ == null) {
if (slowRate_ != null) {
slowRate_ =
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig.newBuilder(slowRate_).mergeFrom(value).buildPartial();
} else {
slowRate_ = value;
}
onChanged();
} else {
slowRateBuilder_.mergeFrom(value);
}
return this;
}
/**
* .v1.CbPolicy.SlowRateConfig slowRate = 2;
*/
public Builder clearSlowRate() {
if (slowRateBuilder_ == null) {
slowRate_ = null;
onChanged();
} else {
slowRate_ = null;
slowRateBuilder_ = null;
}
return this;
}
/**
* .v1.CbPolicy.SlowRateConfig slowRate = 2;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig.Builder getSlowRateBuilder() {
onChanged();
return getSlowRateFieldBuilder().getBuilder();
}
/**
* .v1.CbPolicy.SlowRateConfig slowRate = 2;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfigOrBuilder getSlowRateOrBuilder() {
if (slowRateBuilder_ != null) {
return slowRateBuilder_.getMessageOrBuilder();
} else {
return slowRate_ == null ?
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig.getDefaultInstance() : slowRate_;
}
}
/**
* .v1.CbPolicy.SlowRateConfig slowRate = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfigOrBuilder>
getSlowRateFieldBuilder() {
if (slowRateBuilder_ == null) {
slowRateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfig.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.SlowRateConfigOrBuilder>(
getSlowRate(),
getParentForChildren(),
isClean());
slowRate_ = null;
}
return slowRateBuilder_;
}
private com.google.protobuf.Duration judgeDuration_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> judgeDurationBuilder_;
/**
*
* 熔断的决策周期,多久触发一次熔断决策
*
*
* .google.protobuf.Duration judgeDuration = 3;
* @return Whether the judgeDuration field is set.
*/
public boolean hasJudgeDuration() {
return judgeDurationBuilder_ != null || judgeDuration_ != null;
}
/**
*
* 熔断的决策周期,多久触发一次熔断决策
*
*
* .google.protobuf.Duration judgeDuration = 3;
* @return The judgeDuration.
*/
public com.google.protobuf.Duration getJudgeDuration() {
if (judgeDurationBuilder_ == null) {
return judgeDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : judgeDuration_;
} else {
return judgeDurationBuilder_.getMessage();
}
}
/**
*
* 熔断的决策周期,多久触发一次熔断决策
*
*
* .google.protobuf.Duration judgeDuration = 3;
*/
public Builder setJudgeDuration(com.google.protobuf.Duration value) {
if (judgeDurationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
judgeDuration_ = value;
onChanged();
} else {
judgeDurationBuilder_.setMessage(value);
}
return this;
}
/**
*
* 熔断的决策周期,多久触发一次熔断决策
*
*
* .google.protobuf.Duration judgeDuration = 3;
*/
public Builder setJudgeDuration(
com.google.protobuf.Duration.Builder builderForValue) {
if (judgeDurationBuilder_ == null) {
judgeDuration_ = builderForValue.build();
onChanged();
} else {
judgeDurationBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 熔断的决策周期,多久触发一次熔断决策
*
*
* .google.protobuf.Duration judgeDuration = 3;
*/
public Builder mergeJudgeDuration(com.google.protobuf.Duration value) {
if (judgeDurationBuilder_ == null) {
if (judgeDuration_ != null) {
judgeDuration_ =
com.google.protobuf.Duration.newBuilder(judgeDuration_).mergeFrom(value).buildPartial();
} else {
judgeDuration_ = value;
}
onChanged();
} else {
judgeDurationBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 熔断的决策周期,多久触发一次熔断决策
*
*
* .google.protobuf.Duration judgeDuration = 3;
*/
public Builder clearJudgeDuration() {
if (judgeDurationBuilder_ == null) {
judgeDuration_ = null;
onChanged();
} else {
judgeDuration_ = null;
judgeDurationBuilder_ = null;
}
return this;
}
/**
*
* 熔断的决策周期,多久触发一次熔断决策
*
*
* .google.protobuf.Duration judgeDuration = 3;
*/
public com.google.protobuf.Duration.Builder getJudgeDurationBuilder() {
onChanged();
return getJudgeDurationFieldBuilder().getBuilder();
}
/**
*
* 熔断的决策周期,多久触发一次熔断决策
*
*
* .google.protobuf.Duration judgeDuration = 3;
*/
public com.google.protobuf.DurationOrBuilder getJudgeDurationOrBuilder() {
if (judgeDurationBuilder_ != null) {
return judgeDurationBuilder_.getMessageOrBuilder();
} else {
return judgeDuration_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : judgeDuration_;
}
}
/**
*
* 熔断的决策周期,多久触发一次熔断决策
*
*
* .google.protobuf.Duration judgeDuration = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getJudgeDurationFieldBuilder() {
if (judgeDurationBuilder_ == null) {
judgeDurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getJudgeDuration(),
getParentForChildren(),
isClean());
judgeDuration_ = null;
}
return judgeDurationBuilder_;
}
private com.google.protobuf.UInt32Value maxEjectionPercent_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> maxEjectionPercentBuilder_;
/**
*
*最大熔断比例,超过多少比例后不会继续熔断
*
*
* .google.protobuf.UInt32Value maxEjectionPercent = 4;
* @return Whether the maxEjectionPercent field is set.
*/
public boolean hasMaxEjectionPercent() {
return maxEjectionPercentBuilder_ != null || maxEjectionPercent_ != null;
}
/**
*
*最大熔断比例,超过多少比例后不会继续熔断
*
*
* .google.protobuf.UInt32Value maxEjectionPercent = 4;
* @return The maxEjectionPercent.
*/
public com.google.protobuf.UInt32Value getMaxEjectionPercent() {
if (maxEjectionPercentBuilder_ == null) {
return maxEjectionPercent_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : maxEjectionPercent_;
} else {
return maxEjectionPercentBuilder_.getMessage();
}
}
/**
*
*最大熔断比例,超过多少比例后不会继续熔断
*
*
* .google.protobuf.UInt32Value maxEjectionPercent = 4;
*/
public Builder setMaxEjectionPercent(com.google.protobuf.UInt32Value value) {
if (maxEjectionPercentBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
maxEjectionPercent_ = value;
onChanged();
} else {
maxEjectionPercentBuilder_.setMessage(value);
}
return this;
}
/**
*
*最大熔断比例,超过多少比例后不会继续熔断
*
*
* .google.protobuf.UInt32Value maxEjectionPercent = 4;
*/
public Builder setMaxEjectionPercent(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (maxEjectionPercentBuilder_ == null) {
maxEjectionPercent_ = builderForValue.build();
onChanged();
} else {
maxEjectionPercentBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
*最大熔断比例,超过多少比例后不会继续熔断
*
*
* .google.protobuf.UInt32Value maxEjectionPercent = 4;
*/
public Builder mergeMaxEjectionPercent(com.google.protobuf.UInt32Value value) {
if (maxEjectionPercentBuilder_ == null) {
if (maxEjectionPercent_ != null) {
maxEjectionPercent_ =
com.google.protobuf.UInt32Value.newBuilder(maxEjectionPercent_).mergeFrom(value).buildPartial();
} else {
maxEjectionPercent_ = value;
}
onChanged();
} else {
maxEjectionPercentBuilder_.mergeFrom(value);
}
return this;
}
/**
*
*最大熔断比例,超过多少比例后不会继续熔断
*
*
* .google.protobuf.UInt32Value maxEjectionPercent = 4;
*/
public Builder clearMaxEjectionPercent() {
if (maxEjectionPercentBuilder_ == null) {
maxEjectionPercent_ = null;
onChanged();
} else {
maxEjectionPercent_ = null;
maxEjectionPercentBuilder_ = null;
}
return this;
}
/**
*
*最大熔断比例,超过多少比例后不会继续熔断
*
*
* .google.protobuf.UInt32Value maxEjectionPercent = 4;
*/
public com.google.protobuf.UInt32Value.Builder getMaxEjectionPercentBuilder() {
onChanged();
return getMaxEjectionPercentFieldBuilder().getBuilder();
}
/**
*
*最大熔断比例,超过多少比例后不会继续熔断
*
*
* .google.protobuf.UInt32Value maxEjectionPercent = 4;
*/
public com.google.protobuf.UInt32ValueOrBuilder getMaxEjectionPercentOrBuilder() {
if (maxEjectionPercentBuilder_ != null) {
return maxEjectionPercentBuilder_.getMessageOrBuilder();
} else {
return maxEjectionPercent_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : maxEjectionPercent_;
}
}
/**
*
*最大熔断比例,超过多少比例后不会继续熔断
*
*
* .google.protobuf.UInt32Value maxEjectionPercent = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getMaxEjectionPercentFieldBuilder() {
if (maxEjectionPercentBuilder_ == null) {
maxEjectionPercentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getMaxEjectionPercent(),
getParentForChildren(),
isClean());
maxEjectionPercent_ = null;
}
return maxEjectionPercentBuilder_;
}
private com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig consecutive_;
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfigOrBuilder> consecutiveBuilder_;
/**
* .v1.CbPolicy.ConsecutiveErrConfig consecutive = 5;
* @return Whether the consecutive field is set.
*/
public boolean hasConsecutive() {
return consecutiveBuilder_ != null || consecutive_ != null;
}
/**
* .v1.CbPolicy.ConsecutiveErrConfig consecutive = 5;
* @return The consecutive.
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig getConsecutive() {
if (consecutiveBuilder_ == null) {
return consecutive_ == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig.getDefaultInstance() : consecutive_;
} else {
return consecutiveBuilder_.getMessage();
}
}
/**
* .v1.CbPolicy.ConsecutiveErrConfig consecutive = 5;
*/
public Builder setConsecutive(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig value) {
if (consecutiveBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
consecutive_ = value;
onChanged();
} else {
consecutiveBuilder_.setMessage(value);
}
return this;
}
/**
* .v1.CbPolicy.ConsecutiveErrConfig consecutive = 5;
*/
public Builder setConsecutive(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig.Builder builderForValue) {
if (consecutiveBuilder_ == null) {
consecutive_ = builderForValue.build();
onChanged();
} else {
consecutiveBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .v1.CbPolicy.ConsecutiveErrConfig consecutive = 5;
*/
public Builder mergeConsecutive(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig value) {
if (consecutiveBuilder_ == null) {
if (consecutive_ != null) {
consecutive_ =
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig.newBuilder(consecutive_).mergeFrom(value).buildPartial();
} else {
consecutive_ = value;
}
onChanged();
} else {
consecutiveBuilder_.mergeFrom(value);
}
return this;
}
/**
* .v1.CbPolicy.ConsecutiveErrConfig consecutive = 5;
*/
public Builder clearConsecutive() {
if (consecutiveBuilder_ == null) {
consecutive_ = null;
onChanged();
} else {
consecutive_ = null;
consecutiveBuilder_ = null;
}
return this;
}
/**
* .v1.CbPolicy.ConsecutiveErrConfig consecutive = 5;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig.Builder getConsecutiveBuilder() {
onChanged();
return getConsecutiveFieldBuilder().getBuilder();
}
/**
* .v1.CbPolicy.ConsecutiveErrConfig consecutive = 5;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfigOrBuilder getConsecutiveOrBuilder() {
if (consecutiveBuilder_ != null) {
return consecutiveBuilder_.getMessageOrBuilder();
} else {
return consecutive_ == null ?
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig.getDefaultInstance() : consecutive_;
}
}
/**
* .v1.CbPolicy.ConsecutiveErrConfig consecutive = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfigOrBuilder>
getConsecutiveFieldBuilder() {
if (consecutiveBuilder_ == null) {
consecutiveBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfig.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.ConsecutiveErrConfigOrBuilder>(
getConsecutive(),
getParentForChildren(),
isClean());
consecutive_ = null;
}
return consecutiveBuilder_;
}
@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:v1.CbPolicy)
}
// @@protoc_insertion_point(class_scope:v1.CbPolicy)
private static final com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy();
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CbPolicy 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface DestinationSetOrBuilder extends
// @@protoc_insertion_point(interface_extends:v1.DestinationSet)
com.google.protobuf.MessageOrBuilder {
/**
*
* 被调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
* @return Whether the service field is set.
*/
boolean hasService();
/**
*
* 被调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
* @return The service.
*/
com.google.protobuf.StringValue getService();
/**
*
* 被调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
*/
com.google.protobuf.StringValueOrBuilder getServiceOrBuilder();
/**
* .google.protobuf.StringValue namespace = 2;
* @return Whether the namespace field is set.
*/
boolean hasNamespace();
/**
* .google.protobuf.StringValue namespace = 2;
* @return The namespace.
*/
com.google.protobuf.StringValue getNamespace();
/**
* .google.protobuf.StringValue namespace = 2;
*/
com.google.protobuf.StringValueOrBuilder getNamespaceOrBuilder();
/**
*
* 可选,SUBSET标识
*
*
* map<string, .v1.MatchString> metadata = 3;
*/
int getMetadataCount();
/**
*
* 可选,SUBSET标识
*
*
* map<string, .v1.MatchString> metadata = 3;
*/
boolean containsMetadata(
java.lang.String key);
/**
* Use {@link #getMetadataMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getMetadata();
/**
*
* 可选,SUBSET标识
*
*
* map<string, .v1.MatchString> metadata = 3;
*/
java.util.Map
getMetadataMap();
/**
*
* 可选,SUBSET标识
*
*
* map<string, .v1.MatchString> metadata = 3;
*/
/* nullable */
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString getMetadataOrDefault(
java.lang.String key,
/* nullable */
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString defaultValue);
/**
*
* 可选,SUBSET标识
*
*
* map<string, .v1.MatchString> metadata = 3;
*/
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString getMetadataOrThrow(
java.lang.String key);
/**
* .v1.DestinationSet.Resource resource = 4;
* @return The enum numeric value on the wire for resource.
*/
int getResourceValue();
/**
* .v1.DestinationSet.Resource resource = 4;
* @return The resource.
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Resource getResource();
/**
* .v1.DestinationSet.Type type = 5;
* @return The enum numeric value on the wire for type.
*/
int getTypeValue();
/**
* .v1.DestinationSet.Type type = 5;
* @return The type.
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Type getType();
/**
* .v1.DestinationSet.Scope scope = 6;
* @return The enum numeric value on the wire for scope.
*/
int getScopeValue();
/**
* .v1.DestinationSet.Scope scope = 6;
* @return The scope.
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Scope getScope();
/**
*
* 熔断数据度量周期
* 所有的阈值指标按此周期进行统计
*
*
* .google.protobuf.Duration metricWindow = 7;
* @return Whether the metricWindow field is set.
*/
boolean hasMetricWindow();
/**
*
* 熔断数据度量周期
* 所有的阈值指标按此周期进行统计
*
*
* .google.protobuf.Duration metricWindow = 7;
* @return The metricWindow.
*/
com.google.protobuf.Duration getMetricWindow();
/**
*
* 熔断数据度量周期
* 所有的阈值指标按此周期进行统计
*
*
* .google.protobuf.Duration metricWindow = 7;
*/
com.google.protobuf.DurationOrBuilder getMetricWindowOrBuilder();
/**
*
* 熔断数据统计精度,决定数据度量的最小周期
* 度量滑窗的步长=window/precision
*
*
* .google.protobuf.UInt32Value metricPrecision = 8;
* @return Whether the metricPrecision field is set.
*/
boolean hasMetricPrecision();
/**
*
* 熔断数据统计精度,决定数据度量的最小周期
* 度量滑窗的步长=window/precision
*
*
* .google.protobuf.UInt32Value metricPrecision = 8;
* @return The metricPrecision.
*/
com.google.protobuf.UInt32Value getMetricPrecision();
/**
*
* 熔断数据统计精度,决定数据度量的最小周期
* 度量滑窗的步长=window/precision
*
*
* .google.protobuf.UInt32Value metricPrecision = 8;
*/
com.google.protobuf.UInt32ValueOrBuilder getMetricPrecisionOrBuilder();
/**
*
* 熔断数据上报周期,对分布式熔断有效
*
*
* .google.protobuf.Duration updateInterval = 9;
* @return Whether the updateInterval field is set.
*/
boolean hasUpdateInterval();
/**
*
* 熔断数据上报周期,对分布式熔断有效
*
*
* .google.protobuf.Duration updateInterval = 9;
* @return The updateInterval.
*/
com.google.protobuf.Duration getUpdateInterval();
/**
*
* 熔断数据上报周期,对分布式熔断有效
*
*
* .google.protobuf.Duration updateInterval = 9;
*/
com.google.protobuf.DurationOrBuilder getUpdateIntervalOrBuilder();
/**
*
* 触发熔断后恢复配置
*
*
* .v1.RecoverConfig recover = 10;
* @return Whether the recover field is set.
*/
boolean hasRecover();
/**
*
* 触发熔断后恢复配置
*
*
* .v1.RecoverConfig recover = 10;
* @return The recover.
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig getRecover();
/**
*
* 触发熔断后恢复配置
*
*
* .v1.RecoverConfig recover = 10;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfigOrBuilder getRecoverOrBuilder();
/**
*
* 熔断策略
*
*
* .v1.CbPolicy policy = 11;
* @return Whether the policy field is set.
*/
boolean hasPolicy();
/**
*
* 熔断策略
*
*
* .v1.CbPolicy policy = 11;
* @return The policy.
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy getPolicy();
/**
*
* 熔断策略
*
*
* .v1.CbPolicy policy = 11;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicyOrBuilder getPolicyOrBuilder();
/**
*
* 被调的接口信息,指定哪些接口会使用该规则
*
*
* .v1.MatchString method = 12;
* @return Whether the method field is set.
*/
boolean hasMethod();
/**
*
* 被调的接口信息,指定哪些接口会使用该规则
*
*
* .v1.MatchString method = 12;
* @return The method.
*/
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString getMethod();
/**
*
* 被调的接口信息,指定哪些接口会使用该规则
*
*
* .v1.MatchString method = 12;
*/
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchStringOrBuilder getMethodOrBuilder();
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
java.util.List
getErrorCodesList();
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
com.google.protobuf.Int64Value getErrorCodes(int index);
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
int getErrorCodesCount();
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
java.util.List extends com.google.protobuf.Int64ValueOrBuilder>
getErrorCodesOrBuilderList();
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
com.google.protobuf.Int64ValueOrBuilder getErrorCodesOrBuilder(
int index);
}
/**
*
* 目标set的规则
*
*
* Protobuf type {@code v1.DestinationSet}
*/
public static final class DestinationSet extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:v1.DestinationSet)
DestinationSetOrBuilder {
private static final long serialVersionUID = 0L;
// Use DestinationSet.newBuilder() to construct.
private DestinationSet(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DestinationSet() {
resource_ = 0;
type_ = 0;
scope_ = 0;
errorCodes_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DestinationSet();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_DestinationSet_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 3:
return internalGetMetadata();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_DestinationSet_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Builder.class);
}
/**
*
* 需要进行熔断的资源
* 支持SUBSET(子集群),以及INSTANCE(单个实例),默认为SUBSET
*
*
* Protobuf enum {@code v1.DestinationSet.Resource}
*/
public enum Resource
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* 针对实例分组进行熔断
*
*
* SUBSET = 0;
*/
SUBSET(0),
/**
*
* 针对实例进行熔断
*
*
* INSTANCE = 1;
*/
INSTANCE(1),
UNRECOGNIZED(-1),
;
/**
*
* 针对实例分组进行熔断
*
*
* SUBSET = 0;
*/
public static final int SUBSET_VALUE = 0;
/**
*
* 针对实例进行熔断
*
*
* INSTANCE = 1;
*/
public static final int INSTANCE_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 Resource 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 Resource forNumber(int value) {
switch (value) {
case 0: return SUBSET;
case 1: return INSTANCE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Resource> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Resource findValueByNumber(int number) {
return Resource.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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.getDescriptor().getEnumTypes().get(0);
}
private static final Resource[] VALUES = values();
public static Resource 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 Resource(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:v1.DestinationSet.Resource)
}
/**
*
* 熔断决策类型,支持GLOBAL(分布式决策)以及LOCAL(本地决策),默认GLOBAL
* 当指定为GLOBAL时,则会定期上报统计数据并根据汇总数据进行熔断决策
*
*
* Protobuf enum {@code v1.DestinationSet.Type}
*/
public enum Type
implements com.google.protobuf.ProtocolMessageEnum {
/**
* GLOBAL = 0;
*/
GLOBAL(0),
/**
* LOCAL = 1;
*/
LOCAL(1),
UNRECOGNIZED(-1),
;
/**
* GLOBAL = 0;
*/
public static final int GLOBAL_VALUE = 0;
/**
* LOCAL = 1;
*/
public static final int LOCAL_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 Type valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static Type forNumber(int value) {
switch (value) {
case 0: return GLOBAL;
case 1: return LOCAL;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Type> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Type findValueByNumber(int number) {
return Type.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.getDescriptor().getEnumTypes().get(1);
}
private static final Type[] VALUES = values();
public static Type valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private Type(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:v1.DestinationSet.Type)
}
/**
*
*熔断范围,是否扩散针对相同服务下所有接口进行熔断
*
*
* Protobuf enum {@code v1.DestinationSet.Scope}
*/
public enum Scope
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*触发熔断条件,扩散熔断所有接口
*
*
* ALL = 0;
*/
ALL(0),
/**
*
*触发熔断条件,只熔断当前接口
*
*
* CURRENT = 1;
*/
CURRENT(1),
UNRECOGNIZED(-1),
;
/**
*
*触发熔断条件,扩散熔断所有接口
*
*
* ALL = 0;
*/
public static final int ALL_VALUE = 0;
/**
*
*触发熔断条件,只熔断当前接口
*
*
* CURRENT = 1;
*/
public static final int CURRENT_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 Scope 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 Scope forNumber(int value) {
switch (value) {
case 0: return ALL;
case 1: return CURRENT;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Scope> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Scope findValueByNumber(int number) {
return Scope.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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.getDescriptor().getEnumTypes().get(2);
}
private static final Scope[] VALUES = values();
public static Scope 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 Scope(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:v1.DestinationSet.Scope)
}
public static final int SERVICE_FIELD_NUMBER = 1;
private com.google.protobuf.StringValue service_;
/**
*
* 被调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
* @return Whether the service field is set.
*/
@java.lang.Override
public boolean hasService() {
return service_ != null;
}
/**
*
* 被调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
* @return The service.
*/
@java.lang.Override
public com.google.protobuf.StringValue getService() {
return service_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : service_;
}
/**
*
* 被调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getServiceOrBuilder() {
return getService();
}
public static final int NAMESPACE_FIELD_NUMBER = 2;
private com.google.protobuf.StringValue namespace_;
/**
* .google.protobuf.StringValue namespace = 2;
* @return Whether the namespace field is set.
*/
@java.lang.Override
public boolean hasNamespace() {
return namespace_ != null;
}
/**
* .google.protobuf.StringValue namespace = 2;
* @return The namespace.
*/
@java.lang.Override
public com.google.protobuf.StringValue getNamespace() {
return namespace_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : namespace_;
}
/**
* .google.protobuf.StringValue namespace = 2;
*/
@java.lang.Override
public com.google.protobuf.StringValueOrBuilder getNamespaceOrBuilder() {
return getNamespace();
}
public static final int METADATA_FIELD_NUMBER = 3;
private static final class MetadataDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_DestinationSet_MetadataEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.String, com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString> metadata_;
private com.google.protobuf.MapField
internalGetMetadata() {
if (metadata_ == null) {
return com.google.protobuf.MapField.emptyMapField(
MetadataDefaultEntryHolder.defaultEntry);
}
return metadata_;
}
public int getMetadataCount() {
return internalGetMetadata().getMap().size();
}
/**
*
* 可选,SUBSET标识
*
*
* map<string, .v1.MatchString> metadata = 3;
*/
@java.lang.Override
public boolean containsMetadata(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetMetadata().getMap().containsKey(key);
}
/**
* Use {@link #getMetadataMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getMetadata() {
return getMetadataMap();
}
/**
*
* 可选,SUBSET标识
*
*
* map<string, .v1.MatchString> metadata = 3;
*/
@java.lang.Override
public java.util.Map getMetadataMap() {
return internalGetMetadata().getMap();
}
/**
*
* 可选,SUBSET标识
*
*
* map<string, .v1.MatchString> metadata = 3;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString getMetadataOrDefault(
java.lang.String key,
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetMetadata().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* 可选,SUBSET标识
*
*
* map<string, .v1.MatchString> metadata = 3;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString getMetadataOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetMetadata().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int RESOURCE_FIELD_NUMBER = 4;
private int resource_;
/**
* .v1.DestinationSet.Resource resource = 4;
* @return The enum numeric value on the wire for resource.
*/
@java.lang.Override public int getResourceValue() {
return resource_;
}
/**
* .v1.DestinationSet.Resource resource = 4;
* @return The resource.
*/
@java.lang.Override public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Resource getResource() {
@SuppressWarnings("deprecation")
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Resource result = com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Resource.valueOf(resource_);
return result == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Resource.UNRECOGNIZED : result;
}
public static final int TYPE_FIELD_NUMBER = 5;
private int type_;
/**
* .v1.DestinationSet.Type type = 5;
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
* .v1.DestinationSet.Type type = 5;
* @return The type.
*/
@java.lang.Override public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Type getType() {
@SuppressWarnings("deprecation")
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Type result = com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Type.valueOf(type_);
return result == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Type.UNRECOGNIZED : result;
}
public static final int SCOPE_FIELD_NUMBER = 6;
private int scope_;
/**
* .v1.DestinationSet.Scope scope = 6;
* @return The enum numeric value on the wire for scope.
*/
@java.lang.Override public int getScopeValue() {
return scope_;
}
/**
* .v1.DestinationSet.Scope scope = 6;
* @return The scope.
*/
@java.lang.Override public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Scope getScope() {
@SuppressWarnings("deprecation")
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Scope result = com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Scope.valueOf(scope_);
return result == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Scope.UNRECOGNIZED : result;
}
public static final int METRICWINDOW_FIELD_NUMBER = 7;
private com.google.protobuf.Duration metricWindow_;
/**
*
* 熔断数据度量周期
* 所有的阈值指标按此周期进行统计
*
*
* .google.protobuf.Duration metricWindow = 7;
* @return Whether the metricWindow field is set.
*/
@java.lang.Override
public boolean hasMetricWindow() {
return metricWindow_ != null;
}
/**
*
* 熔断数据度量周期
* 所有的阈值指标按此周期进行统计
*
*
* .google.protobuf.Duration metricWindow = 7;
* @return The metricWindow.
*/
@java.lang.Override
public com.google.protobuf.Duration getMetricWindow() {
return metricWindow_ == null ? com.google.protobuf.Duration.getDefaultInstance() : metricWindow_;
}
/**
*
* 熔断数据度量周期
* 所有的阈值指标按此周期进行统计
*
*
* .google.protobuf.Duration metricWindow = 7;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getMetricWindowOrBuilder() {
return getMetricWindow();
}
public static final int METRICPRECISION_FIELD_NUMBER = 8;
private com.google.protobuf.UInt32Value metricPrecision_;
/**
*
* 熔断数据统计精度,决定数据度量的最小周期
* 度量滑窗的步长=window/precision
*
*
* .google.protobuf.UInt32Value metricPrecision = 8;
* @return Whether the metricPrecision field is set.
*/
@java.lang.Override
public boolean hasMetricPrecision() {
return metricPrecision_ != null;
}
/**
*
* 熔断数据统计精度,决定数据度量的最小周期
* 度量滑窗的步长=window/precision
*
*
* .google.protobuf.UInt32Value metricPrecision = 8;
* @return The metricPrecision.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getMetricPrecision() {
return metricPrecision_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : metricPrecision_;
}
/**
*
* 熔断数据统计精度,决定数据度量的最小周期
* 度量滑窗的步长=window/precision
*
*
* .google.protobuf.UInt32Value metricPrecision = 8;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getMetricPrecisionOrBuilder() {
return getMetricPrecision();
}
public static final int UPDATEINTERVAL_FIELD_NUMBER = 9;
private com.google.protobuf.Duration updateInterval_;
/**
*
* 熔断数据上报周期,对分布式熔断有效
*
*
* .google.protobuf.Duration updateInterval = 9;
* @return Whether the updateInterval field is set.
*/
@java.lang.Override
public boolean hasUpdateInterval() {
return updateInterval_ != null;
}
/**
*
* 熔断数据上报周期,对分布式熔断有效
*
*
* .google.protobuf.Duration updateInterval = 9;
* @return The updateInterval.
*/
@java.lang.Override
public com.google.protobuf.Duration getUpdateInterval() {
return updateInterval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : updateInterval_;
}
/**
*
* 熔断数据上报周期,对分布式熔断有效
*
*
* .google.protobuf.Duration updateInterval = 9;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getUpdateIntervalOrBuilder() {
return getUpdateInterval();
}
public static final int RECOVER_FIELD_NUMBER = 10;
private com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig recover_;
/**
*
* 触发熔断后恢复配置
*
*
* .v1.RecoverConfig recover = 10;
* @return Whether the recover field is set.
*/
@java.lang.Override
public boolean hasRecover() {
return recover_ != null;
}
/**
*
* 触发熔断后恢复配置
*
*
* .v1.RecoverConfig recover = 10;
* @return The recover.
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig getRecover() {
return recover_ == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.getDefaultInstance() : recover_;
}
/**
*
* 触发熔断后恢复配置
*
*
* .v1.RecoverConfig recover = 10;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfigOrBuilder getRecoverOrBuilder() {
return getRecover();
}
public static final int POLICY_FIELD_NUMBER = 11;
private com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy policy_;
/**
*
* 熔断策略
*
*
* .v1.CbPolicy policy = 11;
* @return Whether the policy field is set.
*/
@java.lang.Override
public boolean hasPolicy() {
return policy_ != null;
}
/**
*
* 熔断策略
*
*
* .v1.CbPolicy policy = 11;
* @return The policy.
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy getPolicy() {
return policy_ == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.getDefaultInstance() : policy_;
}
/**
*
* 熔断策略
*
*
* .v1.CbPolicy policy = 11;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicyOrBuilder getPolicyOrBuilder() {
return getPolicy();
}
public static final int METHOD_FIELD_NUMBER = 12;
private com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString method_;
/**
*
* 被调的接口信息,指定哪些接口会使用该规则
*
*
* .v1.MatchString method = 12;
* @return Whether the method field is set.
*/
@java.lang.Override
public boolean hasMethod() {
return method_ != null;
}
/**
*
* 被调的接口信息,指定哪些接口会使用该规则
*
*
* .v1.MatchString method = 12;
* @return The method.
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString getMethod() {
return method_ == null ? com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.getDefaultInstance() : method_;
}
/**
*
* 被调的接口信息,指定哪些接口会使用该规则
*
*
* .v1.MatchString method = 12;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.model.ModelProto.MatchStringOrBuilder getMethodOrBuilder() {
return getMethod();
}
public static final int ERRORCODES_FIELD_NUMBER = 13;
private java.util.List errorCodes_;
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
@java.lang.Override
public java.util.List getErrorCodesList() {
return errorCodes_;
}
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
@java.lang.Override
public java.util.List extends com.google.protobuf.Int64ValueOrBuilder>
getErrorCodesOrBuilderList() {
return errorCodes_;
}
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
@java.lang.Override
public int getErrorCodesCount() {
return errorCodes_.size();
}
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
@java.lang.Override
public com.google.protobuf.Int64Value getErrorCodes(int index) {
return errorCodes_.get(index);
}
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
@java.lang.Override
public com.google.protobuf.Int64ValueOrBuilder getErrorCodesOrBuilder(
int index) {
return errorCodes_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (service_ != null) {
output.writeMessage(1, getService());
}
if (namespace_ != null) {
output.writeMessage(2, getNamespace());
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetMetadata(),
MetadataDefaultEntryHolder.defaultEntry,
3);
if (resource_ != com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Resource.SUBSET.getNumber()) {
output.writeEnum(4, resource_);
}
if (type_ != com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Type.GLOBAL.getNumber()) {
output.writeEnum(5, type_);
}
if (scope_ != com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Scope.ALL.getNumber()) {
output.writeEnum(6, scope_);
}
if (metricWindow_ != null) {
output.writeMessage(7, getMetricWindow());
}
if (metricPrecision_ != null) {
output.writeMessage(8, getMetricPrecision());
}
if (updateInterval_ != null) {
output.writeMessage(9, getUpdateInterval());
}
if (recover_ != null) {
output.writeMessage(10, getRecover());
}
if (policy_ != null) {
output.writeMessage(11, getPolicy());
}
if (method_ != null) {
output.writeMessage(12, getMethod());
}
for (int i = 0; i < errorCodes_.size(); i++) {
output.writeMessage(13, errorCodes_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (service_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getService());
}
if (namespace_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getNamespace());
}
for (java.util.Map.Entry entry
: internalGetMetadata().getMap().entrySet()) {
com.google.protobuf.MapEntry
metadata__ = MetadataDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, metadata__);
}
if (resource_ != com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Resource.SUBSET.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(4, resource_);
}
if (type_ != com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Type.GLOBAL.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(5, type_);
}
if (scope_ != com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Scope.ALL.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(6, scope_);
}
if (metricWindow_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getMetricWindow());
}
if (metricPrecision_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, getMetricPrecision());
}
if (updateInterval_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, getUpdateInterval());
}
if (recover_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, getRecover());
}
if (policy_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, getPolicy());
}
if (method_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(12, getMethod());
}
for (int i = 0; i < errorCodes_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(13, errorCodes_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet)) {
return super.equals(obj);
}
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet other = (com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet) obj;
if (hasService() != other.hasService()) return false;
if (hasService()) {
if (!getService()
.equals(other.getService())) return false;
}
if (hasNamespace() != other.hasNamespace()) return false;
if (hasNamespace()) {
if (!getNamespace()
.equals(other.getNamespace())) return false;
}
if (!internalGetMetadata().equals(
other.internalGetMetadata())) return false;
if (resource_ != other.resource_) return false;
if (type_ != other.type_) return false;
if (scope_ != other.scope_) return false;
if (hasMetricWindow() != other.hasMetricWindow()) return false;
if (hasMetricWindow()) {
if (!getMetricWindow()
.equals(other.getMetricWindow())) return false;
}
if (hasMetricPrecision() != other.hasMetricPrecision()) return false;
if (hasMetricPrecision()) {
if (!getMetricPrecision()
.equals(other.getMetricPrecision())) return false;
}
if (hasUpdateInterval() != other.hasUpdateInterval()) return false;
if (hasUpdateInterval()) {
if (!getUpdateInterval()
.equals(other.getUpdateInterval())) return false;
}
if (hasRecover() != other.hasRecover()) return false;
if (hasRecover()) {
if (!getRecover()
.equals(other.getRecover())) return false;
}
if (hasPolicy() != other.hasPolicy()) return false;
if (hasPolicy()) {
if (!getPolicy()
.equals(other.getPolicy())) return false;
}
if (hasMethod() != other.hasMethod()) return false;
if (hasMethod()) {
if (!getMethod()
.equals(other.getMethod())) return false;
}
if (!getErrorCodesList()
.equals(other.getErrorCodesList())) 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 (hasService()) {
hash = (37 * hash) + SERVICE_FIELD_NUMBER;
hash = (53 * hash) + getService().hashCode();
}
if (hasNamespace()) {
hash = (37 * hash) + NAMESPACE_FIELD_NUMBER;
hash = (53 * hash) + getNamespace().hashCode();
}
if (!internalGetMetadata().getMap().isEmpty()) {
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + internalGetMetadata().hashCode();
}
hash = (37 * hash) + RESOURCE_FIELD_NUMBER;
hash = (53 * hash) + resource_;
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
hash = (37 * hash) + SCOPE_FIELD_NUMBER;
hash = (53 * hash) + scope_;
if (hasMetricWindow()) {
hash = (37 * hash) + METRICWINDOW_FIELD_NUMBER;
hash = (53 * hash) + getMetricWindow().hashCode();
}
if (hasMetricPrecision()) {
hash = (37 * hash) + METRICPRECISION_FIELD_NUMBER;
hash = (53 * hash) + getMetricPrecision().hashCode();
}
if (hasUpdateInterval()) {
hash = (37 * hash) + UPDATEINTERVAL_FIELD_NUMBER;
hash = (53 * hash) + getUpdateInterval().hashCode();
}
if (hasRecover()) {
hash = (37 * hash) + RECOVER_FIELD_NUMBER;
hash = (53 * hash) + getRecover().hashCode();
}
if (hasPolicy()) {
hash = (37 * hash) + POLICY_FIELD_NUMBER;
hash = (53 * hash) + getPolicy().hashCode();
}
if (hasMethod()) {
hash = (37 * hash) + METHOD_FIELD_NUMBER;
hash = (53 * hash) + getMethod().hashCode();
}
if (getErrorCodesCount() > 0) {
hash = (37 * hash) + ERRORCODES_FIELD_NUMBER;
hash = (53 * hash) + getErrorCodesList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet 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(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet 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;
}
/**
*
* 目标set的规则
*
*
* Protobuf type {@code v1.DestinationSet}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:v1.DestinationSet)
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSetOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_DestinationSet_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 3:
return internalGetMetadata();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 3:
return internalGetMutableMetadata();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_DestinationSet_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Builder.class);
}
// Construct using com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
if (serviceBuilder_ == null) {
service_ = null;
} else {
service_ = null;
serviceBuilder_ = null;
}
if (namespaceBuilder_ == null) {
namespace_ = null;
} else {
namespace_ = null;
namespaceBuilder_ = null;
}
internalGetMutableMetadata().clear();
resource_ = 0;
type_ = 0;
scope_ = 0;
if (metricWindowBuilder_ == null) {
metricWindow_ = null;
} else {
metricWindow_ = null;
metricWindowBuilder_ = null;
}
if (metricPrecisionBuilder_ == null) {
metricPrecision_ = null;
} else {
metricPrecision_ = null;
metricPrecisionBuilder_ = null;
}
if (updateIntervalBuilder_ == null) {
updateInterval_ = null;
} else {
updateInterval_ = null;
updateIntervalBuilder_ = null;
}
if (recoverBuilder_ == null) {
recover_ = null;
} else {
recover_ = null;
recoverBuilder_ = null;
}
if (policyBuilder_ == null) {
policy_ = null;
} else {
policy_ = null;
policyBuilder_ = null;
}
if (methodBuilder_ == null) {
method_ = null;
} else {
method_ = null;
methodBuilder_ = null;
}
if (errorCodesBuilder_ == null) {
errorCodes_ = java.util.Collections.emptyList();
} else {
errorCodes_ = null;
errorCodesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_DestinationSet_descriptor;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet getDefaultInstanceForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.getDefaultInstance();
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet build() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet buildPartial() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet result = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet(this);
int from_bitField0_ = bitField0_;
if (serviceBuilder_ == null) {
result.service_ = service_;
} else {
result.service_ = serviceBuilder_.build();
}
if (namespaceBuilder_ == null) {
result.namespace_ = namespace_;
} else {
result.namespace_ = namespaceBuilder_.build();
}
result.metadata_ = internalGetMetadata();
result.metadata_.makeImmutable();
result.resource_ = resource_;
result.type_ = type_;
result.scope_ = scope_;
if (metricWindowBuilder_ == null) {
result.metricWindow_ = metricWindow_;
} else {
result.metricWindow_ = metricWindowBuilder_.build();
}
if (metricPrecisionBuilder_ == null) {
result.metricPrecision_ = metricPrecision_;
} else {
result.metricPrecision_ = metricPrecisionBuilder_.build();
}
if (updateIntervalBuilder_ == null) {
result.updateInterval_ = updateInterval_;
} else {
result.updateInterval_ = updateIntervalBuilder_.build();
}
if (recoverBuilder_ == null) {
result.recover_ = recover_;
} else {
result.recover_ = recoverBuilder_.build();
}
if (policyBuilder_ == null) {
result.policy_ = policy_;
} else {
result.policy_ = policyBuilder_.build();
}
if (methodBuilder_ == null) {
result.method_ = method_;
} else {
result.method_ = methodBuilder_.build();
}
if (errorCodesBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
errorCodes_ = java.util.Collections.unmodifiableList(errorCodes_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.errorCodes_ = errorCodes_;
} else {
result.errorCodes_ = errorCodesBuilder_.build();
}
onBuilt();
return result;
}
@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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet) {
return mergeFrom((com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet other) {
if (other == com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.getDefaultInstance()) return this;
if (other.hasService()) {
mergeService(other.getService());
}
if (other.hasNamespace()) {
mergeNamespace(other.getNamespace());
}
internalGetMutableMetadata().mergeFrom(
other.internalGetMetadata());
if (other.resource_ != 0) {
setResourceValue(other.getResourceValue());
}
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
if (other.scope_ != 0) {
setScopeValue(other.getScopeValue());
}
if (other.hasMetricWindow()) {
mergeMetricWindow(other.getMetricWindow());
}
if (other.hasMetricPrecision()) {
mergeMetricPrecision(other.getMetricPrecision());
}
if (other.hasUpdateInterval()) {
mergeUpdateInterval(other.getUpdateInterval());
}
if (other.hasRecover()) {
mergeRecover(other.getRecover());
}
if (other.hasPolicy()) {
mergePolicy(other.getPolicy());
}
if (other.hasMethod()) {
mergeMethod(other.getMethod());
}
if (errorCodesBuilder_ == null) {
if (!other.errorCodes_.isEmpty()) {
if (errorCodes_.isEmpty()) {
errorCodes_ = other.errorCodes_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureErrorCodesIsMutable();
errorCodes_.addAll(other.errorCodes_);
}
onChanged();
}
} else {
if (!other.errorCodes_.isEmpty()) {
if (errorCodesBuilder_.isEmpty()) {
errorCodesBuilder_.dispose();
errorCodesBuilder_ = null;
errorCodes_ = other.errorCodes_;
bitField0_ = (bitField0_ & ~0x00000002);
errorCodesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getErrorCodesFieldBuilder() : null;
} else {
errorCodesBuilder_.addAllMessages(other.errorCodes_);
}
}
}
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(
getServiceFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 10
case 18: {
input.readMessage(
getNamespaceFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 18
case 26: {
com.google.protobuf.MapEntry
metadata__ = input.readMessage(
MetadataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableMetadata().getMutableMap().put(
metadata__.getKey(), metadata__.getValue());
break;
} // case 26
case 32: {
resource_ = input.readEnum();
break;
} // case 32
case 40: {
type_ = input.readEnum();
break;
} // case 40
case 48: {
scope_ = input.readEnum();
break;
} // case 48
case 58: {
input.readMessage(
getMetricWindowFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 58
case 66: {
input.readMessage(
getMetricPrecisionFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 66
case 74: {
input.readMessage(
getUpdateIntervalFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 74
case 82: {
input.readMessage(
getRecoverFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 82
case 90: {
input.readMessage(
getPolicyFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 90
case 98: {
input.readMessage(
getMethodFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 98
case 106: {
com.google.protobuf.Int64Value m =
input.readMessage(
com.google.protobuf.Int64Value.parser(),
extensionRegistry);
if (errorCodesBuilder_ == null) {
ensureErrorCodesIsMutable();
errorCodes_.add(m);
} else {
errorCodesBuilder_.addMessage(m);
}
break;
} // case 106
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 service_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> serviceBuilder_;
/**
*
* 被调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
* @return Whether the service field is set.
*/
public boolean hasService() {
return serviceBuilder_ != null || service_ != null;
}
/**
*
* 被调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
* @return The service.
*/
public com.google.protobuf.StringValue getService() {
if (serviceBuilder_ == null) {
return service_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : service_;
} else {
return serviceBuilder_.getMessage();
}
}
/**
*
* 被调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
*/
public Builder setService(com.google.protobuf.StringValue value) {
if (serviceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
service_ = value;
onChanged();
} else {
serviceBuilder_.setMessage(value);
}
return this;
}
/**
*
* 被调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
*/
public Builder setService(
com.google.protobuf.StringValue.Builder builderForValue) {
if (serviceBuilder_ == null) {
service_ = builderForValue.build();
onChanged();
} else {
serviceBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 被调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
*/
public Builder mergeService(com.google.protobuf.StringValue value) {
if (serviceBuilder_ == null) {
if (service_ != null) {
service_ =
com.google.protobuf.StringValue.newBuilder(service_).mergeFrom(value).buildPartial();
} else {
service_ = value;
}
onChanged();
} else {
serviceBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 被调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
*/
public Builder clearService() {
if (serviceBuilder_ == null) {
service_ = null;
onChanged();
} else {
service_ = null;
serviceBuilder_ = null;
}
return this;
}
/**
*
* 被调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
*/
public com.google.protobuf.StringValue.Builder getServiceBuilder() {
onChanged();
return getServiceFieldBuilder().getBuilder();
}
/**
*
* 被调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
*/
public com.google.protobuf.StringValueOrBuilder getServiceOrBuilder() {
if (serviceBuilder_ != null) {
return serviceBuilder_.getMessageOrBuilder();
} else {
return service_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : service_;
}
}
/**
*
* 被调命名空间以及服务名,可以为*,代表全匹配
*
*
* .google.protobuf.StringValue service = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>
getServiceFieldBuilder() {
if (serviceBuilder_ == null) {
serviceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>(
getService(),
getParentForChildren(),
isClean());
service_ = null;
}
return serviceBuilder_;
}
private com.google.protobuf.StringValue namespace_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder> namespaceBuilder_;
/**
* .google.protobuf.StringValue namespace = 2;
* @return Whether the namespace field is set.
*/
public boolean hasNamespace() {
return namespaceBuilder_ != null || namespace_ != null;
}
/**
* .google.protobuf.StringValue namespace = 2;
* @return The namespace.
*/
public com.google.protobuf.StringValue getNamespace() {
if (namespaceBuilder_ == null) {
return namespace_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : namespace_;
} else {
return namespaceBuilder_.getMessage();
}
}
/**
* .google.protobuf.StringValue namespace = 2;
*/
public Builder setNamespace(com.google.protobuf.StringValue value) {
if (namespaceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
namespace_ = value;
onChanged();
} else {
namespaceBuilder_.setMessage(value);
}
return this;
}
/**
* .google.protobuf.StringValue namespace = 2;
*/
public Builder setNamespace(
com.google.protobuf.StringValue.Builder builderForValue) {
if (namespaceBuilder_ == null) {
namespace_ = builderForValue.build();
onChanged();
} else {
namespaceBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .google.protobuf.StringValue namespace = 2;
*/
public Builder mergeNamespace(com.google.protobuf.StringValue value) {
if (namespaceBuilder_ == null) {
if (namespace_ != null) {
namespace_ =
com.google.protobuf.StringValue.newBuilder(namespace_).mergeFrom(value).buildPartial();
} else {
namespace_ = value;
}
onChanged();
} else {
namespaceBuilder_.mergeFrom(value);
}
return this;
}
/**
* .google.protobuf.StringValue namespace = 2;
*/
public Builder clearNamespace() {
if (namespaceBuilder_ == null) {
namespace_ = null;
onChanged();
} else {
namespace_ = null;
namespaceBuilder_ = null;
}
return this;
}
/**
* .google.protobuf.StringValue namespace = 2;
*/
public com.google.protobuf.StringValue.Builder getNamespaceBuilder() {
onChanged();
return getNamespaceFieldBuilder().getBuilder();
}
/**
* .google.protobuf.StringValue namespace = 2;
*/
public com.google.protobuf.StringValueOrBuilder getNamespaceOrBuilder() {
if (namespaceBuilder_ != null) {
return namespaceBuilder_.getMessageOrBuilder();
} else {
return namespace_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : namespace_;
}
}
/**
* .google.protobuf.StringValue namespace = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>
getNamespaceFieldBuilder() {
if (namespaceBuilder_ == null) {
namespaceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.StringValue, com.google.protobuf.StringValue.Builder, com.google.protobuf.StringValueOrBuilder>(
getNamespace(),
getParentForChildren(),
isClean());
namespace_ = null;
}
return namespaceBuilder_;
}
private com.google.protobuf.MapField<
java.lang.String, com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString> metadata_;
private com.google.protobuf.MapField
internalGetMetadata() {
if (metadata_ == null) {
return com.google.protobuf.MapField.emptyMapField(
MetadataDefaultEntryHolder.defaultEntry);
}
return metadata_;
}
private com.google.protobuf.MapField
internalGetMutableMetadata() {
onChanged();;
if (metadata_ == null) {
metadata_ = com.google.protobuf.MapField.newMapField(
MetadataDefaultEntryHolder.defaultEntry);
}
if (!metadata_.isMutable()) {
metadata_ = metadata_.copy();
}
return metadata_;
}
public int getMetadataCount() {
return internalGetMetadata().getMap().size();
}
/**
*
* 可选,SUBSET标识
*
*
* map<string, .v1.MatchString> metadata = 3;
*/
@java.lang.Override
public boolean containsMetadata(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetMetadata().getMap().containsKey(key);
}
/**
* Use {@link #getMetadataMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getMetadata() {
return getMetadataMap();
}
/**
*
* 可选,SUBSET标识
*
*
* map<string, .v1.MatchString> metadata = 3;
*/
@java.lang.Override
public java.util.Map getMetadataMap() {
return internalGetMetadata().getMap();
}
/**
*
* 可选,SUBSET标识
*
*
* map<string, .v1.MatchString> metadata = 3;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString getMetadataOrDefault(
java.lang.String key,
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetMetadata().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* 可选,SUBSET标识
*
*
* map<string, .v1.MatchString> metadata = 3;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString getMetadataOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetMetadata().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearMetadata() {
internalGetMutableMetadata().getMutableMap()
.clear();
return this;
}
/**
*
* 可选,SUBSET标识
*
*
* map<string, .v1.MatchString> metadata = 3;
*/
public Builder removeMetadata(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableMetadata().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableMetadata() {
return internalGetMutableMetadata().getMutableMap();
}
/**
*
* 可选,SUBSET标识
*
*
* map<string, .v1.MatchString> metadata = 3;
*/
public Builder putMetadata(
java.lang.String key,
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) {
throw new NullPointerException("map value");
}
internalGetMutableMetadata().getMutableMap()
.put(key, value);
return this;
}
/**
*
* 可选,SUBSET标识
*
*
* map<string, .v1.MatchString> metadata = 3;
*/
public Builder putAllMetadata(
java.util.Map values) {
internalGetMutableMetadata().getMutableMap()
.putAll(values);
return this;
}
private int resource_ = 0;
/**
* .v1.DestinationSet.Resource resource = 4;
* @return The enum numeric value on the wire for resource.
*/
@java.lang.Override public int getResourceValue() {
return resource_;
}
/**
* .v1.DestinationSet.Resource resource = 4;
* @param value The enum numeric value on the wire for resource to set.
* @return This builder for chaining.
*/
public Builder setResourceValue(int value) {
resource_ = value;
onChanged();
return this;
}
/**
* .v1.DestinationSet.Resource resource = 4;
* @return The resource.
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Resource getResource() {
@SuppressWarnings("deprecation")
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Resource result = com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Resource.valueOf(resource_);
return result == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Resource.UNRECOGNIZED : result;
}
/**
* .v1.DestinationSet.Resource resource = 4;
* @param value The resource to set.
* @return This builder for chaining.
*/
public Builder setResource(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Resource value) {
if (value == null) {
throw new NullPointerException();
}
resource_ = value.getNumber();
onChanged();
return this;
}
/**
* .v1.DestinationSet.Resource resource = 4;
* @return This builder for chaining.
*/
public Builder clearResource() {
resource_ = 0;
onChanged();
return this;
}
private int type_ = 0;
/**
* .v1.DestinationSet.Type type = 5;
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
* .v1.DestinationSet.Type type = 5;
* @param value The enum numeric value on the wire for type to set.
* @return This builder for chaining.
*/
public Builder setTypeValue(int value) {
type_ = value;
onChanged();
return this;
}
/**
* .v1.DestinationSet.Type type = 5;
* @return The type.
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Type getType() {
@SuppressWarnings("deprecation")
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Type result = com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Type.valueOf(type_);
return result == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Type.UNRECOGNIZED : result;
}
/**
* .v1.DestinationSet.Type type = 5;
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Type value) {
if (value == null) {
throw new NullPointerException();
}
type_ = value.getNumber();
onChanged();
return this;
}
/**
* .v1.DestinationSet.Type type = 5;
* @return This builder for chaining.
*/
public Builder clearType() {
type_ = 0;
onChanged();
return this;
}
private int scope_ = 0;
/**
* .v1.DestinationSet.Scope scope = 6;
* @return The enum numeric value on the wire for scope.
*/
@java.lang.Override public int getScopeValue() {
return scope_;
}
/**
* .v1.DestinationSet.Scope scope = 6;
* @param value The enum numeric value on the wire for scope to set.
* @return This builder for chaining.
*/
public Builder setScopeValue(int value) {
scope_ = value;
onChanged();
return this;
}
/**
* .v1.DestinationSet.Scope scope = 6;
* @return The scope.
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Scope getScope() {
@SuppressWarnings("deprecation")
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Scope result = com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Scope.valueOf(scope_);
return result == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Scope.UNRECOGNIZED : result;
}
/**
* .v1.DestinationSet.Scope scope = 6;
* @param value The scope to set.
* @return This builder for chaining.
*/
public Builder setScope(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Scope value) {
if (value == null) {
throw new NullPointerException();
}
scope_ = value.getNumber();
onChanged();
return this;
}
/**
* .v1.DestinationSet.Scope scope = 6;
* @return This builder for chaining.
*/
public Builder clearScope() {
scope_ = 0;
onChanged();
return this;
}
private com.google.protobuf.Duration metricWindow_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> metricWindowBuilder_;
/**
*
* 熔断数据度量周期
* 所有的阈值指标按此周期进行统计
*
*
* .google.protobuf.Duration metricWindow = 7;
* @return Whether the metricWindow field is set.
*/
public boolean hasMetricWindow() {
return metricWindowBuilder_ != null || metricWindow_ != null;
}
/**
*
* 熔断数据度量周期
* 所有的阈值指标按此周期进行统计
*
*
* .google.protobuf.Duration metricWindow = 7;
* @return The metricWindow.
*/
public com.google.protobuf.Duration getMetricWindow() {
if (metricWindowBuilder_ == null) {
return metricWindow_ == null ? com.google.protobuf.Duration.getDefaultInstance() : metricWindow_;
} else {
return metricWindowBuilder_.getMessage();
}
}
/**
*
* 熔断数据度量周期
* 所有的阈值指标按此周期进行统计
*
*
* .google.protobuf.Duration metricWindow = 7;
*/
public Builder setMetricWindow(com.google.protobuf.Duration value) {
if (metricWindowBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
metricWindow_ = value;
onChanged();
} else {
metricWindowBuilder_.setMessage(value);
}
return this;
}
/**
*
* 熔断数据度量周期
* 所有的阈值指标按此周期进行统计
*
*
* .google.protobuf.Duration metricWindow = 7;
*/
public Builder setMetricWindow(
com.google.protobuf.Duration.Builder builderForValue) {
if (metricWindowBuilder_ == null) {
metricWindow_ = builderForValue.build();
onChanged();
} else {
metricWindowBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 熔断数据度量周期
* 所有的阈值指标按此周期进行统计
*
*
* .google.protobuf.Duration metricWindow = 7;
*/
public Builder mergeMetricWindow(com.google.protobuf.Duration value) {
if (metricWindowBuilder_ == null) {
if (metricWindow_ != null) {
metricWindow_ =
com.google.protobuf.Duration.newBuilder(metricWindow_).mergeFrom(value).buildPartial();
} else {
metricWindow_ = value;
}
onChanged();
} else {
metricWindowBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 熔断数据度量周期
* 所有的阈值指标按此周期进行统计
*
*
* .google.protobuf.Duration metricWindow = 7;
*/
public Builder clearMetricWindow() {
if (metricWindowBuilder_ == null) {
metricWindow_ = null;
onChanged();
} else {
metricWindow_ = null;
metricWindowBuilder_ = null;
}
return this;
}
/**
*
* 熔断数据度量周期
* 所有的阈值指标按此周期进行统计
*
*
* .google.protobuf.Duration metricWindow = 7;
*/
public com.google.protobuf.Duration.Builder getMetricWindowBuilder() {
onChanged();
return getMetricWindowFieldBuilder().getBuilder();
}
/**
*
* 熔断数据度量周期
* 所有的阈值指标按此周期进行统计
*
*
* .google.protobuf.Duration metricWindow = 7;
*/
public com.google.protobuf.DurationOrBuilder getMetricWindowOrBuilder() {
if (metricWindowBuilder_ != null) {
return metricWindowBuilder_.getMessageOrBuilder();
} else {
return metricWindow_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : metricWindow_;
}
}
/**
*
* 熔断数据度量周期
* 所有的阈值指标按此周期进行统计
*
*
* .google.protobuf.Duration metricWindow = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getMetricWindowFieldBuilder() {
if (metricWindowBuilder_ == null) {
metricWindowBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getMetricWindow(),
getParentForChildren(),
isClean());
metricWindow_ = null;
}
return metricWindowBuilder_;
}
private com.google.protobuf.UInt32Value metricPrecision_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> metricPrecisionBuilder_;
/**
*
* 熔断数据统计精度,决定数据度量的最小周期
* 度量滑窗的步长=window/precision
*
*
* .google.protobuf.UInt32Value metricPrecision = 8;
* @return Whether the metricPrecision field is set.
*/
public boolean hasMetricPrecision() {
return metricPrecisionBuilder_ != null || metricPrecision_ != null;
}
/**
*
* 熔断数据统计精度,决定数据度量的最小周期
* 度量滑窗的步长=window/precision
*
*
* .google.protobuf.UInt32Value metricPrecision = 8;
* @return The metricPrecision.
*/
public com.google.protobuf.UInt32Value getMetricPrecision() {
if (metricPrecisionBuilder_ == null) {
return metricPrecision_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : metricPrecision_;
} else {
return metricPrecisionBuilder_.getMessage();
}
}
/**
*
* 熔断数据统计精度,决定数据度量的最小周期
* 度量滑窗的步长=window/precision
*
*
* .google.protobuf.UInt32Value metricPrecision = 8;
*/
public Builder setMetricPrecision(com.google.protobuf.UInt32Value value) {
if (metricPrecisionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
metricPrecision_ = value;
onChanged();
} else {
metricPrecisionBuilder_.setMessage(value);
}
return this;
}
/**
*
* 熔断数据统计精度,决定数据度量的最小周期
* 度量滑窗的步长=window/precision
*
*
* .google.protobuf.UInt32Value metricPrecision = 8;
*/
public Builder setMetricPrecision(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (metricPrecisionBuilder_ == null) {
metricPrecision_ = builderForValue.build();
onChanged();
} else {
metricPrecisionBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 熔断数据统计精度,决定数据度量的最小周期
* 度量滑窗的步长=window/precision
*
*
* .google.protobuf.UInt32Value metricPrecision = 8;
*/
public Builder mergeMetricPrecision(com.google.protobuf.UInt32Value value) {
if (metricPrecisionBuilder_ == null) {
if (metricPrecision_ != null) {
metricPrecision_ =
com.google.protobuf.UInt32Value.newBuilder(metricPrecision_).mergeFrom(value).buildPartial();
} else {
metricPrecision_ = value;
}
onChanged();
} else {
metricPrecisionBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 熔断数据统计精度,决定数据度量的最小周期
* 度量滑窗的步长=window/precision
*
*
* .google.protobuf.UInt32Value metricPrecision = 8;
*/
public Builder clearMetricPrecision() {
if (metricPrecisionBuilder_ == null) {
metricPrecision_ = null;
onChanged();
} else {
metricPrecision_ = null;
metricPrecisionBuilder_ = null;
}
return this;
}
/**
*
* 熔断数据统计精度,决定数据度量的最小周期
* 度量滑窗的步长=window/precision
*
*
* .google.protobuf.UInt32Value metricPrecision = 8;
*/
public com.google.protobuf.UInt32Value.Builder getMetricPrecisionBuilder() {
onChanged();
return getMetricPrecisionFieldBuilder().getBuilder();
}
/**
*
* 熔断数据统计精度,决定数据度量的最小周期
* 度量滑窗的步长=window/precision
*
*
* .google.protobuf.UInt32Value metricPrecision = 8;
*/
public com.google.protobuf.UInt32ValueOrBuilder getMetricPrecisionOrBuilder() {
if (metricPrecisionBuilder_ != null) {
return metricPrecisionBuilder_.getMessageOrBuilder();
} else {
return metricPrecision_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : metricPrecision_;
}
}
/**
*
* 熔断数据统计精度,决定数据度量的最小周期
* 度量滑窗的步长=window/precision
*
*
* .google.protobuf.UInt32Value metricPrecision = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getMetricPrecisionFieldBuilder() {
if (metricPrecisionBuilder_ == null) {
metricPrecisionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getMetricPrecision(),
getParentForChildren(),
isClean());
metricPrecision_ = null;
}
return metricPrecisionBuilder_;
}
private com.google.protobuf.Duration updateInterval_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> updateIntervalBuilder_;
/**
*
* 熔断数据上报周期,对分布式熔断有效
*
*
* .google.protobuf.Duration updateInterval = 9;
* @return Whether the updateInterval field is set.
*/
public boolean hasUpdateInterval() {
return updateIntervalBuilder_ != null || updateInterval_ != null;
}
/**
*
* 熔断数据上报周期,对分布式熔断有效
*
*
* .google.protobuf.Duration updateInterval = 9;
* @return The updateInterval.
*/
public com.google.protobuf.Duration getUpdateInterval() {
if (updateIntervalBuilder_ == null) {
return updateInterval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : updateInterval_;
} else {
return updateIntervalBuilder_.getMessage();
}
}
/**
*
* 熔断数据上报周期,对分布式熔断有效
*
*
* .google.protobuf.Duration updateInterval = 9;
*/
public Builder setUpdateInterval(com.google.protobuf.Duration value) {
if (updateIntervalBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
updateInterval_ = value;
onChanged();
} else {
updateIntervalBuilder_.setMessage(value);
}
return this;
}
/**
*
* 熔断数据上报周期,对分布式熔断有效
*
*
* .google.protobuf.Duration updateInterval = 9;
*/
public Builder setUpdateInterval(
com.google.protobuf.Duration.Builder builderForValue) {
if (updateIntervalBuilder_ == null) {
updateInterval_ = builderForValue.build();
onChanged();
} else {
updateIntervalBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 熔断数据上报周期,对分布式熔断有效
*
*
* .google.protobuf.Duration updateInterval = 9;
*/
public Builder mergeUpdateInterval(com.google.protobuf.Duration value) {
if (updateIntervalBuilder_ == null) {
if (updateInterval_ != null) {
updateInterval_ =
com.google.protobuf.Duration.newBuilder(updateInterval_).mergeFrom(value).buildPartial();
} else {
updateInterval_ = value;
}
onChanged();
} else {
updateIntervalBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 熔断数据上报周期,对分布式熔断有效
*
*
* .google.protobuf.Duration updateInterval = 9;
*/
public Builder clearUpdateInterval() {
if (updateIntervalBuilder_ == null) {
updateInterval_ = null;
onChanged();
} else {
updateInterval_ = null;
updateIntervalBuilder_ = null;
}
return this;
}
/**
*
* 熔断数据上报周期,对分布式熔断有效
*
*
* .google.protobuf.Duration updateInterval = 9;
*/
public com.google.protobuf.Duration.Builder getUpdateIntervalBuilder() {
onChanged();
return getUpdateIntervalFieldBuilder().getBuilder();
}
/**
*
* 熔断数据上报周期,对分布式熔断有效
*
*
* .google.protobuf.Duration updateInterval = 9;
*/
public com.google.protobuf.DurationOrBuilder getUpdateIntervalOrBuilder() {
if (updateIntervalBuilder_ != null) {
return updateIntervalBuilder_.getMessageOrBuilder();
} else {
return updateInterval_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : updateInterval_;
}
}
/**
*
* 熔断数据上报周期,对分布式熔断有效
*
*
* .google.protobuf.Duration updateInterval = 9;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getUpdateIntervalFieldBuilder() {
if (updateIntervalBuilder_ == null) {
updateIntervalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getUpdateInterval(),
getParentForChildren(),
isClean());
updateInterval_ = null;
}
return updateIntervalBuilder_;
}
private com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig recover_;
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfigOrBuilder> recoverBuilder_;
/**
*
* 触发熔断后恢复配置
*
*
* .v1.RecoverConfig recover = 10;
* @return Whether the recover field is set.
*/
public boolean hasRecover() {
return recoverBuilder_ != null || recover_ != null;
}
/**
*
* 触发熔断后恢复配置
*
*
* .v1.RecoverConfig recover = 10;
* @return The recover.
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig getRecover() {
if (recoverBuilder_ == null) {
return recover_ == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.getDefaultInstance() : recover_;
} else {
return recoverBuilder_.getMessage();
}
}
/**
*
* 触发熔断后恢复配置
*
*
* .v1.RecoverConfig recover = 10;
*/
public Builder setRecover(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig value) {
if (recoverBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
recover_ = value;
onChanged();
} else {
recoverBuilder_.setMessage(value);
}
return this;
}
/**
*
* 触发熔断后恢复配置
*
*
* .v1.RecoverConfig recover = 10;
*/
public Builder setRecover(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.Builder builderForValue) {
if (recoverBuilder_ == null) {
recover_ = builderForValue.build();
onChanged();
} else {
recoverBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 触发熔断后恢复配置
*
*
* .v1.RecoverConfig recover = 10;
*/
public Builder mergeRecover(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig value) {
if (recoverBuilder_ == null) {
if (recover_ != null) {
recover_ =
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.newBuilder(recover_).mergeFrom(value).buildPartial();
} else {
recover_ = value;
}
onChanged();
} else {
recoverBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 触发熔断后恢复配置
*
*
* .v1.RecoverConfig recover = 10;
*/
public Builder clearRecover() {
if (recoverBuilder_ == null) {
recover_ = null;
onChanged();
} else {
recover_ = null;
recoverBuilder_ = null;
}
return this;
}
/**
*
* 触发熔断后恢复配置
*
*
* .v1.RecoverConfig recover = 10;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.Builder getRecoverBuilder() {
onChanged();
return getRecoverFieldBuilder().getBuilder();
}
/**
*
* 触发熔断后恢复配置
*
*
* .v1.RecoverConfig recover = 10;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfigOrBuilder getRecoverOrBuilder() {
if (recoverBuilder_ != null) {
return recoverBuilder_.getMessageOrBuilder();
} else {
return recover_ == null ?
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.getDefaultInstance() : recover_;
}
}
/**
*
* 触发熔断后恢复配置
*
*
* .v1.RecoverConfig recover = 10;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfigOrBuilder>
getRecoverFieldBuilder() {
if (recoverBuilder_ == null) {
recoverBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfig.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConfigOrBuilder>(
getRecover(),
getParentForChildren(),
isClean());
recover_ = null;
}
return recoverBuilder_;
}
private com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy policy_;
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicyOrBuilder> policyBuilder_;
/**
*
* 熔断策略
*
*
* .v1.CbPolicy policy = 11;
* @return Whether the policy field is set.
*/
public boolean hasPolicy() {
return policyBuilder_ != null || policy_ != null;
}
/**
*
* 熔断策略
*
*
* .v1.CbPolicy policy = 11;
* @return The policy.
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy getPolicy() {
if (policyBuilder_ == null) {
return policy_ == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.getDefaultInstance() : policy_;
} else {
return policyBuilder_.getMessage();
}
}
/**
*
* 熔断策略
*
*
* .v1.CbPolicy policy = 11;
*/
public Builder setPolicy(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy value) {
if (policyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
policy_ = value;
onChanged();
} else {
policyBuilder_.setMessage(value);
}
return this;
}
/**
*
* 熔断策略
*
*
* .v1.CbPolicy policy = 11;
*/
public Builder setPolicy(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.Builder builderForValue) {
if (policyBuilder_ == null) {
policy_ = builderForValue.build();
onChanged();
} else {
policyBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 熔断策略
*
*
* .v1.CbPolicy policy = 11;
*/
public Builder mergePolicy(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy value) {
if (policyBuilder_ == null) {
if (policy_ != null) {
policy_ =
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.newBuilder(policy_).mergeFrom(value).buildPartial();
} else {
policy_ = value;
}
onChanged();
} else {
policyBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 熔断策略
*
*
* .v1.CbPolicy policy = 11;
*/
public Builder clearPolicy() {
if (policyBuilder_ == null) {
policy_ = null;
onChanged();
} else {
policy_ = null;
policyBuilder_ = null;
}
return this;
}
/**
*
* 熔断策略
*
*
* .v1.CbPolicy policy = 11;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.Builder getPolicyBuilder() {
onChanged();
return getPolicyFieldBuilder().getBuilder();
}
/**
*
* 熔断策略
*
*
* .v1.CbPolicy policy = 11;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicyOrBuilder getPolicyOrBuilder() {
if (policyBuilder_ != null) {
return policyBuilder_.getMessageOrBuilder();
} else {
return policy_ == null ?
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.getDefaultInstance() : policy_;
}
}
/**
*
* 熔断策略
*
*
* .v1.CbPolicy policy = 11;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicyOrBuilder>
getPolicyFieldBuilder() {
if (policyBuilder_ == null) {
policyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicy.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbPolicyOrBuilder>(
getPolicy(),
getParentForChildren(),
isClean());
policy_ = null;
}
return policyBuilder_;
}
private com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString method_;
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString, com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.Builder, com.tencent.polaris.specification.api.v1.model.ModelProto.MatchStringOrBuilder> methodBuilder_;
/**
*
* 被调的接口信息,指定哪些接口会使用该规则
*
*
* .v1.MatchString method = 12;
* @return Whether the method field is set.
*/
public boolean hasMethod() {
return methodBuilder_ != null || method_ != null;
}
/**
*
* 被调的接口信息,指定哪些接口会使用该规则
*
*
* .v1.MatchString method = 12;
* @return The method.
*/
public com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString getMethod() {
if (methodBuilder_ == null) {
return method_ == null ? com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.getDefaultInstance() : method_;
} else {
return methodBuilder_.getMessage();
}
}
/**
*
* 被调的接口信息,指定哪些接口会使用该规则
*
*
* .v1.MatchString method = 12;
*/
public Builder setMethod(com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString value) {
if (methodBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
method_ = value;
onChanged();
} else {
methodBuilder_.setMessage(value);
}
return this;
}
/**
*
* 被调的接口信息,指定哪些接口会使用该规则
*
*
* .v1.MatchString method = 12;
*/
public Builder setMethod(
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.Builder builderForValue) {
if (methodBuilder_ == null) {
method_ = builderForValue.build();
onChanged();
} else {
methodBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* 被调的接口信息,指定哪些接口会使用该规则
*
*
* .v1.MatchString method = 12;
*/
public Builder mergeMethod(com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString value) {
if (methodBuilder_ == null) {
if (method_ != null) {
method_ =
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.newBuilder(method_).mergeFrom(value).buildPartial();
} else {
method_ = value;
}
onChanged();
} else {
methodBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* 被调的接口信息,指定哪些接口会使用该规则
*
*
* .v1.MatchString method = 12;
*/
public Builder clearMethod() {
if (methodBuilder_ == null) {
method_ = null;
onChanged();
} else {
method_ = null;
methodBuilder_ = null;
}
return this;
}
/**
*
* 被调的接口信息,指定哪些接口会使用该规则
*
*
* .v1.MatchString method = 12;
*/
public com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.Builder getMethodBuilder() {
onChanged();
return getMethodFieldBuilder().getBuilder();
}
/**
*
* 被调的接口信息,指定哪些接口会使用该规则
*
*
* .v1.MatchString method = 12;
*/
public com.tencent.polaris.specification.api.v1.model.ModelProto.MatchStringOrBuilder getMethodOrBuilder() {
if (methodBuilder_ != null) {
return methodBuilder_.getMessageOrBuilder();
} else {
return method_ == null ?
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.getDefaultInstance() : method_;
}
}
/**
*
* 被调的接口信息,指定哪些接口会使用该规则
*
*
* .v1.MatchString method = 12;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString, com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.Builder, com.tencent.polaris.specification.api.v1.model.ModelProto.MatchStringOrBuilder>
getMethodFieldBuilder() {
if (methodBuilder_ == null) {
methodBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString, com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.Builder, com.tencent.polaris.specification.api.v1.model.ModelProto.MatchStringOrBuilder>(
getMethod(),
getParentForChildren(),
isClean());
method_ = null;
}
return methodBuilder_;
}
private java.util.List errorCodes_ =
java.util.Collections.emptyList();
private void ensureErrorCodesIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
errorCodes_ = new java.util.ArrayList(errorCodes_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> errorCodesBuilder_;
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
public java.util.List getErrorCodesList() {
if (errorCodesBuilder_ == null) {
return java.util.Collections.unmodifiableList(errorCodes_);
} else {
return errorCodesBuilder_.getMessageList();
}
}
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
public int getErrorCodesCount() {
if (errorCodesBuilder_ == null) {
return errorCodes_.size();
} else {
return errorCodesBuilder_.getCount();
}
}
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
public com.google.protobuf.Int64Value getErrorCodes(int index) {
if (errorCodesBuilder_ == null) {
return errorCodes_.get(index);
} else {
return errorCodesBuilder_.getMessage(index);
}
}
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
public Builder setErrorCodes(
int index, com.google.protobuf.Int64Value value) {
if (errorCodesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureErrorCodesIsMutable();
errorCodes_.set(index, value);
onChanged();
} else {
errorCodesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
public Builder setErrorCodes(
int index, com.google.protobuf.Int64Value.Builder builderForValue) {
if (errorCodesBuilder_ == null) {
ensureErrorCodesIsMutable();
errorCodes_.set(index, builderForValue.build());
onChanged();
} else {
errorCodesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
public Builder addErrorCodes(com.google.protobuf.Int64Value value) {
if (errorCodesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureErrorCodesIsMutable();
errorCodes_.add(value);
onChanged();
} else {
errorCodesBuilder_.addMessage(value);
}
return this;
}
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
public Builder addErrorCodes(
int index, com.google.protobuf.Int64Value value) {
if (errorCodesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureErrorCodesIsMutable();
errorCodes_.add(index, value);
onChanged();
} else {
errorCodesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
public Builder addErrorCodes(
com.google.protobuf.Int64Value.Builder builderForValue) {
if (errorCodesBuilder_ == null) {
ensureErrorCodesIsMutable();
errorCodes_.add(builderForValue.build());
onChanged();
} else {
errorCodesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
public Builder addErrorCodes(
int index, com.google.protobuf.Int64Value.Builder builderForValue) {
if (errorCodesBuilder_ == null) {
ensureErrorCodesIsMutable();
errorCodes_.add(index, builderForValue.build());
onChanged();
} else {
errorCodesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
public Builder addAllErrorCodes(
java.lang.Iterable extends com.google.protobuf.Int64Value> values) {
if (errorCodesBuilder_ == null) {
ensureErrorCodesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, errorCodes_);
onChanged();
} else {
errorCodesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
public Builder clearErrorCodes() {
if (errorCodesBuilder_ == null) {
errorCodes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
errorCodesBuilder_.clear();
}
return this;
}
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
public Builder removeErrorCodes(int index) {
if (errorCodesBuilder_ == null) {
ensureErrorCodesIsMutable();
errorCodes_.remove(index);
onChanged();
} else {
errorCodesBuilder_.remove(index);
}
return this;
}
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
public com.google.protobuf.Int64Value.Builder getErrorCodesBuilder(
int index) {
return getErrorCodesFieldBuilder().getBuilder(index);
}
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
public com.google.protobuf.Int64ValueOrBuilder getErrorCodesOrBuilder(
int index) {
if (errorCodesBuilder_ == null) {
return errorCodes_.get(index); } else {
return errorCodesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
public java.util.List extends com.google.protobuf.Int64ValueOrBuilder>
getErrorCodesOrBuilderList() {
if (errorCodesBuilder_ != null) {
return errorCodesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(errorCodes_);
}
}
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
public com.google.protobuf.Int64Value.Builder addErrorCodesBuilder() {
return getErrorCodesFieldBuilder().addBuilder(
com.google.protobuf.Int64Value.getDefaultInstance());
}
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
public com.google.protobuf.Int64Value.Builder addErrorCodesBuilder(
int index) {
return getErrorCodesFieldBuilder().addBuilder(
index, com.google.protobuf.Int64Value.getDefaultInstance());
}
/**
*
* 返回码,指定哪些返回码会使用该规则
*
*
* repeated .google.protobuf.Int64Value errorCodes = 13;
*/
public java.util.List
getErrorCodesBuilderList() {
return getErrorCodesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>
getErrorCodesFieldBuilder() {
if (errorCodesBuilder_ == null) {
errorCodesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>(
errorCodes_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
errorCodes_ = null;
}
return errorCodesBuilder_;
}
@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:v1.DestinationSet)
}
// @@protoc_insertion_point(class_scope:v1.DestinationSet)
private static final com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet();
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DestinationSet 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CbRuleOrBuilder extends
// @@protoc_insertion_point(interface_extends:v1.CbRule)
com.google.protobuf.MessageOrBuilder {
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
java.util.List
getSourcesList();
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher getSources(int index);
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
int getSourcesCount();
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcherOrBuilder>
getSourcesOrBuilderList();
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcherOrBuilder getSourcesOrBuilder(
int index);
/**
* repeated .v1.DestinationSet destinations = 2;
*/
java.util.List
getDestinationsList();
/**
* repeated .v1.DestinationSet destinations = 2;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet getDestinations(int index);
/**
* repeated .v1.DestinationSet destinations = 2;
*/
int getDestinationsCount();
/**
* repeated .v1.DestinationSet destinations = 2;
*/
java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSetOrBuilder>
getDestinationsOrBuilderList();
/**
* repeated .v1.DestinationSet destinations = 2;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSetOrBuilder getDestinationsOrBuilder(
int index);
}
/**
*
* 具体熔断规则
*
*
* Protobuf type {@code v1.CbRule}
*/
public static final class CbRule extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:v1.CbRule)
CbRuleOrBuilder {
private static final long serialVersionUID = 0L;
// Use CbRule.newBuilder() to construct.
private CbRule(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CbRule() {
sources_ = java.util.Collections.emptyList();
destinations_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CbRule();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbRule_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.Builder.class);
}
public static final int SOURCES_FIELD_NUMBER = 1;
private java.util.List sources_;
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
@java.lang.Override
public java.util.List getSourcesList() {
return sources_;
}
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
@java.lang.Override
public java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcherOrBuilder>
getSourcesOrBuilderList() {
return sources_;
}
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
@java.lang.Override
public int getSourcesCount() {
return sources_.size();
}
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher getSources(int index) {
return sources_.get(index);
}
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcherOrBuilder getSourcesOrBuilder(
int index) {
return sources_.get(index);
}
public static final int DESTINATIONS_FIELD_NUMBER = 2;
private java.util.List destinations_;
/**
* repeated .v1.DestinationSet destinations = 2;
*/
@java.lang.Override
public java.util.List getDestinationsList() {
return destinations_;
}
/**
* repeated .v1.DestinationSet destinations = 2;
*/
@java.lang.Override
public java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSetOrBuilder>
getDestinationsOrBuilderList() {
return destinations_;
}
/**
* repeated .v1.DestinationSet destinations = 2;
*/
@java.lang.Override
public int getDestinationsCount() {
return destinations_.size();
}
/**
* repeated .v1.DestinationSet destinations = 2;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet getDestinations(int index) {
return destinations_.get(index);
}
/**
* repeated .v1.DestinationSet destinations = 2;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSetOrBuilder getDestinationsOrBuilder(
int index) {
return destinations_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < sources_.size(); i++) {
output.writeMessage(1, sources_.get(i));
}
for (int i = 0; i < destinations_.size(); i++) {
output.writeMessage(2, destinations_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < sources_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, sources_.get(i));
}
for (int i = 0; i < destinations_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, destinations_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule)) {
return super.equals(obj);
}
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule other = (com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule) obj;
if (!getSourcesList()
.equals(other.getSourcesList())) return false;
if (!getDestinationsList()
.equals(other.getDestinationsList())) 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 (getSourcesCount() > 0) {
hash = (37 * hash) + SOURCES_FIELD_NUMBER;
hash = (53 * hash) + getSourcesList().hashCode();
}
if (getDestinationsCount() > 0) {
hash = (37 * hash) + DESTINATIONS_FIELD_NUMBER;
hash = (53 * hash) + getDestinationsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule 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(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule 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 v1.CbRule}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:v1.CbRule)
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRuleOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbRule_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.Builder.class);
}
// Construct using com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
if (sourcesBuilder_ == null) {
sources_ = java.util.Collections.emptyList();
} else {
sources_ = null;
sourcesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
if (destinationsBuilder_ == null) {
destinations_ = java.util.Collections.emptyList();
} else {
destinations_ = null;
destinationsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CbRule_descriptor;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule getDefaultInstanceForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.getDefaultInstance();
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule build() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule buildPartial() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule result = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule(this);
int from_bitField0_ = bitField0_;
if (sourcesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
sources_ = java.util.Collections.unmodifiableList(sources_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.sources_ = sources_;
} else {
result.sources_ = sourcesBuilder_.build();
}
if (destinationsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
destinations_ = java.util.Collections.unmodifiableList(destinations_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.destinations_ = destinations_;
} else {
result.destinations_ = destinationsBuilder_.build();
}
onBuilt();
return result;
}
@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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule) {
return mergeFrom((com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule other) {
if (other == com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule.getDefaultInstance()) return this;
if (sourcesBuilder_ == null) {
if (!other.sources_.isEmpty()) {
if (sources_.isEmpty()) {
sources_ = other.sources_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureSourcesIsMutable();
sources_.addAll(other.sources_);
}
onChanged();
}
} else {
if (!other.sources_.isEmpty()) {
if (sourcesBuilder_.isEmpty()) {
sourcesBuilder_.dispose();
sourcesBuilder_ = null;
sources_ = other.sources_;
bitField0_ = (bitField0_ & ~0x00000001);
sourcesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getSourcesFieldBuilder() : null;
} else {
sourcesBuilder_.addAllMessages(other.sources_);
}
}
}
if (destinationsBuilder_ == null) {
if (!other.destinations_.isEmpty()) {
if (destinations_.isEmpty()) {
destinations_ = other.destinations_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureDestinationsIsMutable();
destinations_.addAll(other.destinations_);
}
onChanged();
}
} else {
if (!other.destinations_.isEmpty()) {
if (destinationsBuilder_.isEmpty()) {
destinationsBuilder_.dispose();
destinationsBuilder_ = null;
destinations_ = other.destinations_;
bitField0_ = (bitField0_ & ~0x00000002);
destinationsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getDestinationsFieldBuilder() : null;
} else {
destinationsBuilder_.addAllMessages(other.destinations_);
}
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher m =
input.readMessage(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher.parser(),
extensionRegistry);
if (sourcesBuilder_ == null) {
ensureSourcesIsMutable();
sources_.add(m);
} else {
sourcesBuilder_.addMessage(m);
}
break;
} // case 10
case 18: {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet m =
input.readMessage(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.parser(),
extensionRegistry);
if (destinationsBuilder_ == null) {
ensureDestinationsIsMutable();
destinations_.add(m);
} else {
destinationsBuilder_.addMessage(m);
}
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.util.List sources_ =
java.util.Collections.emptyList();
private void ensureSourcesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
sources_ = new java.util.ArrayList(sources_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcherOrBuilder> sourcesBuilder_;
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
public java.util.List getSourcesList() {
if (sourcesBuilder_ == null) {
return java.util.Collections.unmodifiableList(sources_);
} else {
return sourcesBuilder_.getMessageList();
}
}
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
public int getSourcesCount() {
if (sourcesBuilder_ == null) {
return sources_.size();
} else {
return sourcesBuilder_.getCount();
}
}
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher getSources(int index) {
if (sourcesBuilder_ == null) {
return sources_.get(index);
} else {
return sourcesBuilder_.getMessage(index);
}
}
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
public Builder setSources(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher value) {
if (sourcesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSourcesIsMutable();
sources_.set(index, value);
onChanged();
} else {
sourcesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
public Builder setSources(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher.Builder builderForValue) {
if (sourcesBuilder_ == null) {
ensureSourcesIsMutable();
sources_.set(index, builderForValue.build());
onChanged();
} else {
sourcesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
public Builder addSources(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher value) {
if (sourcesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSourcesIsMutable();
sources_.add(value);
onChanged();
} else {
sourcesBuilder_.addMessage(value);
}
return this;
}
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
public Builder addSources(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher value) {
if (sourcesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSourcesIsMutable();
sources_.add(index, value);
onChanged();
} else {
sourcesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
public Builder addSources(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher.Builder builderForValue) {
if (sourcesBuilder_ == null) {
ensureSourcesIsMutable();
sources_.add(builderForValue.build());
onChanged();
} else {
sourcesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
public Builder addSources(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher.Builder builderForValue) {
if (sourcesBuilder_ == null) {
ensureSourcesIsMutable();
sources_.add(index, builderForValue.build());
onChanged();
} else {
sourcesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
public Builder addAllSources(
java.lang.Iterable extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher> values) {
if (sourcesBuilder_ == null) {
ensureSourcesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, sources_);
onChanged();
} else {
sourcesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
public Builder clearSources() {
if (sourcesBuilder_ == null) {
sources_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
sourcesBuilder_.clear();
}
return this;
}
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
public Builder removeSources(int index) {
if (sourcesBuilder_ == null) {
ensureSourcesIsMutable();
sources_.remove(index);
onChanged();
} else {
sourcesBuilder_.remove(index);
}
return this;
}
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher.Builder getSourcesBuilder(
int index) {
return getSourcesFieldBuilder().getBuilder(index);
}
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcherOrBuilder getSourcesOrBuilder(
int index) {
if (sourcesBuilder_ == null) {
return sources_.get(index); } else {
return sourcesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
public java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcherOrBuilder>
getSourcesOrBuilderList() {
if (sourcesBuilder_ != null) {
return sourcesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(sources_);
}
}
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher.Builder addSourcesBuilder() {
return getSourcesFieldBuilder().addBuilder(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher.getDefaultInstance());
}
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher.Builder addSourcesBuilder(
int index) {
return getSourcesFieldBuilder().addBuilder(
index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher.getDefaultInstance());
}
/**
*
* 如果匹配Source规则,按照Destination进行熔断
* 多个Source之间的关系为或
*
*
* repeated .v1.SourceMatcher sources = 1;
*/
public java.util.List
getSourcesBuilderList() {
return getSourcesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcherOrBuilder>
getSourcesFieldBuilder() {
if (sourcesBuilder_ == null) {
sourcesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcher.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.SourceMatcherOrBuilder>(
sources_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
sources_ = null;
}
return sourcesBuilder_;
}
private java.util.List destinations_ =
java.util.Collections.emptyList();
private void ensureDestinationsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
destinations_ = new java.util.ArrayList(destinations_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSetOrBuilder> destinationsBuilder_;
/**
* repeated .v1.DestinationSet destinations = 2;
*/
public java.util.List getDestinationsList() {
if (destinationsBuilder_ == null) {
return java.util.Collections.unmodifiableList(destinations_);
} else {
return destinationsBuilder_.getMessageList();
}
}
/**
* repeated .v1.DestinationSet destinations = 2;
*/
public int getDestinationsCount() {
if (destinationsBuilder_ == null) {
return destinations_.size();
} else {
return destinationsBuilder_.getCount();
}
}
/**
* repeated .v1.DestinationSet destinations = 2;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet getDestinations(int index) {
if (destinationsBuilder_ == null) {
return destinations_.get(index);
} else {
return destinationsBuilder_.getMessage(index);
}
}
/**
* repeated .v1.DestinationSet destinations = 2;
*/
public Builder setDestinations(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet value) {
if (destinationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDestinationsIsMutable();
destinations_.set(index, value);
onChanged();
} else {
destinationsBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .v1.DestinationSet destinations = 2;
*/
public Builder setDestinations(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Builder builderForValue) {
if (destinationsBuilder_ == null) {
ensureDestinationsIsMutable();
destinations_.set(index, builderForValue.build());
onChanged();
} else {
destinationsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .v1.DestinationSet destinations = 2;
*/
public Builder addDestinations(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet value) {
if (destinationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDestinationsIsMutable();
destinations_.add(value);
onChanged();
} else {
destinationsBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .v1.DestinationSet destinations = 2;
*/
public Builder addDestinations(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet value) {
if (destinationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDestinationsIsMutable();
destinations_.add(index, value);
onChanged();
} else {
destinationsBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .v1.DestinationSet destinations = 2;
*/
public Builder addDestinations(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Builder builderForValue) {
if (destinationsBuilder_ == null) {
ensureDestinationsIsMutable();
destinations_.add(builderForValue.build());
onChanged();
} else {
destinationsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .v1.DestinationSet destinations = 2;
*/
public Builder addDestinations(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Builder builderForValue) {
if (destinationsBuilder_ == null) {
ensureDestinationsIsMutable();
destinations_.add(index, builderForValue.build());
onChanged();
} else {
destinationsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .v1.DestinationSet destinations = 2;
*/
public Builder addAllDestinations(
java.lang.Iterable extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet> values) {
if (destinationsBuilder_ == null) {
ensureDestinationsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, destinations_);
onChanged();
} else {
destinationsBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .v1.DestinationSet destinations = 2;
*/
public Builder clearDestinations() {
if (destinationsBuilder_ == null) {
destinations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
destinationsBuilder_.clear();
}
return this;
}
/**
* repeated .v1.DestinationSet destinations = 2;
*/
public Builder removeDestinations(int index) {
if (destinationsBuilder_ == null) {
ensureDestinationsIsMutable();
destinations_.remove(index);
onChanged();
} else {
destinationsBuilder_.remove(index);
}
return this;
}
/**
* repeated .v1.DestinationSet destinations = 2;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Builder getDestinationsBuilder(
int index) {
return getDestinationsFieldBuilder().getBuilder(index);
}
/**
* repeated .v1.DestinationSet destinations = 2;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSetOrBuilder getDestinationsOrBuilder(
int index) {
if (destinationsBuilder_ == null) {
return destinations_.get(index); } else {
return destinationsBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .v1.DestinationSet destinations = 2;
*/
public java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSetOrBuilder>
getDestinationsOrBuilderList() {
if (destinationsBuilder_ != null) {
return destinationsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(destinations_);
}
}
/**
* repeated .v1.DestinationSet destinations = 2;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Builder addDestinationsBuilder() {
return getDestinationsFieldBuilder().addBuilder(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.getDefaultInstance());
}
/**
* repeated .v1.DestinationSet destinations = 2;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Builder addDestinationsBuilder(
int index) {
return getDestinationsFieldBuilder().addBuilder(
index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.getDefaultInstance());
}
/**
* repeated .v1.DestinationSet destinations = 2;
*/
public java.util.List
getDestinationsBuilderList() {
return getDestinationsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSetOrBuilder>
getDestinationsFieldBuilder() {
if (destinationsBuilder_ == null) {
destinationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSet.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.DestinationSetOrBuilder>(
destinations_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
destinations_ = null;
}
return destinationsBuilder_;
}
@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:v1.CbRule)
}
// @@protoc_insertion_point(class_scope:v1.CbRule)
private static final com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule();
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CbRule 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CbRule getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface RuleMatcherOrBuilder extends
// @@protoc_insertion_point(interface_extends:v1.RuleMatcher)
com.google.protobuf.MessageOrBuilder {
/**
* .v1.RuleMatcher.SourceService source = 1;
* @return Whether the source field is set.
*/
boolean hasSource();
/**
* .v1.RuleMatcher.SourceService source = 1;
* @return The source.
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService getSource();
/**
* .v1.RuleMatcher.SourceService source = 1;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceServiceOrBuilder getSourceOrBuilder();
/**
* .v1.RuleMatcher.DestinationService destination = 2;
* @return Whether the destination field is set.
*/
boolean hasDestination();
/**
* .v1.RuleMatcher.DestinationService destination = 2;
* @return The destination.
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService getDestination();
/**
* .v1.RuleMatcher.DestinationService destination = 2;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationServiceOrBuilder getDestinationOrBuilder();
}
/**
* Protobuf type {@code v1.RuleMatcher}
*/
public static final class RuleMatcher extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:v1.RuleMatcher)
RuleMatcherOrBuilder {
private static final long serialVersionUID = 0L;
// Use RuleMatcher.newBuilder() to construct.
private RuleMatcher(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RuleMatcher() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RuleMatcher();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RuleMatcher_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RuleMatcher_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.Builder.class);
}
public interface SourceServiceOrBuilder extends
// @@protoc_insertion_point(interface_extends:v1.RuleMatcher.SourceService)
com.google.protobuf.MessageOrBuilder {
/**
* string service = 1;
* @return The service.
*/
java.lang.String getService();
/**
* string service = 1;
* @return The bytes for service.
*/
com.google.protobuf.ByteString
getServiceBytes();
/**
* string namespace = 2;
* @return The namespace.
*/
java.lang.String getNamespace();
/**
* string namespace = 2;
* @return The bytes for namespace.
*/
com.google.protobuf.ByteString
getNamespaceBytes();
}
/**
* Protobuf type {@code v1.RuleMatcher.SourceService}
*/
public static final class SourceService extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:v1.RuleMatcher.SourceService)
SourceServiceOrBuilder {
private static final long serialVersionUID = 0L;
// Use SourceService.newBuilder() to construct.
private SourceService(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SourceService() {
service_ = "";
namespace_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SourceService();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RuleMatcher_SourceService_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RuleMatcher_SourceService_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService.Builder.class);
}
public static final int SERVICE_FIELD_NUMBER = 1;
private volatile java.lang.Object service_;
/**
* string service = 1;
* @return The service.
*/
@java.lang.Override
public java.lang.String getService() {
java.lang.Object ref = service_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
service_ = s;
return s;
}
}
/**
* string service = 1;
* @return The bytes for service.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getServiceBytes() {
java.lang.Object ref = service_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
service_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NAMESPACE_FIELD_NUMBER = 2;
private volatile java.lang.Object namespace_;
/**
* string namespace = 2;
* @return The namespace.
*/
@java.lang.Override
public java.lang.String getNamespace() {
java.lang.Object ref = namespace_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
namespace_ = s;
return s;
}
}
/**
* string namespace = 2;
* @return The bytes for namespace.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNamespaceBytes() {
java.lang.Object ref = namespace_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
namespace_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, namespace_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, namespace_);
}
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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService)) {
return super.equals(obj);
}
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService other = (com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService) obj;
if (!getService()
.equals(other.getService())) return false;
if (!getNamespace()
.equals(other.getNamespace())) 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) + SERVICE_FIELD_NUMBER;
hash = (53 * hash) + getService().hashCode();
hash = (37 * hash) + NAMESPACE_FIELD_NUMBER;
hash = (53 * hash) + getNamespace().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService 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(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService 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 v1.RuleMatcher.SourceService}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:v1.RuleMatcher.SourceService)
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceServiceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RuleMatcher_SourceService_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RuleMatcher_SourceService_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService.Builder.class);
}
// Construct using com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
service_ = "";
namespace_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RuleMatcher_SourceService_descriptor;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService getDefaultInstanceForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService.getDefaultInstance();
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService build() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService buildPartial() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService result = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService(this);
result.service_ = service_;
result.namespace_ = namespace_;
onBuilt();
return result;
}
@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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService) {
return mergeFrom((com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService other) {
if (other == com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService.getDefaultInstance()) return this;
if (!other.getService().isEmpty()) {
service_ = other.service_;
onChanged();
}
if (!other.getNamespace().isEmpty()) {
namespace_ = other.namespace_;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
service_ = input.readStringRequireUtf8();
break;
} // case 10
case 18: {
namespace_ = input.readStringRequireUtf8();
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private java.lang.Object service_ = "";
/**
* string service = 1;
* @return The service.
*/
public java.lang.String getService() {
java.lang.Object ref = service_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
service_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string service = 1;
* @return The bytes for service.
*/
public com.google.protobuf.ByteString
getServiceBytes() {
java.lang.Object ref = service_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
service_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string service = 1;
* @param value The service to set.
* @return This builder for chaining.
*/
public Builder setService(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
service_ = value;
onChanged();
return this;
}
/**
* string service = 1;
* @return This builder for chaining.
*/
public Builder clearService() {
service_ = getDefaultInstance().getService();
onChanged();
return this;
}
/**
* string service = 1;
* @param value The bytes for service to set.
* @return This builder for chaining.
*/
public Builder setServiceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
service_ = value;
onChanged();
return this;
}
private java.lang.Object namespace_ = "";
/**
* string namespace = 2;
* @return The namespace.
*/
public java.lang.String getNamespace() {
java.lang.Object ref = namespace_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
namespace_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string namespace = 2;
* @return The bytes for namespace.
*/
public com.google.protobuf.ByteString
getNamespaceBytes() {
java.lang.Object ref = namespace_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
namespace_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string namespace = 2;
* @param value The namespace to set.
* @return This builder for chaining.
*/
public Builder setNamespace(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
namespace_ = value;
onChanged();
return this;
}
/**
* string namespace = 2;
* @return This builder for chaining.
*/
public Builder clearNamespace() {
namespace_ = getDefaultInstance().getNamespace();
onChanged();
return this;
}
/**
* string namespace = 2;
* @param value The bytes for namespace to set.
* @return This builder for chaining.
*/
public Builder setNamespaceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
namespace_ = value;
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:v1.RuleMatcher.SourceService)
}
// @@protoc_insertion_point(class_scope:v1.RuleMatcher.SourceService)
private static final com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService();
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SourceService 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface DestinationServiceOrBuilder extends
// @@protoc_insertion_point(interface_extends:v1.RuleMatcher.DestinationService)
com.google.protobuf.MessageOrBuilder {
/**
* string service = 1;
* @return The service.
*/
java.lang.String getService();
/**
* string service = 1;
* @return The bytes for service.
*/
com.google.protobuf.ByteString
getServiceBytes();
/**
* string namespace = 2;
* @return The namespace.
*/
java.lang.String getNamespace();
/**
* string namespace = 2;
* @return The bytes for namespace.
*/
com.google.protobuf.ByteString
getNamespaceBytes();
/**
* .v1.MatchString method = 3;
* @return Whether the method field is set.
*/
boolean hasMethod();
/**
* .v1.MatchString method = 3;
* @return The method.
*/
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString getMethod();
/**
* .v1.MatchString method = 3;
*/
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchStringOrBuilder getMethodOrBuilder();
}
/**
* Protobuf type {@code v1.RuleMatcher.DestinationService}
*/
public static final class DestinationService extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:v1.RuleMatcher.DestinationService)
DestinationServiceOrBuilder {
private static final long serialVersionUID = 0L;
// Use DestinationService.newBuilder() to construct.
private DestinationService(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DestinationService() {
service_ = "";
namespace_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DestinationService();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RuleMatcher_DestinationService_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RuleMatcher_DestinationService_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService.Builder.class);
}
public static final int SERVICE_FIELD_NUMBER = 1;
private volatile java.lang.Object service_;
/**
* string service = 1;
* @return The service.
*/
@java.lang.Override
public java.lang.String getService() {
java.lang.Object ref = service_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
service_ = s;
return s;
}
}
/**
* string service = 1;
* @return The bytes for service.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getServiceBytes() {
java.lang.Object ref = service_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
service_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NAMESPACE_FIELD_NUMBER = 2;
private volatile java.lang.Object namespace_;
/**
* string namespace = 2;
* @return The namespace.
*/
@java.lang.Override
public java.lang.String getNamespace() {
java.lang.Object ref = namespace_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
namespace_ = s;
return s;
}
}
/**
* string namespace = 2;
* @return The bytes for namespace.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNamespaceBytes() {
java.lang.Object ref = namespace_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
namespace_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int METHOD_FIELD_NUMBER = 3;
private com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString method_;
/**
* .v1.MatchString method = 3;
* @return Whether the method field is set.
*/
@java.lang.Override
public boolean hasMethod() {
return method_ != null;
}
/**
* .v1.MatchString method = 3;
* @return The method.
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString getMethod() {
return method_ == null ? com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.getDefaultInstance() : method_;
}
/**
* .v1.MatchString method = 3;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.model.ModelProto.MatchStringOrBuilder getMethodOrBuilder() {
return getMethod();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, namespace_);
}
if (method_ != null) {
output.writeMessage(3, getMethod());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, namespace_);
}
if (method_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getMethod());
}
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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService)) {
return super.equals(obj);
}
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService other = (com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService) obj;
if (!getService()
.equals(other.getService())) return false;
if (!getNamespace()
.equals(other.getNamespace())) return false;
if (hasMethod() != other.hasMethod()) return false;
if (hasMethod()) {
if (!getMethod()
.equals(other.getMethod())) 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) + SERVICE_FIELD_NUMBER;
hash = (53 * hash) + getService().hashCode();
hash = (37 * hash) + NAMESPACE_FIELD_NUMBER;
hash = (53 * hash) + getNamespace().hashCode();
if (hasMethod()) {
hash = (37 * hash) + METHOD_FIELD_NUMBER;
hash = (53 * hash) + getMethod().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService 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(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService 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 v1.RuleMatcher.DestinationService}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:v1.RuleMatcher.DestinationService)
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationServiceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RuleMatcher_DestinationService_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RuleMatcher_DestinationService_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService.Builder.class);
}
// Construct using com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
service_ = "";
namespace_ = "";
if (methodBuilder_ == null) {
method_ = null;
} else {
method_ = null;
methodBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RuleMatcher_DestinationService_descriptor;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService getDefaultInstanceForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService.getDefaultInstance();
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService build() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService buildPartial() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService result = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService(this);
result.service_ = service_;
result.namespace_ = namespace_;
if (methodBuilder_ == null) {
result.method_ = method_;
} else {
result.method_ = methodBuilder_.build();
}
onBuilt();
return result;
}
@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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService) {
return mergeFrom((com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService other) {
if (other == com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService.getDefaultInstance()) return this;
if (!other.getService().isEmpty()) {
service_ = other.service_;
onChanged();
}
if (!other.getNamespace().isEmpty()) {
namespace_ = other.namespace_;
onChanged();
}
if (other.hasMethod()) {
mergeMethod(other.getMethod());
}
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: {
service_ = input.readStringRequireUtf8();
break;
} // case 10
case 18: {
namespace_ = input.readStringRequireUtf8();
break;
} // case 18
case 26: {
input.readMessage(
getMethodFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 26
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 java.lang.Object service_ = "";
/**
* string service = 1;
* @return The service.
*/
public java.lang.String getService() {
java.lang.Object ref = service_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
service_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string service = 1;
* @return The bytes for service.
*/
public com.google.protobuf.ByteString
getServiceBytes() {
java.lang.Object ref = service_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
service_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string service = 1;
* @param value The service to set.
* @return This builder for chaining.
*/
public Builder setService(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
service_ = value;
onChanged();
return this;
}
/**
* string service = 1;
* @return This builder for chaining.
*/
public Builder clearService() {
service_ = getDefaultInstance().getService();
onChanged();
return this;
}
/**
* string service = 1;
* @param value The bytes for service to set.
* @return This builder for chaining.
*/
public Builder setServiceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
service_ = value;
onChanged();
return this;
}
private java.lang.Object namespace_ = "";
/**
* string namespace = 2;
* @return The namespace.
*/
public java.lang.String getNamespace() {
java.lang.Object ref = namespace_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
namespace_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string namespace = 2;
* @return The bytes for namespace.
*/
public com.google.protobuf.ByteString
getNamespaceBytes() {
java.lang.Object ref = namespace_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
namespace_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string namespace = 2;
* @param value The namespace to set.
* @return This builder for chaining.
*/
public Builder setNamespace(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
namespace_ = value;
onChanged();
return this;
}
/**
* string namespace = 2;
* @return This builder for chaining.
*/
public Builder clearNamespace() {
namespace_ = getDefaultInstance().getNamespace();
onChanged();
return this;
}
/**
* string namespace = 2;
* @param value The bytes for namespace to set.
* @return This builder for chaining.
*/
public Builder setNamespaceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
namespace_ = value;
onChanged();
return this;
}
private com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString method_;
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString, com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.Builder, com.tencent.polaris.specification.api.v1.model.ModelProto.MatchStringOrBuilder> methodBuilder_;
/**
* .v1.MatchString method = 3;
* @return Whether the method field is set.
*/
public boolean hasMethod() {
return methodBuilder_ != null || method_ != null;
}
/**
* .v1.MatchString method = 3;
* @return The method.
*/
public com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString getMethod() {
if (methodBuilder_ == null) {
return method_ == null ? com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.getDefaultInstance() : method_;
} else {
return methodBuilder_.getMessage();
}
}
/**
* .v1.MatchString method = 3;
*/
public Builder setMethod(com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString value) {
if (methodBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
method_ = value;
onChanged();
} else {
methodBuilder_.setMessage(value);
}
return this;
}
/**
* .v1.MatchString method = 3;
*/
public Builder setMethod(
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.Builder builderForValue) {
if (methodBuilder_ == null) {
method_ = builderForValue.build();
onChanged();
} else {
methodBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .v1.MatchString method = 3;
*/
public Builder mergeMethod(com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString value) {
if (methodBuilder_ == null) {
if (method_ != null) {
method_ =
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.newBuilder(method_).mergeFrom(value).buildPartial();
} else {
method_ = value;
}
onChanged();
} else {
methodBuilder_.mergeFrom(value);
}
return this;
}
/**
* .v1.MatchString method = 3;
*/
public Builder clearMethod() {
if (methodBuilder_ == null) {
method_ = null;
onChanged();
} else {
method_ = null;
methodBuilder_ = null;
}
return this;
}
/**
* .v1.MatchString method = 3;
*/
public com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.Builder getMethodBuilder() {
onChanged();
return getMethodFieldBuilder().getBuilder();
}
/**
* .v1.MatchString method = 3;
*/
public com.tencent.polaris.specification.api.v1.model.ModelProto.MatchStringOrBuilder getMethodOrBuilder() {
if (methodBuilder_ != null) {
return methodBuilder_.getMessageOrBuilder();
} else {
return method_ == null ?
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.getDefaultInstance() : method_;
}
}
/**
* .v1.MatchString method = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString, com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.Builder, com.tencent.polaris.specification.api.v1.model.ModelProto.MatchStringOrBuilder>
getMethodFieldBuilder() {
if (methodBuilder_ == null) {
methodBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString, com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.Builder, com.tencent.polaris.specification.api.v1.model.ModelProto.MatchStringOrBuilder>(
getMethod(),
getParentForChildren(),
isClean());
method_ = null;
}
return methodBuilder_;
}
@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:v1.RuleMatcher.DestinationService)
}
// @@protoc_insertion_point(class_scope:v1.RuleMatcher.DestinationService)
private static final com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService();
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DestinationService 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int SOURCE_FIELD_NUMBER = 1;
private com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService source_;
/**
* .v1.RuleMatcher.SourceService source = 1;
* @return Whether the source field is set.
*/
@java.lang.Override
public boolean hasSource() {
return source_ != null;
}
/**
* .v1.RuleMatcher.SourceService source = 1;
* @return The source.
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService getSource() {
return source_ == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService.getDefaultInstance() : source_;
}
/**
* .v1.RuleMatcher.SourceService source = 1;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceServiceOrBuilder getSourceOrBuilder() {
return getSource();
}
public static final int DESTINATION_FIELD_NUMBER = 2;
private com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService destination_;
/**
* .v1.RuleMatcher.DestinationService destination = 2;
* @return Whether the destination field is set.
*/
@java.lang.Override
public boolean hasDestination() {
return destination_ != null;
}
/**
* .v1.RuleMatcher.DestinationService destination = 2;
* @return The destination.
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService getDestination() {
return destination_ == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService.getDefaultInstance() : destination_;
}
/**
* .v1.RuleMatcher.DestinationService destination = 2;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationServiceOrBuilder getDestinationOrBuilder() {
return getDestination();
}
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 (source_ != null) {
output.writeMessage(1, getSource());
}
if (destination_ != null) {
output.writeMessage(2, getDestination());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (source_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getSource());
}
if (destination_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getDestination());
}
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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher)) {
return super.equals(obj);
}
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher other = (com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher) obj;
if (hasSource() != other.hasSource()) return false;
if (hasSource()) {
if (!getSource()
.equals(other.getSource())) return false;
}
if (hasDestination() != other.hasDestination()) return false;
if (hasDestination()) {
if (!getDestination()
.equals(other.getDestination())) 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 (hasSource()) {
hash = (37 * hash) + SOURCE_FIELD_NUMBER;
hash = (53 * hash) + getSource().hashCode();
}
if (hasDestination()) {
hash = (37 * hash) + DESTINATION_FIELD_NUMBER;
hash = (53 * hash) + getDestination().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher 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(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher 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 v1.RuleMatcher}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:v1.RuleMatcher)
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcherOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RuleMatcher_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RuleMatcher_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.Builder.class);
}
// Construct using com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
if (sourceBuilder_ == null) {
source_ = null;
} else {
source_ = null;
sourceBuilder_ = null;
}
if (destinationBuilder_ == null) {
destination_ = null;
} else {
destination_ = null;
destinationBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RuleMatcher_descriptor;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher getDefaultInstanceForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.getDefaultInstance();
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher build() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher buildPartial() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher result = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher(this);
if (sourceBuilder_ == null) {
result.source_ = source_;
} else {
result.source_ = sourceBuilder_.build();
}
if (destinationBuilder_ == null) {
result.destination_ = destination_;
} else {
result.destination_ = destinationBuilder_.build();
}
onBuilt();
return result;
}
@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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher) {
return mergeFrom((com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher other) {
if (other == com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.getDefaultInstance()) return this;
if (other.hasSource()) {
mergeSource(other.getSource());
}
if (other.hasDestination()) {
mergeDestination(other.getDestination());
}
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(
getSourceFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 10
case 18: {
input.readMessage(
getDestinationFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService source_;
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceServiceOrBuilder> sourceBuilder_;
/**
* .v1.RuleMatcher.SourceService source = 1;
* @return Whether the source field is set.
*/
public boolean hasSource() {
return sourceBuilder_ != null || source_ != null;
}
/**
* .v1.RuleMatcher.SourceService source = 1;
* @return The source.
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService getSource() {
if (sourceBuilder_ == null) {
return source_ == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService.getDefaultInstance() : source_;
} else {
return sourceBuilder_.getMessage();
}
}
/**
* .v1.RuleMatcher.SourceService source = 1;
*/
public Builder setSource(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService value) {
if (sourceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
source_ = value;
onChanged();
} else {
sourceBuilder_.setMessage(value);
}
return this;
}
/**
* .v1.RuleMatcher.SourceService source = 1;
*/
public Builder setSource(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService.Builder builderForValue) {
if (sourceBuilder_ == null) {
source_ = builderForValue.build();
onChanged();
} else {
sourceBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .v1.RuleMatcher.SourceService source = 1;
*/
public Builder mergeSource(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService value) {
if (sourceBuilder_ == null) {
if (source_ != null) {
source_ =
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService.newBuilder(source_).mergeFrom(value).buildPartial();
} else {
source_ = value;
}
onChanged();
} else {
sourceBuilder_.mergeFrom(value);
}
return this;
}
/**
* .v1.RuleMatcher.SourceService source = 1;
*/
public Builder clearSource() {
if (sourceBuilder_ == null) {
source_ = null;
onChanged();
} else {
source_ = null;
sourceBuilder_ = null;
}
return this;
}
/**
* .v1.RuleMatcher.SourceService source = 1;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService.Builder getSourceBuilder() {
onChanged();
return getSourceFieldBuilder().getBuilder();
}
/**
* .v1.RuleMatcher.SourceService source = 1;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceServiceOrBuilder getSourceOrBuilder() {
if (sourceBuilder_ != null) {
return sourceBuilder_.getMessageOrBuilder();
} else {
return source_ == null ?
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService.getDefaultInstance() : source_;
}
}
/**
* .v1.RuleMatcher.SourceService source = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceServiceOrBuilder>
getSourceFieldBuilder() {
if (sourceBuilder_ == null) {
sourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceService.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.SourceServiceOrBuilder>(
getSource(),
getParentForChildren(),
isClean());
source_ = null;
}
return sourceBuilder_;
}
private com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService destination_;
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationServiceOrBuilder> destinationBuilder_;
/**
* .v1.RuleMatcher.DestinationService destination = 2;
* @return Whether the destination field is set.
*/
public boolean hasDestination() {
return destinationBuilder_ != null || destination_ != null;
}
/**
* .v1.RuleMatcher.DestinationService destination = 2;
* @return The destination.
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService getDestination() {
if (destinationBuilder_ == null) {
return destination_ == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService.getDefaultInstance() : destination_;
} else {
return destinationBuilder_.getMessage();
}
}
/**
* .v1.RuleMatcher.DestinationService destination = 2;
*/
public Builder setDestination(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService value) {
if (destinationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
destination_ = value;
onChanged();
} else {
destinationBuilder_.setMessage(value);
}
return this;
}
/**
* .v1.RuleMatcher.DestinationService destination = 2;
*/
public Builder setDestination(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService.Builder builderForValue) {
if (destinationBuilder_ == null) {
destination_ = builderForValue.build();
onChanged();
} else {
destinationBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .v1.RuleMatcher.DestinationService destination = 2;
*/
public Builder mergeDestination(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService value) {
if (destinationBuilder_ == null) {
if (destination_ != null) {
destination_ =
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService.newBuilder(destination_).mergeFrom(value).buildPartial();
} else {
destination_ = value;
}
onChanged();
} else {
destinationBuilder_.mergeFrom(value);
}
return this;
}
/**
* .v1.RuleMatcher.DestinationService destination = 2;
*/
public Builder clearDestination() {
if (destinationBuilder_ == null) {
destination_ = null;
onChanged();
} else {
destination_ = null;
destinationBuilder_ = null;
}
return this;
}
/**
* .v1.RuleMatcher.DestinationService destination = 2;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService.Builder getDestinationBuilder() {
onChanged();
return getDestinationFieldBuilder().getBuilder();
}
/**
* .v1.RuleMatcher.DestinationService destination = 2;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationServiceOrBuilder getDestinationOrBuilder() {
if (destinationBuilder_ != null) {
return destinationBuilder_.getMessageOrBuilder();
} else {
return destination_ == null ?
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService.getDefaultInstance() : destination_;
}
}
/**
* .v1.RuleMatcher.DestinationService destination = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationServiceOrBuilder>
getDestinationFieldBuilder() {
if (destinationBuilder_ == null) {
destinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationService.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.DestinationServiceOrBuilder>(
getDestination(),
getParentForChildren(),
isClean());
destination_ = null;
}
return destinationBuilder_;
}
@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:v1.RuleMatcher)
}
// @@protoc_insertion_point(class_scope:v1.RuleMatcher)
private static final com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher();
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RuleMatcher 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CircuitBreakerRuleOrBuilder extends
// @@protoc_insertion_point(interface_extends:v1.CircuitBreakerRule)
com.google.protobuf.MessageOrBuilder {
/**
* string id = 1;
* @return The id.
*/
java.lang.String getId();
/**
* string id = 1;
* @return The bytes for id.
*/
com.google.protobuf.ByteString
getIdBytes();
/**
*
* rule name
*
*
* string name = 2;
* @return The name.
*/
java.lang.String getName();
/**
*
* rule name
*
*
* string name = 2;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* namespace of rule
*
*
* string namespace = 3;
* @return The namespace.
*/
java.lang.String getNamespace();
/**
*
* namespace of rule
*
*
* string namespace = 3;
* @return The bytes for namespace.
*/
com.google.protobuf.ByteString
getNamespaceBytes();
/**
*
* enable this router
*
*
* bool enable = 4;
* @return The enable.
*/
boolean getEnable();
/**
*
* revision routing version
*
*
* string revision = 5;
* @return The revision.
*/
java.lang.String getRevision();
/**
*
* revision routing version
*
*
* string revision = 5;
* @return The bytes for revision.
*/
com.google.protobuf.ByteString
getRevisionBytes();
/**
*
* ctime create time of the rules
*
*
* string ctime = 6;
* @return The ctime.
*/
java.lang.String getCtime();
/**
*
* ctime create time of the rules
*
*
* string ctime = 6;
* @return The bytes for ctime.
*/
com.google.protobuf.ByteString
getCtimeBytes();
/**
*
* mtime modify time of the rules
*
*
* string mtime = 7;
* @return The mtime.
*/
java.lang.String getMtime();
/**
*
* mtime modify time of the rules
*
*
* string mtime = 7;
* @return The bytes for mtime.
*/
com.google.protobuf.ByteString
getMtimeBytes();
/**
*
* etime enable time of the rules
*
*
* string etime = 8;
* @return The etime.
*/
java.lang.String getEtime();
/**
*
* etime enable time of the rules
*
*
* string etime = 8;
* @return The bytes for etime.
*/
com.google.protobuf.ByteString
getEtimeBytes();
/**
*
* description simple description rules
*
*
* string description = 9;
* @return The description.
*/
java.lang.String getDescription();
/**
*
* description simple description rules
*
*
* string description = 9;
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
*
* the circuitbreaking level
*
*
* .v1.Level level = 21;
* @return The enum numeric value on the wire for level.
*/
int getLevelValue();
/**
*
* the circuitbreaking level
*
*
* .v1.Level level = 21;
* @return The level.
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.Level getLevel();
/**
*
* match condition for this rule
*
*
* .v1.RuleMatcher rule_matcher = 22;
* @return Whether the ruleMatcher field is set.
*/
boolean hasRuleMatcher();
/**
*
* match condition for this rule
*
*
* .v1.RuleMatcher rule_matcher = 22;
* @return The ruleMatcher.
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher getRuleMatcher();
/**
*
* match condition for this rule
*
*
* .v1.RuleMatcher rule_matcher = 22;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcherOrBuilder getRuleMatcherOrBuilder();
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
java.util.List
getErrorConditionsList();
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition getErrorConditions(int index);
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
int getErrorConditionsCount();
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorConditionOrBuilder>
getErrorConditionsOrBuilderList();
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorConditionOrBuilder getErrorConditionsOrBuilder(
int index);
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
java.util.List
getTriggerConditionList();
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition getTriggerCondition(int index);
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
int getTriggerConditionCount();
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerConditionOrBuilder>
getTriggerConditionOrBuilderList();
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerConditionOrBuilder getTriggerConditionOrBuilder(
int index);
/**
*
* the maximum % of an upstream cluster that can be ejected
*
*
* uint32 max_ejection_percent = 25;
* @return The maxEjectionPercent.
*/
int getMaxEjectionPercent();
/**
*
* recover condition to make resource open to close
*
*
* .v1.RecoverCondition recoverCondition = 26;
* @return Whether the recoverCondition field is set.
*/
boolean hasRecoverCondition();
/**
*
* recover condition to make resource open to close
*
*
* .v1.RecoverCondition recoverCondition = 26;
* @return The recoverCondition.
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition getRecoverCondition();
/**
*
* recover condition to make resource open to close
*
*
* .v1.RecoverCondition recoverCondition = 26;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConditionOrBuilder getRecoverConditionOrBuilder();
/**
*
* fault detection enable config
*
*
* .v1.FaultDetectConfig faultDetectConfig = 27;
* @return Whether the faultDetectConfig field is set.
*/
boolean hasFaultDetectConfig();
/**
*
* fault detection enable config
*
*
* .v1.FaultDetectConfig faultDetectConfig = 27;
* @return The faultDetectConfig.
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig getFaultDetectConfig();
/**
*
* fault detection enable config
*
*
* .v1.FaultDetectConfig faultDetectConfig = 27;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfigOrBuilder getFaultDetectConfigOrBuilder();
/**
*
* fall back configuration
*
*
* .v1.FallbackConfig fallbackConfig = 28;
* @return Whether the fallbackConfig field is set.
*/
boolean hasFallbackConfig();
/**
*
* fall back configuration
*
*
* .v1.FallbackConfig fallbackConfig = 28;
* @return The fallbackConfig.
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig getFallbackConfig();
/**
*
* fall back configuration
*
*
* .v1.FallbackConfig fallbackConfig = 28;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfigOrBuilder getFallbackConfigOrBuilder();
}
/**
*
* new specific rule for circuitbreaker config
*
*
* Protobuf type {@code v1.CircuitBreakerRule}
*/
public static final class CircuitBreakerRule extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:v1.CircuitBreakerRule)
CircuitBreakerRuleOrBuilder {
private static final long serialVersionUID = 0L;
// Use CircuitBreakerRule.newBuilder() to construct.
private CircuitBreakerRule(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CircuitBreakerRule() {
id_ = "";
name_ = "";
namespace_ = "";
revision_ = "";
ctime_ = "";
mtime_ = "";
etime_ = "";
description_ = "";
level_ = 0;
errorConditions_ = java.util.Collections.emptyList();
triggerCondition_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CircuitBreakerRule();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CircuitBreakerRule_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CircuitBreakerRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
* string id = 1;
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
}
}
/**
* string id = 1;
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NAME_FIELD_NUMBER = 2;
private volatile java.lang.Object name_;
/**
*
* rule name
*
*
* string name = 2;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
* rule name
*
*
* string name = 2;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NAMESPACE_FIELD_NUMBER = 3;
private volatile java.lang.Object namespace_;
/**
*
* namespace of rule
*
*
* string namespace = 3;
* @return The namespace.
*/
@java.lang.Override
public java.lang.String getNamespace() {
java.lang.Object ref = namespace_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
namespace_ = s;
return s;
}
}
/**
*
* namespace of rule
*
*
* string namespace = 3;
* @return The bytes for namespace.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNamespaceBytes() {
java.lang.Object ref = namespace_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
namespace_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ENABLE_FIELD_NUMBER = 4;
private boolean enable_;
/**
*
* enable this router
*
*
* bool enable = 4;
* @return The enable.
*/
@java.lang.Override
public boolean getEnable() {
return enable_;
}
public static final int REVISION_FIELD_NUMBER = 5;
private volatile java.lang.Object revision_;
/**
*
* revision routing version
*
*
* string revision = 5;
* @return The revision.
*/
@java.lang.Override
public java.lang.String getRevision() {
java.lang.Object ref = revision_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
revision_ = s;
return s;
}
}
/**
*
* revision routing version
*
*
* string revision = 5;
* @return The bytes for revision.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getRevisionBytes() {
java.lang.Object ref = revision_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
revision_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CTIME_FIELD_NUMBER = 6;
private volatile java.lang.Object ctime_;
/**
*
* ctime create time of the rules
*
*
* string ctime = 6;
* @return The ctime.
*/
@java.lang.Override
public java.lang.String getCtime() {
java.lang.Object ref = ctime_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
ctime_ = s;
return s;
}
}
/**
*
* ctime create time of the rules
*
*
* string ctime = 6;
* @return The bytes for ctime.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getCtimeBytes() {
java.lang.Object ref = ctime_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
ctime_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MTIME_FIELD_NUMBER = 7;
private volatile java.lang.Object mtime_;
/**
*
* mtime modify time of the rules
*
*
* string mtime = 7;
* @return The mtime.
*/
@java.lang.Override
public java.lang.String getMtime() {
java.lang.Object ref = mtime_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
mtime_ = s;
return s;
}
}
/**
*
* mtime modify time of the rules
*
*
* string mtime = 7;
* @return The bytes for mtime.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getMtimeBytes() {
java.lang.Object ref = mtime_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mtime_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ETIME_FIELD_NUMBER = 8;
private volatile java.lang.Object etime_;
/**
*
* etime enable time of the rules
*
*
* string etime = 8;
* @return The etime.
*/
@java.lang.Override
public java.lang.String getEtime() {
java.lang.Object ref = etime_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
etime_ = s;
return s;
}
}
/**
*
* etime enable time of the rules
*
*
* string etime = 8;
* @return The bytes for etime.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getEtimeBytes() {
java.lang.Object ref = etime_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
etime_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DESCRIPTION_FIELD_NUMBER = 9;
private volatile java.lang.Object description_;
/**
*
* description simple description rules
*
*
* string description = 9;
* @return The description.
*/
@java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
}
}
/**
*
* description simple description rules
*
*
* string description = 9;
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LEVEL_FIELD_NUMBER = 21;
private int level_;
/**
*
* the circuitbreaking level
*
*
* .v1.Level level = 21;
* @return The enum numeric value on the wire for level.
*/
@java.lang.Override public int getLevelValue() {
return level_;
}
/**
*
* the circuitbreaking level
*
*
* .v1.Level level = 21;
* @return The level.
*/
@java.lang.Override public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.Level getLevel() {
@SuppressWarnings("deprecation")
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.Level result = com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.Level.valueOf(level_);
return result == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.Level.UNRECOGNIZED : result;
}
public static final int RULE_MATCHER_FIELD_NUMBER = 22;
private com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher ruleMatcher_;
/**
*
* match condition for this rule
*
*
* .v1.RuleMatcher rule_matcher = 22;
* @return Whether the ruleMatcher field is set.
*/
@java.lang.Override
public boolean hasRuleMatcher() {
return ruleMatcher_ != null;
}
/**
*
* match condition for this rule
*
*
* .v1.RuleMatcher rule_matcher = 22;
* @return The ruleMatcher.
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher getRuleMatcher() {
return ruleMatcher_ == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.getDefaultInstance() : ruleMatcher_;
}
/**
*
* match condition for this rule
*
*
* .v1.RuleMatcher rule_matcher = 22;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcherOrBuilder getRuleMatcherOrBuilder() {
return getRuleMatcher();
}
public static final int ERROR_CONDITIONS_FIELD_NUMBER = 23;
private java.util.List errorConditions_;
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
@java.lang.Override
public java.util.List getErrorConditionsList() {
return errorConditions_;
}
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
@java.lang.Override
public java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorConditionOrBuilder>
getErrorConditionsOrBuilderList() {
return errorConditions_;
}
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
@java.lang.Override
public int getErrorConditionsCount() {
return errorConditions_.size();
}
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition getErrorConditions(int index) {
return errorConditions_.get(index);
}
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorConditionOrBuilder getErrorConditionsOrBuilder(
int index) {
return errorConditions_.get(index);
}
public static final int TRIGGER_CONDITION_FIELD_NUMBER = 24;
private java.util.List triggerCondition_;
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
@java.lang.Override
public java.util.List getTriggerConditionList() {
return triggerCondition_;
}
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
@java.lang.Override
public java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerConditionOrBuilder>
getTriggerConditionOrBuilderList() {
return triggerCondition_;
}
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
@java.lang.Override
public int getTriggerConditionCount() {
return triggerCondition_.size();
}
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition getTriggerCondition(int index) {
return triggerCondition_.get(index);
}
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerConditionOrBuilder getTriggerConditionOrBuilder(
int index) {
return triggerCondition_.get(index);
}
public static final int MAX_EJECTION_PERCENT_FIELD_NUMBER = 25;
private int maxEjectionPercent_;
/**
*
* the maximum % of an upstream cluster that can be ejected
*
*
* uint32 max_ejection_percent = 25;
* @return The maxEjectionPercent.
*/
@java.lang.Override
public int getMaxEjectionPercent() {
return maxEjectionPercent_;
}
public static final int RECOVERCONDITION_FIELD_NUMBER = 26;
private com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition recoverCondition_;
/**
*
* recover condition to make resource open to close
*
*
* .v1.RecoverCondition recoverCondition = 26;
* @return Whether the recoverCondition field is set.
*/
@java.lang.Override
public boolean hasRecoverCondition() {
return recoverCondition_ != null;
}
/**
*
* recover condition to make resource open to close
*
*
* .v1.RecoverCondition recoverCondition = 26;
* @return The recoverCondition.
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition getRecoverCondition() {
return recoverCondition_ == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition.getDefaultInstance() : recoverCondition_;
}
/**
*
* recover condition to make resource open to close
*
*
* .v1.RecoverCondition recoverCondition = 26;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConditionOrBuilder getRecoverConditionOrBuilder() {
return getRecoverCondition();
}
public static final int FAULTDETECTCONFIG_FIELD_NUMBER = 27;
private com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig faultDetectConfig_;
/**
*
* fault detection enable config
*
*
* .v1.FaultDetectConfig faultDetectConfig = 27;
* @return Whether the faultDetectConfig field is set.
*/
@java.lang.Override
public boolean hasFaultDetectConfig() {
return faultDetectConfig_ != null;
}
/**
*
* fault detection enable config
*
*
* .v1.FaultDetectConfig faultDetectConfig = 27;
* @return The faultDetectConfig.
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig getFaultDetectConfig() {
return faultDetectConfig_ == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig.getDefaultInstance() : faultDetectConfig_;
}
/**
*
* fault detection enable config
*
*
* .v1.FaultDetectConfig faultDetectConfig = 27;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfigOrBuilder getFaultDetectConfigOrBuilder() {
return getFaultDetectConfig();
}
public static final int FALLBACKCONFIG_FIELD_NUMBER = 28;
private com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig fallbackConfig_;
/**
*
* fall back configuration
*
*
* .v1.FallbackConfig fallbackConfig = 28;
* @return Whether the fallbackConfig field is set.
*/
@java.lang.Override
public boolean hasFallbackConfig() {
return fallbackConfig_ != null;
}
/**
*
* fall back configuration
*
*
* .v1.FallbackConfig fallbackConfig = 28;
* @return The fallbackConfig.
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig getFallbackConfig() {
return fallbackConfig_ == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig.getDefaultInstance() : fallbackConfig_;
}
/**
*
* fall back configuration
*
*
* .v1.FallbackConfig fallbackConfig = 28;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfigOrBuilder getFallbackConfigOrBuilder() {
return getFallbackConfig();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, namespace_);
}
if (enable_ != false) {
output.writeBool(4, enable_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revision_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, revision_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ctime_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, ctime_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mtime_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, mtime_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etime_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, etime_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, description_);
}
if (level_ != com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.Level.UNKNOWN.getNumber()) {
output.writeEnum(21, level_);
}
if (ruleMatcher_ != null) {
output.writeMessage(22, getRuleMatcher());
}
for (int i = 0; i < errorConditions_.size(); i++) {
output.writeMessage(23, errorConditions_.get(i));
}
for (int i = 0; i < triggerCondition_.size(); i++) {
output.writeMessage(24, triggerCondition_.get(i));
}
if (maxEjectionPercent_ != 0) {
output.writeUInt32(25, maxEjectionPercent_);
}
if (recoverCondition_ != null) {
output.writeMessage(26, getRecoverCondition());
}
if (faultDetectConfig_ != null) {
output.writeMessage(27, getFaultDetectConfig());
}
if (fallbackConfig_ != null) {
output.writeMessage(28, getFallbackConfig());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, namespace_);
}
if (enable_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(4, enable_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revision_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, revision_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ctime_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, ctime_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mtime_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, mtime_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etime_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, etime_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, description_);
}
if (level_ != com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.Level.UNKNOWN.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(21, level_);
}
if (ruleMatcher_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(22, getRuleMatcher());
}
for (int i = 0; i < errorConditions_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(23, errorConditions_.get(i));
}
for (int i = 0; i < triggerCondition_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(24, triggerCondition_.get(i));
}
if (maxEjectionPercent_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(25, maxEjectionPercent_);
}
if (recoverCondition_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(26, getRecoverCondition());
}
if (faultDetectConfig_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(27, getFaultDetectConfig());
}
if (fallbackConfig_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(28, getFallbackConfig());
}
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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule)) {
return super.equals(obj);
}
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule other = (com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule) obj;
if (!getId()
.equals(other.getId())) return false;
if (!getName()
.equals(other.getName())) return false;
if (!getNamespace()
.equals(other.getNamespace())) return false;
if (getEnable()
!= other.getEnable()) return false;
if (!getRevision()
.equals(other.getRevision())) return false;
if (!getCtime()
.equals(other.getCtime())) return false;
if (!getMtime()
.equals(other.getMtime())) return false;
if (!getEtime()
.equals(other.getEtime())) return false;
if (!getDescription()
.equals(other.getDescription())) return false;
if (level_ != other.level_) return false;
if (hasRuleMatcher() != other.hasRuleMatcher()) return false;
if (hasRuleMatcher()) {
if (!getRuleMatcher()
.equals(other.getRuleMatcher())) return false;
}
if (!getErrorConditionsList()
.equals(other.getErrorConditionsList())) return false;
if (!getTriggerConditionList()
.equals(other.getTriggerConditionList())) return false;
if (getMaxEjectionPercent()
!= other.getMaxEjectionPercent()) return false;
if (hasRecoverCondition() != other.hasRecoverCondition()) return false;
if (hasRecoverCondition()) {
if (!getRecoverCondition()
.equals(other.getRecoverCondition())) return false;
}
if (hasFaultDetectConfig() != other.hasFaultDetectConfig()) return false;
if (hasFaultDetectConfig()) {
if (!getFaultDetectConfig()
.equals(other.getFaultDetectConfig())) return false;
}
if (hasFallbackConfig() != other.hasFallbackConfig()) return false;
if (hasFallbackConfig()) {
if (!getFallbackConfig()
.equals(other.getFallbackConfig())) 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) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + NAMESPACE_FIELD_NUMBER;
hash = (53 * hash) + getNamespace().hashCode();
hash = (37 * hash) + ENABLE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getEnable());
hash = (37 * hash) + REVISION_FIELD_NUMBER;
hash = (53 * hash) + getRevision().hashCode();
hash = (37 * hash) + CTIME_FIELD_NUMBER;
hash = (53 * hash) + getCtime().hashCode();
hash = (37 * hash) + MTIME_FIELD_NUMBER;
hash = (53 * hash) + getMtime().hashCode();
hash = (37 * hash) + ETIME_FIELD_NUMBER;
hash = (53 * hash) + getEtime().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
hash = (37 * hash) + LEVEL_FIELD_NUMBER;
hash = (53 * hash) + level_;
if (hasRuleMatcher()) {
hash = (37 * hash) + RULE_MATCHER_FIELD_NUMBER;
hash = (53 * hash) + getRuleMatcher().hashCode();
}
if (getErrorConditionsCount() > 0) {
hash = (37 * hash) + ERROR_CONDITIONS_FIELD_NUMBER;
hash = (53 * hash) + getErrorConditionsList().hashCode();
}
if (getTriggerConditionCount() > 0) {
hash = (37 * hash) + TRIGGER_CONDITION_FIELD_NUMBER;
hash = (53 * hash) + getTriggerConditionList().hashCode();
}
hash = (37 * hash) + MAX_EJECTION_PERCENT_FIELD_NUMBER;
hash = (53 * hash) + getMaxEjectionPercent();
if (hasRecoverCondition()) {
hash = (37 * hash) + RECOVERCONDITION_FIELD_NUMBER;
hash = (53 * hash) + getRecoverCondition().hashCode();
}
if (hasFaultDetectConfig()) {
hash = (37 * hash) + FAULTDETECTCONFIG_FIELD_NUMBER;
hash = (53 * hash) + getFaultDetectConfig().hashCode();
}
if (hasFallbackConfig()) {
hash = (37 * hash) + FALLBACKCONFIG_FIELD_NUMBER;
hash = (53 * hash) + getFallbackConfig().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule 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(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule 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;
}
/**
*
* new specific rule for circuitbreaker config
*
*
* Protobuf type {@code v1.CircuitBreakerRule}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:v1.CircuitBreakerRule)
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRuleOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CircuitBreakerRule_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CircuitBreakerRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule.Builder.class);
}
// Construct using com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
id_ = "";
name_ = "";
namespace_ = "";
enable_ = false;
revision_ = "";
ctime_ = "";
mtime_ = "";
etime_ = "";
description_ = "";
level_ = 0;
if (ruleMatcherBuilder_ == null) {
ruleMatcher_ = null;
} else {
ruleMatcher_ = null;
ruleMatcherBuilder_ = null;
}
if (errorConditionsBuilder_ == null) {
errorConditions_ = java.util.Collections.emptyList();
} else {
errorConditions_ = null;
errorConditionsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
if (triggerConditionBuilder_ == null) {
triggerCondition_ = java.util.Collections.emptyList();
} else {
triggerCondition_ = null;
triggerConditionBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
maxEjectionPercent_ = 0;
if (recoverConditionBuilder_ == null) {
recoverCondition_ = null;
} else {
recoverCondition_ = null;
recoverConditionBuilder_ = null;
}
if (faultDetectConfigBuilder_ == null) {
faultDetectConfig_ = null;
} else {
faultDetectConfig_ = null;
faultDetectConfigBuilder_ = null;
}
if (fallbackConfigBuilder_ == null) {
fallbackConfig_ = null;
} else {
fallbackConfig_ = null;
fallbackConfigBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_CircuitBreakerRule_descriptor;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule getDefaultInstanceForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule.getDefaultInstance();
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule build() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule buildPartial() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule result = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule(this);
int from_bitField0_ = bitField0_;
result.id_ = id_;
result.name_ = name_;
result.namespace_ = namespace_;
result.enable_ = enable_;
result.revision_ = revision_;
result.ctime_ = ctime_;
result.mtime_ = mtime_;
result.etime_ = etime_;
result.description_ = description_;
result.level_ = level_;
if (ruleMatcherBuilder_ == null) {
result.ruleMatcher_ = ruleMatcher_;
} else {
result.ruleMatcher_ = ruleMatcherBuilder_.build();
}
if (errorConditionsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
errorConditions_ = java.util.Collections.unmodifiableList(errorConditions_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.errorConditions_ = errorConditions_;
} else {
result.errorConditions_ = errorConditionsBuilder_.build();
}
if (triggerConditionBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
triggerCondition_ = java.util.Collections.unmodifiableList(triggerCondition_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.triggerCondition_ = triggerCondition_;
} else {
result.triggerCondition_ = triggerConditionBuilder_.build();
}
result.maxEjectionPercent_ = maxEjectionPercent_;
if (recoverConditionBuilder_ == null) {
result.recoverCondition_ = recoverCondition_;
} else {
result.recoverCondition_ = recoverConditionBuilder_.build();
}
if (faultDetectConfigBuilder_ == null) {
result.faultDetectConfig_ = faultDetectConfig_;
} else {
result.faultDetectConfig_ = faultDetectConfigBuilder_.build();
}
if (fallbackConfigBuilder_ == null) {
result.fallbackConfig_ = fallbackConfig_;
} else {
result.fallbackConfig_ = fallbackConfigBuilder_.build();
}
onBuilt();
return result;
}
@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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule) {
return mergeFrom((com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule other) {
if (other == com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getNamespace().isEmpty()) {
namespace_ = other.namespace_;
onChanged();
}
if (other.getEnable() != false) {
setEnable(other.getEnable());
}
if (!other.getRevision().isEmpty()) {
revision_ = other.revision_;
onChanged();
}
if (!other.getCtime().isEmpty()) {
ctime_ = other.ctime_;
onChanged();
}
if (!other.getMtime().isEmpty()) {
mtime_ = other.mtime_;
onChanged();
}
if (!other.getEtime().isEmpty()) {
etime_ = other.etime_;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
if (other.level_ != 0) {
setLevelValue(other.getLevelValue());
}
if (other.hasRuleMatcher()) {
mergeRuleMatcher(other.getRuleMatcher());
}
if (errorConditionsBuilder_ == null) {
if (!other.errorConditions_.isEmpty()) {
if (errorConditions_.isEmpty()) {
errorConditions_ = other.errorConditions_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureErrorConditionsIsMutable();
errorConditions_.addAll(other.errorConditions_);
}
onChanged();
}
} else {
if (!other.errorConditions_.isEmpty()) {
if (errorConditionsBuilder_.isEmpty()) {
errorConditionsBuilder_.dispose();
errorConditionsBuilder_ = null;
errorConditions_ = other.errorConditions_;
bitField0_ = (bitField0_ & ~0x00000001);
errorConditionsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getErrorConditionsFieldBuilder() : null;
} else {
errorConditionsBuilder_.addAllMessages(other.errorConditions_);
}
}
}
if (triggerConditionBuilder_ == null) {
if (!other.triggerCondition_.isEmpty()) {
if (triggerCondition_.isEmpty()) {
triggerCondition_ = other.triggerCondition_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureTriggerConditionIsMutable();
triggerCondition_.addAll(other.triggerCondition_);
}
onChanged();
}
} else {
if (!other.triggerCondition_.isEmpty()) {
if (triggerConditionBuilder_.isEmpty()) {
triggerConditionBuilder_.dispose();
triggerConditionBuilder_ = null;
triggerCondition_ = other.triggerCondition_;
bitField0_ = (bitField0_ & ~0x00000002);
triggerConditionBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getTriggerConditionFieldBuilder() : null;
} else {
triggerConditionBuilder_.addAllMessages(other.triggerCondition_);
}
}
}
if (other.getMaxEjectionPercent() != 0) {
setMaxEjectionPercent(other.getMaxEjectionPercent());
}
if (other.hasRecoverCondition()) {
mergeRecoverCondition(other.getRecoverCondition());
}
if (other.hasFaultDetectConfig()) {
mergeFaultDetectConfig(other.getFaultDetectConfig());
}
if (other.hasFallbackConfig()) {
mergeFallbackConfig(other.getFallbackConfig());
}
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: {
id_ = input.readStringRequireUtf8();
break;
} // case 10
case 18: {
name_ = input.readStringRequireUtf8();
break;
} // case 18
case 26: {
namespace_ = input.readStringRequireUtf8();
break;
} // case 26
case 32: {
enable_ = input.readBool();
break;
} // case 32
case 42: {
revision_ = input.readStringRequireUtf8();
break;
} // case 42
case 50: {
ctime_ = input.readStringRequireUtf8();
break;
} // case 50
case 58: {
mtime_ = input.readStringRequireUtf8();
break;
} // case 58
case 66: {
etime_ = input.readStringRequireUtf8();
break;
} // case 66
case 74: {
description_ = input.readStringRequireUtf8();
break;
} // case 74
case 168: {
level_ = input.readEnum();
break;
} // case 168
case 178: {
input.readMessage(
getRuleMatcherFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 178
case 186: {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition m =
input.readMessage(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.parser(),
extensionRegistry);
if (errorConditionsBuilder_ == null) {
ensureErrorConditionsIsMutable();
errorConditions_.add(m);
} else {
errorConditionsBuilder_.addMessage(m);
}
break;
} // case 186
case 194: {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition m =
input.readMessage(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.parser(),
extensionRegistry);
if (triggerConditionBuilder_ == null) {
ensureTriggerConditionIsMutable();
triggerCondition_.add(m);
} else {
triggerConditionBuilder_.addMessage(m);
}
break;
} // case 194
case 200: {
maxEjectionPercent_ = input.readUInt32();
break;
} // case 200
case 210: {
input.readMessage(
getRecoverConditionFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 210
case 218: {
input.readMessage(
getFaultDetectConfigFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 218
case 226: {
input.readMessage(
getFallbackConfigFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 226
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
* string id = 1;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string id = 1;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
* string id = 1;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
*
* rule name
*
*
* string name = 2;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* rule name
*
*
* string name = 2;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* rule name
*
*
* string name = 2;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* rule name
*
*
* string name = 2;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* rule name
*
*
* string name = 2;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private java.lang.Object namespace_ = "";
/**
*
* namespace of rule
*
*
* string namespace = 3;
* @return The namespace.
*/
public java.lang.String getNamespace() {
java.lang.Object ref = namespace_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
namespace_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* namespace of rule
*
*
* string namespace = 3;
* @return The bytes for namespace.
*/
public com.google.protobuf.ByteString
getNamespaceBytes() {
java.lang.Object ref = namespace_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
namespace_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* namespace of rule
*
*
* string namespace = 3;
* @param value The namespace to set.
* @return This builder for chaining.
*/
public Builder setNamespace(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
namespace_ = value;
onChanged();
return this;
}
/**
*
* namespace of rule
*
*
* string namespace = 3;
* @return This builder for chaining.
*/
public Builder clearNamespace() {
namespace_ = getDefaultInstance().getNamespace();
onChanged();
return this;
}
/**
*
* namespace of rule
*
*
* string namespace = 3;
* @param value The bytes for namespace to set.
* @return This builder for chaining.
*/
public Builder setNamespaceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
namespace_ = value;
onChanged();
return this;
}
private boolean enable_ ;
/**
*
* enable this router
*
*
* bool enable = 4;
* @return The enable.
*/
@java.lang.Override
public boolean getEnable() {
return enable_;
}
/**
*
* enable this router
*
*
* bool enable = 4;
* @param value The enable to set.
* @return This builder for chaining.
*/
public Builder setEnable(boolean value) {
enable_ = value;
onChanged();
return this;
}
/**
*
* enable this router
*
*
* bool enable = 4;
* @return This builder for chaining.
*/
public Builder clearEnable() {
enable_ = false;
onChanged();
return this;
}
private java.lang.Object revision_ = "";
/**
*
* revision routing version
*
*
* string revision = 5;
* @return The revision.
*/
public java.lang.String getRevision() {
java.lang.Object ref = revision_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
revision_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* revision routing version
*
*
* string revision = 5;
* @return The bytes for revision.
*/
public com.google.protobuf.ByteString
getRevisionBytes() {
java.lang.Object ref = revision_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
revision_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* revision routing version
*
*
* string revision = 5;
* @param value The revision to set.
* @return This builder for chaining.
*/
public Builder setRevision(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
revision_ = value;
onChanged();
return this;
}
/**
*
* revision routing version
*
*
* string revision = 5;
* @return This builder for chaining.
*/
public Builder clearRevision() {
revision_ = getDefaultInstance().getRevision();
onChanged();
return this;
}
/**
*
* revision routing version
*
*
* string revision = 5;
* @param value The bytes for revision to set.
* @return This builder for chaining.
*/
public Builder setRevisionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
revision_ = value;
onChanged();
return this;
}
private java.lang.Object ctime_ = "";
/**
*
* ctime create time of the rules
*
*
* string ctime = 6;
* @return The ctime.
*/
public java.lang.String getCtime() {
java.lang.Object ref = ctime_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
ctime_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* ctime create time of the rules
*
*
* string ctime = 6;
* @return The bytes for ctime.
*/
public com.google.protobuf.ByteString
getCtimeBytes() {
java.lang.Object ref = ctime_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
ctime_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ctime create time of the rules
*
*
* string ctime = 6;
* @param value The ctime to set.
* @return This builder for chaining.
*/
public Builder setCtime(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ctime_ = value;
onChanged();
return this;
}
/**
*
* ctime create time of the rules
*
*
* string ctime = 6;
* @return This builder for chaining.
*/
public Builder clearCtime() {
ctime_ = getDefaultInstance().getCtime();
onChanged();
return this;
}
/**
*
* ctime create time of the rules
*
*
* string ctime = 6;
* @param value The bytes for ctime to set.
* @return This builder for chaining.
*/
public Builder setCtimeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ctime_ = value;
onChanged();
return this;
}
private java.lang.Object mtime_ = "";
/**
*
* mtime modify time of the rules
*
*
* string mtime = 7;
* @return The mtime.
*/
public java.lang.String getMtime() {
java.lang.Object ref = mtime_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
mtime_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* mtime modify time of the rules
*
*
* string mtime = 7;
* @return The bytes for mtime.
*/
public com.google.protobuf.ByteString
getMtimeBytes() {
java.lang.Object ref = mtime_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mtime_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* mtime modify time of the rules
*
*
* string mtime = 7;
* @param value The mtime to set.
* @return This builder for chaining.
*/
public Builder setMtime(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
mtime_ = value;
onChanged();
return this;
}
/**
*
* mtime modify time of the rules
*
*
* string mtime = 7;
* @return This builder for chaining.
*/
public Builder clearMtime() {
mtime_ = getDefaultInstance().getMtime();
onChanged();
return this;
}
/**
*
* mtime modify time of the rules
*
*
* string mtime = 7;
* @param value The bytes for mtime to set.
* @return This builder for chaining.
*/
public Builder setMtimeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
mtime_ = value;
onChanged();
return this;
}
private java.lang.Object etime_ = "";
/**
*
* etime enable time of the rules
*
*
* string etime = 8;
* @return The etime.
*/
public java.lang.String getEtime() {
java.lang.Object ref = etime_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
etime_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* etime enable time of the rules
*
*
* string etime = 8;
* @return The bytes for etime.
*/
public com.google.protobuf.ByteString
getEtimeBytes() {
java.lang.Object ref = etime_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
etime_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* etime enable time of the rules
*
*
* string etime = 8;
* @param value The etime to set.
* @return This builder for chaining.
*/
public Builder setEtime(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
etime_ = value;
onChanged();
return this;
}
/**
*
* etime enable time of the rules
*
*
* string etime = 8;
* @return This builder for chaining.
*/
public Builder clearEtime() {
etime_ = getDefaultInstance().getEtime();
onChanged();
return this;
}
/**
*
* etime enable time of the rules
*
*
* string etime = 8;
* @param value The bytes for etime to set.
* @return This builder for chaining.
*/
public Builder setEtimeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
etime_ = value;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
* description simple description rules
*
*
* string description = 9;
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* description simple description rules
*
*
* string description = 9;
* @return The bytes for description.
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* description simple description rules
*
*
* string description = 9;
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
onChanged();
return this;
}
/**
*
* description simple description rules
*
*
* string description = 9;
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
*
* description simple description rules
*
*
* string description = 9;
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
onChanged();
return this;
}
private int level_ = 0;
/**
*
* the circuitbreaking level
*
*
* .v1.Level level = 21;
* @return The enum numeric value on the wire for level.
*/
@java.lang.Override public int getLevelValue() {
return level_;
}
/**
*
* the circuitbreaking level
*
*
* .v1.Level level = 21;
* @param value The enum numeric value on the wire for level to set.
* @return This builder for chaining.
*/
public Builder setLevelValue(int value) {
level_ = value;
onChanged();
return this;
}
/**
*
* the circuitbreaking level
*
*
* .v1.Level level = 21;
* @return The level.
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.Level getLevel() {
@SuppressWarnings("deprecation")
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.Level result = com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.Level.valueOf(level_);
return result == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.Level.UNRECOGNIZED : result;
}
/**
*
* the circuitbreaking level
*
*
* .v1.Level level = 21;
* @param value The level to set.
* @return This builder for chaining.
*/
public Builder setLevel(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.Level value) {
if (value == null) {
throw new NullPointerException();
}
level_ = value.getNumber();
onChanged();
return this;
}
/**
*
* the circuitbreaking level
*
*
* .v1.Level level = 21;
* @return This builder for chaining.
*/
public Builder clearLevel() {
level_ = 0;
onChanged();
return this;
}
private com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher ruleMatcher_;
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcherOrBuilder> ruleMatcherBuilder_;
/**
*
* match condition for this rule
*
*
* .v1.RuleMatcher rule_matcher = 22;
* @return Whether the ruleMatcher field is set.
*/
public boolean hasRuleMatcher() {
return ruleMatcherBuilder_ != null || ruleMatcher_ != null;
}
/**
*
* match condition for this rule
*
*
* .v1.RuleMatcher rule_matcher = 22;
* @return The ruleMatcher.
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher getRuleMatcher() {
if (ruleMatcherBuilder_ == null) {
return ruleMatcher_ == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.getDefaultInstance() : ruleMatcher_;
} else {
return ruleMatcherBuilder_.getMessage();
}
}
/**
*
* match condition for this rule
*
*
* .v1.RuleMatcher rule_matcher = 22;
*/
public Builder setRuleMatcher(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher value) {
if (ruleMatcherBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ruleMatcher_ = value;
onChanged();
} else {
ruleMatcherBuilder_.setMessage(value);
}
return this;
}
/**
*
* match condition for this rule
*
*
* .v1.RuleMatcher rule_matcher = 22;
*/
public Builder setRuleMatcher(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.Builder builderForValue) {
if (ruleMatcherBuilder_ == null) {
ruleMatcher_ = builderForValue.build();
onChanged();
} else {
ruleMatcherBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* match condition for this rule
*
*
* .v1.RuleMatcher rule_matcher = 22;
*/
public Builder mergeRuleMatcher(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher value) {
if (ruleMatcherBuilder_ == null) {
if (ruleMatcher_ != null) {
ruleMatcher_ =
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.newBuilder(ruleMatcher_).mergeFrom(value).buildPartial();
} else {
ruleMatcher_ = value;
}
onChanged();
} else {
ruleMatcherBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* match condition for this rule
*
*
* .v1.RuleMatcher rule_matcher = 22;
*/
public Builder clearRuleMatcher() {
if (ruleMatcherBuilder_ == null) {
ruleMatcher_ = null;
onChanged();
} else {
ruleMatcher_ = null;
ruleMatcherBuilder_ = null;
}
return this;
}
/**
*
* match condition for this rule
*
*
* .v1.RuleMatcher rule_matcher = 22;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.Builder getRuleMatcherBuilder() {
onChanged();
return getRuleMatcherFieldBuilder().getBuilder();
}
/**
*
* match condition for this rule
*
*
* .v1.RuleMatcher rule_matcher = 22;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcherOrBuilder getRuleMatcherOrBuilder() {
if (ruleMatcherBuilder_ != null) {
return ruleMatcherBuilder_.getMessageOrBuilder();
} else {
return ruleMatcher_ == null ?
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.getDefaultInstance() : ruleMatcher_;
}
}
/**
*
* match condition for this rule
*
*
* .v1.RuleMatcher rule_matcher = 22;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcherOrBuilder>
getRuleMatcherFieldBuilder() {
if (ruleMatcherBuilder_ == null) {
ruleMatcherBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcher.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RuleMatcherOrBuilder>(
getRuleMatcher(),
getParentForChildren(),
isClean());
ruleMatcher_ = null;
}
return ruleMatcherBuilder_;
}
private java.util.List errorConditions_ =
java.util.Collections.emptyList();
private void ensureErrorConditionsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
errorConditions_ = new java.util.ArrayList(errorConditions_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorConditionOrBuilder> errorConditionsBuilder_;
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
public java.util.List getErrorConditionsList() {
if (errorConditionsBuilder_ == null) {
return java.util.Collections.unmodifiableList(errorConditions_);
} else {
return errorConditionsBuilder_.getMessageList();
}
}
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
public int getErrorConditionsCount() {
if (errorConditionsBuilder_ == null) {
return errorConditions_.size();
} else {
return errorConditionsBuilder_.getCount();
}
}
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition getErrorConditions(int index) {
if (errorConditionsBuilder_ == null) {
return errorConditions_.get(index);
} else {
return errorConditionsBuilder_.getMessage(index);
}
}
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
public Builder setErrorConditions(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition value) {
if (errorConditionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureErrorConditionsIsMutable();
errorConditions_.set(index, value);
onChanged();
} else {
errorConditionsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
public Builder setErrorConditions(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.Builder builderForValue) {
if (errorConditionsBuilder_ == null) {
ensureErrorConditionsIsMutable();
errorConditions_.set(index, builderForValue.build());
onChanged();
} else {
errorConditionsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
public Builder addErrorConditions(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition value) {
if (errorConditionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureErrorConditionsIsMutable();
errorConditions_.add(value);
onChanged();
} else {
errorConditionsBuilder_.addMessage(value);
}
return this;
}
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
public Builder addErrorConditions(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition value) {
if (errorConditionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureErrorConditionsIsMutable();
errorConditions_.add(index, value);
onChanged();
} else {
errorConditionsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
public Builder addErrorConditions(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.Builder builderForValue) {
if (errorConditionsBuilder_ == null) {
ensureErrorConditionsIsMutable();
errorConditions_.add(builderForValue.build());
onChanged();
} else {
errorConditionsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
public Builder addErrorConditions(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.Builder builderForValue) {
if (errorConditionsBuilder_ == null) {
ensureErrorConditionsIsMutable();
errorConditions_.add(index, builderForValue.build());
onChanged();
} else {
errorConditionsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
public Builder addAllErrorConditions(
java.lang.Iterable extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition> values) {
if (errorConditionsBuilder_ == null) {
ensureErrorConditionsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, errorConditions_);
onChanged();
} else {
errorConditionsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
public Builder clearErrorConditions() {
if (errorConditionsBuilder_ == null) {
errorConditions_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
errorConditionsBuilder_.clear();
}
return this;
}
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
public Builder removeErrorConditions(int index) {
if (errorConditionsBuilder_ == null) {
ensureErrorConditionsIsMutable();
errorConditions_.remove(index);
onChanged();
} else {
errorConditionsBuilder_.remove(index);
}
return this;
}
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.Builder getErrorConditionsBuilder(
int index) {
return getErrorConditionsFieldBuilder().getBuilder(index);
}
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorConditionOrBuilder getErrorConditionsOrBuilder(
int index) {
if (errorConditionsBuilder_ == null) {
return errorConditions_.get(index); } else {
return errorConditionsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
public java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorConditionOrBuilder>
getErrorConditionsOrBuilderList() {
if (errorConditionsBuilder_ != null) {
return errorConditionsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(errorConditions_);
}
}
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.Builder addErrorConditionsBuilder() {
return getErrorConditionsFieldBuilder().addBuilder(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.getDefaultInstance());
}
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.Builder addErrorConditionsBuilder(
int index) {
return getErrorConditionsFieldBuilder().addBuilder(
index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.getDefaultInstance());
}
/**
*
* error conditions to judge an invocation as an error
*
*
* repeated .v1.ErrorCondition error_conditions = 23;
*/
public java.util.List
getErrorConditionsBuilderList() {
return getErrorConditionsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorConditionOrBuilder>
getErrorConditionsFieldBuilder() {
if (errorConditionsBuilder_ == null) {
errorConditionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorConditionOrBuilder>(
errorConditions_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
errorConditions_ = null;
}
return errorConditionsBuilder_;
}
private java.util.List triggerCondition_ =
java.util.Collections.emptyList();
private void ensureTriggerConditionIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
triggerCondition_ = new java.util.ArrayList(triggerCondition_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerConditionOrBuilder> triggerConditionBuilder_;
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
public java.util.List getTriggerConditionList() {
if (triggerConditionBuilder_ == null) {
return java.util.Collections.unmodifiableList(triggerCondition_);
} else {
return triggerConditionBuilder_.getMessageList();
}
}
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
public int getTriggerConditionCount() {
if (triggerConditionBuilder_ == null) {
return triggerCondition_.size();
} else {
return triggerConditionBuilder_.getCount();
}
}
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition getTriggerCondition(int index) {
if (triggerConditionBuilder_ == null) {
return triggerCondition_.get(index);
} else {
return triggerConditionBuilder_.getMessage(index);
}
}
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
public Builder setTriggerCondition(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition value) {
if (triggerConditionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTriggerConditionIsMutable();
triggerCondition_.set(index, value);
onChanged();
} else {
triggerConditionBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
public Builder setTriggerCondition(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.Builder builderForValue) {
if (triggerConditionBuilder_ == null) {
ensureTriggerConditionIsMutable();
triggerCondition_.set(index, builderForValue.build());
onChanged();
} else {
triggerConditionBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
public Builder addTriggerCondition(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition value) {
if (triggerConditionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTriggerConditionIsMutable();
triggerCondition_.add(value);
onChanged();
} else {
triggerConditionBuilder_.addMessage(value);
}
return this;
}
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
public Builder addTriggerCondition(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition value) {
if (triggerConditionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTriggerConditionIsMutable();
triggerCondition_.add(index, value);
onChanged();
} else {
triggerConditionBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
public Builder addTriggerCondition(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.Builder builderForValue) {
if (triggerConditionBuilder_ == null) {
ensureTriggerConditionIsMutable();
triggerCondition_.add(builderForValue.build());
onChanged();
} else {
triggerConditionBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
public Builder addTriggerCondition(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.Builder builderForValue) {
if (triggerConditionBuilder_ == null) {
ensureTriggerConditionIsMutable();
triggerCondition_.add(index, builderForValue.build());
onChanged();
} else {
triggerConditionBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
public Builder addAllTriggerCondition(
java.lang.Iterable extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition> values) {
if (triggerConditionBuilder_ == null) {
ensureTriggerConditionIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, triggerCondition_);
onChanged();
} else {
triggerConditionBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
public Builder clearTriggerCondition() {
if (triggerConditionBuilder_ == null) {
triggerCondition_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
triggerConditionBuilder_.clear();
}
return this;
}
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
public Builder removeTriggerCondition(int index) {
if (triggerConditionBuilder_ == null) {
ensureTriggerConditionIsMutable();
triggerCondition_.remove(index);
onChanged();
} else {
triggerConditionBuilder_.remove(index);
}
return this;
}
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.Builder getTriggerConditionBuilder(
int index) {
return getTriggerConditionFieldBuilder().getBuilder(index);
}
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerConditionOrBuilder getTriggerConditionOrBuilder(
int index) {
if (triggerConditionBuilder_ == null) {
return triggerCondition_.get(index); } else {
return triggerConditionBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
public java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerConditionOrBuilder>
getTriggerConditionOrBuilderList() {
if (triggerConditionBuilder_ != null) {
return triggerConditionBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(triggerCondition_);
}
}
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.Builder addTriggerConditionBuilder() {
return getTriggerConditionFieldBuilder().addBuilder(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.getDefaultInstance());
}
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.Builder addTriggerConditionBuilder(
int index) {
return getTriggerConditionFieldBuilder().addBuilder(
index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.getDefaultInstance());
}
/**
*
* trigger condition to trigger circuitbreaking
*
*
* repeated .v1.TriggerCondition trigger_condition = 24;
*/
public java.util.List
getTriggerConditionBuilderList() {
return getTriggerConditionFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerConditionOrBuilder>
getTriggerConditionFieldBuilder() {
if (triggerConditionBuilder_ == null) {
triggerConditionBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerConditionOrBuilder>(
triggerCondition_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
triggerCondition_ = null;
}
return triggerConditionBuilder_;
}
private int maxEjectionPercent_ ;
/**
*
* the maximum % of an upstream cluster that can be ejected
*
*
* uint32 max_ejection_percent = 25;
* @return The maxEjectionPercent.
*/
@java.lang.Override
public int getMaxEjectionPercent() {
return maxEjectionPercent_;
}
/**
*
* the maximum % of an upstream cluster that can be ejected
*
*
* uint32 max_ejection_percent = 25;
* @param value The maxEjectionPercent to set.
* @return This builder for chaining.
*/
public Builder setMaxEjectionPercent(int value) {
maxEjectionPercent_ = value;
onChanged();
return this;
}
/**
*
* the maximum % of an upstream cluster that can be ejected
*
*
* uint32 max_ejection_percent = 25;
* @return This builder for chaining.
*/
public Builder clearMaxEjectionPercent() {
maxEjectionPercent_ = 0;
onChanged();
return this;
}
private com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition recoverCondition_;
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConditionOrBuilder> recoverConditionBuilder_;
/**
*
* recover condition to make resource open to close
*
*
* .v1.RecoverCondition recoverCondition = 26;
* @return Whether the recoverCondition field is set.
*/
public boolean hasRecoverCondition() {
return recoverConditionBuilder_ != null || recoverCondition_ != null;
}
/**
*
* recover condition to make resource open to close
*
*
* .v1.RecoverCondition recoverCondition = 26;
* @return The recoverCondition.
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition getRecoverCondition() {
if (recoverConditionBuilder_ == null) {
return recoverCondition_ == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition.getDefaultInstance() : recoverCondition_;
} else {
return recoverConditionBuilder_.getMessage();
}
}
/**
*
* recover condition to make resource open to close
*
*
* .v1.RecoverCondition recoverCondition = 26;
*/
public Builder setRecoverCondition(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition value) {
if (recoverConditionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
recoverCondition_ = value;
onChanged();
} else {
recoverConditionBuilder_.setMessage(value);
}
return this;
}
/**
*
* recover condition to make resource open to close
*
*
* .v1.RecoverCondition recoverCondition = 26;
*/
public Builder setRecoverCondition(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition.Builder builderForValue) {
if (recoverConditionBuilder_ == null) {
recoverCondition_ = builderForValue.build();
onChanged();
} else {
recoverConditionBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* recover condition to make resource open to close
*
*
* .v1.RecoverCondition recoverCondition = 26;
*/
public Builder mergeRecoverCondition(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition value) {
if (recoverConditionBuilder_ == null) {
if (recoverCondition_ != null) {
recoverCondition_ =
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition.newBuilder(recoverCondition_).mergeFrom(value).buildPartial();
} else {
recoverCondition_ = value;
}
onChanged();
} else {
recoverConditionBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* recover condition to make resource open to close
*
*
* .v1.RecoverCondition recoverCondition = 26;
*/
public Builder clearRecoverCondition() {
if (recoverConditionBuilder_ == null) {
recoverCondition_ = null;
onChanged();
} else {
recoverCondition_ = null;
recoverConditionBuilder_ = null;
}
return this;
}
/**
*
* recover condition to make resource open to close
*
*
* .v1.RecoverCondition recoverCondition = 26;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition.Builder getRecoverConditionBuilder() {
onChanged();
return getRecoverConditionFieldBuilder().getBuilder();
}
/**
*
* recover condition to make resource open to close
*
*
* .v1.RecoverCondition recoverCondition = 26;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConditionOrBuilder getRecoverConditionOrBuilder() {
if (recoverConditionBuilder_ != null) {
return recoverConditionBuilder_.getMessageOrBuilder();
} else {
return recoverCondition_ == null ?
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition.getDefaultInstance() : recoverCondition_;
}
}
/**
*
* recover condition to make resource open to close
*
*
* .v1.RecoverCondition recoverCondition = 26;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConditionOrBuilder>
getRecoverConditionFieldBuilder() {
if (recoverConditionBuilder_ == null) {
recoverConditionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConditionOrBuilder>(
getRecoverCondition(),
getParentForChildren(),
isClean());
recoverCondition_ = null;
}
return recoverConditionBuilder_;
}
private com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig faultDetectConfig_;
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfigOrBuilder> faultDetectConfigBuilder_;
/**
*
* fault detection enable config
*
*
* .v1.FaultDetectConfig faultDetectConfig = 27;
* @return Whether the faultDetectConfig field is set.
*/
public boolean hasFaultDetectConfig() {
return faultDetectConfigBuilder_ != null || faultDetectConfig_ != null;
}
/**
*
* fault detection enable config
*
*
* .v1.FaultDetectConfig faultDetectConfig = 27;
* @return The faultDetectConfig.
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig getFaultDetectConfig() {
if (faultDetectConfigBuilder_ == null) {
return faultDetectConfig_ == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig.getDefaultInstance() : faultDetectConfig_;
} else {
return faultDetectConfigBuilder_.getMessage();
}
}
/**
*
* fault detection enable config
*
*
* .v1.FaultDetectConfig faultDetectConfig = 27;
*/
public Builder setFaultDetectConfig(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig value) {
if (faultDetectConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
faultDetectConfig_ = value;
onChanged();
} else {
faultDetectConfigBuilder_.setMessage(value);
}
return this;
}
/**
*
* fault detection enable config
*
*
* .v1.FaultDetectConfig faultDetectConfig = 27;
*/
public Builder setFaultDetectConfig(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig.Builder builderForValue) {
if (faultDetectConfigBuilder_ == null) {
faultDetectConfig_ = builderForValue.build();
onChanged();
} else {
faultDetectConfigBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* fault detection enable config
*
*
* .v1.FaultDetectConfig faultDetectConfig = 27;
*/
public Builder mergeFaultDetectConfig(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig value) {
if (faultDetectConfigBuilder_ == null) {
if (faultDetectConfig_ != null) {
faultDetectConfig_ =
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig.newBuilder(faultDetectConfig_).mergeFrom(value).buildPartial();
} else {
faultDetectConfig_ = value;
}
onChanged();
} else {
faultDetectConfigBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* fault detection enable config
*
*
* .v1.FaultDetectConfig faultDetectConfig = 27;
*/
public Builder clearFaultDetectConfig() {
if (faultDetectConfigBuilder_ == null) {
faultDetectConfig_ = null;
onChanged();
} else {
faultDetectConfig_ = null;
faultDetectConfigBuilder_ = null;
}
return this;
}
/**
*
* fault detection enable config
*
*
* .v1.FaultDetectConfig faultDetectConfig = 27;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig.Builder getFaultDetectConfigBuilder() {
onChanged();
return getFaultDetectConfigFieldBuilder().getBuilder();
}
/**
*
* fault detection enable config
*
*
* .v1.FaultDetectConfig faultDetectConfig = 27;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfigOrBuilder getFaultDetectConfigOrBuilder() {
if (faultDetectConfigBuilder_ != null) {
return faultDetectConfigBuilder_.getMessageOrBuilder();
} else {
return faultDetectConfig_ == null ?
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig.getDefaultInstance() : faultDetectConfig_;
}
}
/**
*
* fault detection enable config
*
*
* .v1.FaultDetectConfig faultDetectConfig = 27;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfigOrBuilder>
getFaultDetectConfigFieldBuilder() {
if (faultDetectConfigBuilder_ == null) {
faultDetectConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfigOrBuilder>(
getFaultDetectConfig(),
getParentForChildren(),
isClean());
faultDetectConfig_ = null;
}
return faultDetectConfigBuilder_;
}
private com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig fallbackConfig_;
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfigOrBuilder> fallbackConfigBuilder_;
/**
*
* fall back configuration
*
*
* .v1.FallbackConfig fallbackConfig = 28;
* @return Whether the fallbackConfig field is set.
*/
public boolean hasFallbackConfig() {
return fallbackConfigBuilder_ != null || fallbackConfig_ != null;
}
/**
*
* fall back configuration
*
*
* .v1.FallbackConfig fallbackConfig = 28;
* @return The fallbackConfig.
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig getFallbackConfig() {
if (fallbackConfigBuilder_ == null) {
return fallbackConfig_ == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig.getDefaultInstance() : fallbackConfig_;
} else {
return fallbackConfigBuilder_.getMessage();
}
}
/**
*
* fall back configuration
*
*
* .v1.FallbackConfig fallbackConfig = 28;
*/
public Builder setFallbackConfig(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig value) {
if (fallbackConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
fallbackConfig_ = value;
onChanged();
} else {
fallbackConfigBuilder_.setMessage(value);
}
return this;
}
/**
*
* fall back configuration
*
*
* .v1.FallbackConfig fallbackConfig = 28;
*/
public Builder setFallbackConfig(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig.Builder builderForValue) {
if (fallbackConfigBuilder_ == null) {
fallbackConfig_ = builderForValue.build();
onChanged();
} else {
fallbackConfigBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* fall back configuration
*
*
* .v1.FallbackConfig fallbackConfig = 28;
*/
public Builder mergeFallbackConfig(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig value) {
if (fallbackConfigBuilder_ == null) {
if (fallbackConfig_ != null) {
fallbackConfig_ =
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig.newBuilder(fallbackConfig_).mergeFrom(value).buildPartial();
} else {
fallbackConfig_ = value;
}
onChanged();
} else {
fallbackConfigBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* fall back configuration
*
*
* .v1.FallbackConfig fallbackConfig = 28;
*/
public Builder clearFallbackConfig() {
if (fallbackConfigBuilder_ == null) {
fallbackConfig_ = null;
onChanged();
} else {
fallbackConfig_ = null;
fallbackConfigBuilder_ = null;
}
return this;
}
/**
*
* fall back configuration
*
*
* .v1.FallbackConfig fallbackConfig = 28;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig.Builder getFallbackConfigBuilder() {
onChanged();
return getFallbackConfigFieldBuilder().getBuilder();
}
/**
*
* fall back configuration
*
*
* .v1.FallbackConfig fallbackConfig = 28;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfigOrBuilder getFallbackConfigOrBuilder() {
if (fallbackConfigBuilder_ != null) {
return fallbackConfigBuilder_.getMessageOrBuilder();
} else {
return fallbackConfig_ == null ?
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig.getDefaultInstance() : fallbackConfig_;
}
}
/**
*
* fall back configuration
*
*
* .v1.FallbackConfig fallbackConfig = 28;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfigOrBuilder>
getFallbackConfigFieldBuilder() {
if (fallbackConfigBuilder_ == null) {
fallbackConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfigOrBuilder>(
getFallbackConfig(),
getParentForChildren(),
isClean());
fallbackConfig_ = null;
}
return fallbackConfigBuilder_;
}
@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:v1.CircuitBreakerRule)
}
// @@protoc_insertion_point(class_scope:v1.CircuitBreakerRule)
private static final com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule();
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CircuitBreakerRule 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.CircuitBreakerRule getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ErrorConditionOrBuilder extends
// @@protoc_insertion_point(interface_extends:v1.ErrorCondition)
com.google.protobuf.MessageOrBuilder {
/**
* .v1.ErrorCondition.InputType input_type = 1;
* @return The enum numeric value on the wire for inputType.
*/
int getInputTypeValue();
/**
* .v1.ErrorCondition.InputType input_type = 1;
* @return The inputType.
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.InputType getInputType();
/**
* .v1.MatchString condition = 2;
* @return Whether the condition field is set.
*/
boolean hasCondition();
/**
* .v1.MatchString condition = 2;
* @return The condition.
*/
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString getCondition();
/**
* .v1.MatchString condition = 2;
*/
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchStringOrBuilder getConditionOrBuilder();
}
/**
*
* the condition to judge an input invocation as an error
*
*
* Protobuf type {@code v1.ErrorCondition}
*/
public static final class ErrorCondition extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:v1.ErrorCondition)
ErrorConditionOrBuilder {
private static final long serialVersionUID = 0L;
// Use ErrorCondition.newBuilder() to construct.
private ErrorCondition(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ErrorCondition() {
inputType_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ErrorCondition();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_ErrorCondition_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_ErrorCondition_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.Builder.class);
}
/**
* Protobuf enum {@code v1.ErrorCondition.InputType}
*/
public enum InputType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNKNOWN = 0;
*/
UNKNOWN(0),
/**
* RET_CODE = 1;
*/
RET_CODE(1),
/**
* DELAY = 2;
*/
DELAY(2),
UNRECOGNIZED(-1),
;
/**
* UNKNOWN = 0;
*/
public static final int UNKNOWN_VALUE = 0;
/**
* RET_CODE = 1;
*/
public static final int RET_CODE_VALUE = 1;
/**
* DELAY = 2;
*/
public static final int DELAY_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static InputType 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 InputType forNumber(int value) {
switch (value) {
case 0: return UNKNOWN;
case 1: return RET_CODE;
case 2: return DELAY;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
InputType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public InputType findValueByNumber(int number) {
return InputType.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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.getDescriptor().getEnumTypes().get(0);
}
private static final InputType[] VALUES = values();
public static InputType 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 InputType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:v1.ErrorCondition.InputType)
}
public static final int INPUT_TYPE_FIELD_NUMBER = 1;
private int inputType_;
/**
* .v1.ErrorCondition.InputType input_type = 1;
* @return The enum numeric value on the wire for inputType.
*/
@java.lang.Override public int getInputTypeValue() {
return inputType_;
}
/**
* .v1.ErrorCondition.InputType input_type = 1;
* @return The inputType.
*/
@java.lang.Override public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.InputType getInputType() {
@SuppressWarnings("deprecation")
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.InputType result = com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.InputType.valueOf(inputType_);
return result == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.InputType.UNRECOGNIZED : result;
}
public static final int CONDITION_FIELD_NUMBER = 2;
private com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString condition_;
/**
* .v1.MatchString condition = 2;
* @return Whether the condition field is set.
*/
@java.lang.Override
public boolean hasCondition() {
return condition_ != null;
}
/**
* .v1.MatchString condition = 2;
* @return The condition.
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString getCondition() {
return condition_ == null ? com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.getDefaultInstance() : condition_;
}
/**
* .v1.MatchString condition = 2;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.model.ModelProto.MatchStringOrBuilder getConditionOrBuilder() {
return getCondition();
}
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 (inputType_ != com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.InputType.UNKNOWN.getNumber()) {
output.writeEnum(1, inputType_);
}
if (condition_ != null) {
output.writeMessage(2, getCondition());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (inputType_ != com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.InputType.UNKNOWN.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, inputType_);
}
if (condition_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getCondition());
}
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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition)) {
return super.equals(obj);
}
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition other = (com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition) obj;
if (inputType_ != other.inputType_) return false;
if (hasCondition() != other.hasCondition()) return false;
if (hasCondition()) {
if (!getCondition()
.equals(other.getCondition())) 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) + INPUT_TYPE_FIELD_NUMBER;
hash = (53 * hash) + inputType_;
if (hasCondition()) {
hash = (37 * hash) + CONDITION_FIELD_NUMBER;
hash = (53 * hash) + getCondition().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition 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(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition 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;
}
/**
*
* the condition to judge an input invocation as an error
*
*
* Protobuf type {@code v1.ErrorCondition}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:v1.ErrorCondition)
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorConditionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_ErrorCondition_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_ErrorCondition_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.Builder.class);
}
// Construct using com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
inputType_ = 0;
if (conditionBuilder_ == null) {
condition_ = null;
} else {
condition_ = null;
conditionBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_ErrorCondition_descriptor;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition getDefaultInstanceForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.getDefaultInstance();
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition build() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition buildPartial() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition result = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition(this);
result.inputType_ = inputType_;
if (conditionBuilder_ == null) {
result.condition_ = condition_;
} else {
result.condition_ = conditionBuilder_.build();
}
onBuilt();
return result;
}
@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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition) {
return mergeFrom((com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition other) {
if (other == com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.getDefaultInstance()) return this;
if (other.inputType_ != 0) {
setInputTypeValue(other.getInputTypeValue());
}
if (other.hasCondition()) {
mergeCondition(other.getCondition());
}
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: {
inputType_ = input.readEnum();
break;
} // case 8
case 18: {
input.readMessage(
getConditionFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int inputType_ = 0;
/**
* .v1.ErrorCondition.InputType input_type = 1;
* @return The enum numeric value on the wire for inputType.
*/
@java.lang.Override public int getInputTypeValue() {
return inputType_;
}
/**
* .v1.ErrorCondition.InputType input_type = 1;
* @param value The enum numeric value on the wire for inputType to set.
* @return This builder for chaining.
*/
public Builder setInputTypeValue(int value) {
inputType_ = value;
onChanged();
return this;
}
/**
* .v1.ErrorCondition.InputType input_type = 1;
* @return The inputType.
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.InputType getInputType() {
@SuppressWarnings("deprecation")
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.InputType result = com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.InputType.valueOf(inputType_);
return result == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.InputType.UNRECOGNIZED : result;
}
/**
* .v1.ErrorCondition.InputType input_type = 1;
* @param value The inputType to set.
* @return This builder for chaining.
*/
public Builder setInputType(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition.InputType value) {
if (value == null) {
throw new NullPointerException();
}
inputType_ = value.getNumber();
onChanged();
return this;
}
/**
* .v1.ErrorCondition.InputType input_type = 1;
* @return This builder for chaining.
*/
public Builder clearInputType() {
inputType_ = 0;
onChanged();
return this;
}
private com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString condition_;
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString, com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.Builder, com.tencent.polaris.specification.api.v1.model.ModelProto.MatchStringOrBuilder> conditionBuilder_;
/**
* .v1.MatchString condition = 2;
* @return Whether the condition field is set.
*/
public boolean hasCondition() {
return conditionBuilder_ != null || condition_ != null;
}
/**
* .v1.MatchString condition = 2;
* @return The condition.
*/
public com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString getCondition() {
if (conditionBuilder_ == null) {
return condition_ == null ? com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.getDefaultInstance() : condition_;
} else {
return conditionBuilder_.getMessage();
}
}
/**
* .v1.MatchString condition = 2;
*/
public Builder setCondition(com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString value) {
if (conditionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
condition_ = value;
onChanged();
} else {
conditionBuilder_.setMessage(value);
}
return this;
}
/**
* .v1.MatchString condition = 2;
*/
public Builder setCondition(
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.Builder builderForValue) {
if (conditionBuilder_ == null) {
condition_ = builderForValue.build();
onChanged();
} else {
conditionBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .v1.MatchString condition = 2;
*/
public Builder mergeCondition(com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString value) {
if (conditionBuilder_ == null) {
if (condition_ != null) {
condition_ =
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.newBuilder(condition_).mergeFrom(value).buildPartial();
} else {
condition_ = value;
}
onChanged();
} else {
conditionBuilder_.mergeFrom(value);
}
return this;
}
/**
* .v1.MatchString condition = 2;
*/
public Builder clearCondition() {
if (conditionBuilder_ == null) {
condition_ = null;
onChanged();
} else {
condition_ = null;
conditionBuilder_ = null;
}
return this;
}
/**
* .v1.MatchString condition = 2;
*/
public com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.Builder getConditionBuilder() {
onChanged();
return getConditionFieldBuilder().getBuilder();
}
/**
* .v1.MatchString condition = 2;
*/
public com.tencent.polaris.specification.api.v1.model.ModelProto.MatchStringOrBuilder getConditionOrBuilder() {
if (conditionBuilder_ != null) {
return conditionBuilder_.getMessageOrBuilder();
} else {
return condition_ == null ?
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.getDefaultInstance() : condition_;
}
}
/**
* .v1.MatchString condition = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString, com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.Builder, com.tencent.polaris.specification.api.v1.model.ModelProto.MatchStringOrBuilder>
getConditionFieldBuilder() {
if (conditionBuilder_ == null) {
conditionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString, com.tencent.polaris.specification.api.v1.model.ModelProto.MatchString.Builder, com.tencent.polaris.specification.api.v1.model.ModelProto.MatchStringOrBuilder>(
getCondition(),
getParentForChildren(),
isClean());
condition_ = null;
}
return conditionBuilder_;
}
@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:v1.ErrorCondition)
}
// @@protoc_insertion_point(class_scope:v1.ErrorCondition)
private static final com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition();
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ErrorCondition 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.ErrorCondition getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TriggerConditionOrBuilder extends
// @@protoc_insertion_point(interface_extends:v1.TriggerCondition)
com.google.protobuf.MessageOrBuilder {
/**
* .v1.TriggerCondition.TriggerType trigger_type = 1;
* @return The enum numeric value on the wire for triggerType.
*/
int getTriggerTypeValue();
/**
* .v1.TriggerCondition.TriggerType trigger_type = 1;
* @return The triggerType.
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.TriggerType getTriggerType();
/**
* uint32 error_count = 2;
* @return The errorCount.
*/
int getErrorCount();
/**
* uint32 error_percent = 3;
* @return The errorPercent.
*/
int getErrorPercent();
/**
* uint32 interval = 4;
* @return The interval.
*/
int getInterval();
/**
* uint32 minimum_request = 5;
* @return The minimumRequest.
*/
int getMinimumRequest();
}
/**
*
* the error condition to trigger circuitbreaking
*
*
* Protobuf type {@code v1.TriggerCondition}
*/
public static final class TriggerCondition extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:v1.TriggerCondition)
TriggerConditionOrBuilder {
private static final long serialVersionUID = 0L;
// Use TriggerCondition.newBuilder() to construct.
private TriggerCondition(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TriggerCondition() {
triggerType_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TriggerCondition();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_TriggerCondition_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_TriggerCondition_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.Builder.class);
}
/**
* Protobuf enum {@code v1.TriggerCondition.TriggerType}
*/
public enum TriggerType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNKNOWN = 0;
*/
UNKNOWN(0),
/**
* ERROR_RATE = 1;
*/
ERROR_RATE(1),
/**
* CONSECUTIVE_ERROR = 2;
*/
CONSECUTIVE_ERROR(2),
UNRECOGNIZED(-1),
;
/**
* UNKNOWN = 0;
*/
public static final int UNKNOWN_VALUE = 0;
/**
* ERROR_RATE = 1;
*/
public static final int ERROR_RATE_VALUE = 1;
/**
* CONSECUTIVE_ERROR = 2;
*/
public static final int CONSECUTIVE_ERROR_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static TriggerType 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 TriggerType forNumber(int value) {
switch (value) {
case 0: return UNKNOWN;
case 1: return ERROR_RATE;
case 2: return CONSECUTIVE_ERROR;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
TriggerType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public TriggerType findValueByNumber(int number) {
return TriggerType.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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.getDescriptor().getEnumTypes().get(0);
}
private static final TriggerType[] VALUES = values();
public static TriggerType 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 TriggerType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:v1.TriggerCondition.TriggerType)
}
public static final int TRIGGER_TYPE_FIELD_NUMBER = 1;
private int triggerType_;
/**
* .v1.TriggerCondition.TriggerType trigger_type = 1;
* @return The enum numeric value on the wire for triggerType.
*/
@java.lang.Override public int getTriggerTypeValue() {
return triggerType_;
}
/**
* .v1.TriggerCondition.TriggerType trigger_type = 1;
* @return The triggerType.
*/
@java.lang.Override public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.TriggerType getTriggerType() {
@SuppressWarnings("deprecation")
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.TriggerType result = com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.TriggerType.valueOf(triggerType_);
return result == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.TriggerType.UNRECOGNIZED : result;
}
public static final int ERROR_COUNT_FIELD_NUMBER = 2;
private int errorCount_;
/**
* uint32 error_count = 2;
* @return The errorCount.
*/
@java.lang.Override
public int getErrorCount() {
return errorCount_;
}
public static final int ERROR_PERCENT_FIELD_NUMBER = 3;
private int errorPercent_;
/**
* uint32 error_percent = 3;
* @return The errorPercent.
*/
@java.lang.Override
public int getErrorPercent() {
return errorPercent_;
}
public static final int INTERVAL_FIELD_NUMBER = 4;
private int interval_;
/**
* uint32 interval = 4;
* @return The interval.
*/
@java.lang.Override
public int getInterval() {
return interval_;
}
public static final int MINIMUM_REQUEST_FIELD_NUMBER = 5;
private int minimumRequest_;
/**
* uint32 minimum_request = 5;
* @return The minimumRequest.
*/
@java.lang.Override
public int getMinimumRequest() {
return minimumRequest_;
}
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 (triggerType_ != com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.TriggerType.UNKNOWN.getNumber()) {
output.writeEnum(1, triggerType_);
}
if (errorCount_ != 0) {
output.writeUInt32(2, errorCount_);
}
if (errorPercent_ != 0) {
output.writeUInt32(3, errorPercent_);
}
if (interval_ != 0) {
output.writeUInt32(4, interval_);
}
if (minimumRequest_ != 0) {
output.writeUInt32(5, minimumRequest_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (triggerType_ != com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.TriggerType.UNKNOWN.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, triggerType_);
}
if (errorCount_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(2, errorCount_);
}
if (errorPercent_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(3, errorPercent_);
}
if (interval_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(4, interval_);
}
if (minimumRequest_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(5, minimumRequest_);
}
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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition)) {
return super.equals(obj);
}
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition other = (com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition) obj;
if (triggerType_ != other.triggerType_) return false;
if (getErrorCount()
!= other.getErrorCount()) return false;
if (getErrorPercent()
!= other.getErrorPercent()) return false;
if (getInterval()
!= other.getInterval()) return false;
if (getMinimumRequest()
!= other.getMinimumRequest()) 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) + TRIGGER_TYPE_FIELD_NUMBER;
hash = (53 * hash) + triggerType_;
hash = (37 * hash) + ERROR_COUNT_FIELD_NUMBER;
hash = (53 * hash) + getErrorCount();
hash = (37 * hash) + ERROR_PERCENT_FIELD_NUMBER;
hash = (53 * hash) + getErrorPercent();
hash = (37 * hash) + INTERVAL_FIELD_NUMBER;
hash = (53 * hash) + getInterval();
hash = (37 * hash) + MINIMUM_REQUEST_FIELD_NUMBER;
hash = (53 * hash) + getMinimumRequest();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition 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(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition 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;
}
/**
*
* the error condition to trigger circuitbreaking
*
*
* Protobuf type {@code v1.TriggerCondition}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:v1.TriggerCondition)
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerConditionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_TriggerCondition_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_TriggerCondition_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.Builder.class);
}
// Construct using com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
triggerType_ = 0;
errorCount_ = 0;
errorPercent_ = 0;
interval_ = 0;
minimumRequest_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_TriggerCondition_descriptor;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition getDefaultInstanceForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.getDefaultInstance();
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition build() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition buildPartial() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition result = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition(this);
result.triggerType_ = triggerType_;
result.errorCount_ = errorCount_;
result.errorPercent_ = errorPercent_;
result.interval_ = interval_;
result.minimumRequest_ = minimumRequest_;
onBuilt();
return result;
}
@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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition) {
return mergeFrom((com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition other) {
if (other == com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.getDefaultInstance()) return this;
if (other.triggerType_ != 0) {
setTriggerTypeValue(other.getTriggerTypeValue());
}
if (other.getErrorCount() != 0) {
setErrorCount(other.getErrorCount());
}
if (other.getErrorPercent() != 0) {
setErrorPercent(other.getErrorPercent());
}
if (other.getInterval() != 0) {
setInterval(other.getInterval());
}
if (other.getMinimumRequest() != 0) {
setMinimumRequest(other.getMinimumRequest());
}
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: {
triggerType_ = input.readEnum();
break;
} // case 8
case 16: {
errorCount_ = input.readUInt32();
break;
} // case 16
case 24: {
errorPercent_ = input.readUInt32();
break;
} // case 24
case 32: {
interval_ = input.readUInt32();
break;
} // case 32
case 40: {
minimumRequest_ = input.readUInt32();
break;
} // case 40
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 triggerType_ = 0;
/**
* .v1.TriggerCondition.TriggerType trigger_type = 1;
* @return The enum numeric value on the wire for triggerType.
*/
@java.lang.Override public int getTriggerTypeValue() {
return triggerType_;
}
/**
* .v1.TriggerCondition.TriggerType trigger_type = 1;
* @param value The enum numeric value on the wire for triggerType to set.
* @return This builder for chaining.
*/
public Builder setTriggerTypeValue(int value) {
triggerType_ = value;
onChanged();
return this;
}
/**
* .v1.TriggerCondition.TriggerType trigger_type = 1;
* @return The triggerType.
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.TriggerType getTriggerType() {
@SuppressWarnings("deprecation")
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.TriggerType result = com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.TriggerType.valueOf(triggerType_);
return result == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.TriggerType.UNRECOGNIZED : result;
}
/**
* .v1.TriggerCondition.TriggerType trigger_type = 1;
* @param value The triggerType to set.
* @return This builder for chaining.
*/
public Builder setTriggerType(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition.TriggerType value) {
if (value == null) {
throw new NullPointerException();
}
triggerType_ = value.getNumber();
onChanged();
return this;
}
/**
* .v1.TriggerCondition.TriggerType trigger_type = 1;
* @return This builder for chaining.
*/
public Builder clearTriggerType() {
triggerType_ = 0;
onChanged();
return this;
}
private int errorCount_ ;
/**
* uint32 error_count = 2;
* @return The errorCount.
*/
@java.lang.Override
public int getErrorCount() {
return errorCount_;
}
/**
* uint32 error_count = 2;
* @param value The errorCount to set.
* @return This builder for chaining.
*/
public Builder setErrorCount(int value) {
errorCount_ = value;
onChanged();
return this;
}
/**
* uint32 error_count = 2;
* @return This builder for chaining.
*/
public Builder clearErrorCount() {
errorCount_ = 0;
onChanged();
return this;
}
private int errorPercent_ ;
/**
* uint32 error_percent = 3;
* @return The errorPercent.
*/
@java.lang.Override
public int getErrorPercent() {
return errorPercent_;
}
/**
* uint32 error_percent = 3;
* @param value The errorPercent to set.
* @return This builder for chaining.
*/
public Builder setErrorPercent(int value) {
errorPercent_ = value;
onChanged();
return this;
}
/**
* uint32 error_percent = 3;
* @return This builder for chaining.
*/
public Builder clearErrorPercent() {
errorPercent_ = 0;
onChanged();
return this;
}
private int interval_ ;
/**
* uint32 interval = 4;
* @return The interval.
*/
@java.lang.Override
public int getInterval() {
return interval_;
}
/**
* uint32 interval = 4;
* @param value The interval to set.
* @return This builder for chaining.
*/
public Builder setInterval(int value) {
interval_ = value;
onChanged();
return this;
}
/**
* uint32 interval = 4;
* @return This builder for chaining.
*/
public Builder clearInterval() {
interval_ = 0;
onChanged();
return this;
}
private int minimumRequest_ ;
/**
* uint32 minimum_request = 5;
* @return The minimumRequest.
*/
@java.lang.Override
public int getMinimumRequest() {
return minimumRequest_;
}
/**
* uint32 minimum_request = 5;
* @param value The minimumRequest to set.
* @return This builder for chaining.
*/
public Builder setMinimumRequest(int value) {
minimumRequest_ = value;
onChanged();
return this;
}
/**
* uint32 minimum_request = 5;
* @return This builder for chaining.
*/
public Builder clearMinimumRequest() {
minimumRequest_ = 0;
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:v1.TriggerCondition)
}
// @@protoc_insertion_point(class_scope:v1.TriggerCondition)
private static final com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition();
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TriggerCondition 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.TriggerCondition getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface RecoverConditionOrBuilder extends
// @@protoc_insertion_point(interface_extends:v1.RecoverCondition)
com.google.protobuf.MessageOrBuilder {
/**
*
* seconds from open to half-open
*
*
* uint32 sleep_window = 1;
* @return The sleepWindow.
*/
int getSleepWindow();
/**
*
* consecutive success request to recover
*
*
* uint32 consecutiveSuccess = 2;
* @return The consecutiveSuccess.
*/
int getConsecutiveSuccess();
}
/**
* Protobuf type {@code v1.RecoverCondition}
*/
public static final class RecoverCondition extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:v1.RecoverCondition)
RecoverConditionOrBuilder {
private static final long serialVersionUID = 0L;
// Use RecoverCondition.newBuilder() to construct.
private RecoverCondition(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RecoverCondition() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RecoverCondition();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RecoverCondition_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RecoverCondition_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition.Builder.class);
}
public static final int SLEEP_WINDOW_FIELD_NUMBER = 1;
private int sleepWindow_;
/**
*
* seconds from open to half-open
*
*
* uint32 sleep_window = 1;
* @return The sleepWindow.
*/
@java.lang.Override
public int getSleepWindow() {
return sleepWindow_;
}
public static final int CONSECUTIVESUCCESS_FIELD_NUMBER = 2;
private int consecutiveSuccess_;
/**
*
* consecutive success request to recover
*
*
* uint32 consecutiveSuccess = 2;
* @return The consecutiveSuccess.
*/
@java.lang.Override
public int getConsecutiveSuccess() {
return consecutiveSuccess_;
}
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 (sleepWindow_ != 0) {
output.writeUInt32(1, sleepWindow_);
}
if (consecutiveSuccess_ != 0) {
output.writeUInt32(2, consecutiveSuccess_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (sleepWindow_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(1, sleepWindow_);
}
if (consecutiveSuccess_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(2, consecutiveSuccess_);
}
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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition)) {
return super.equals(obj);
}
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition other = (com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition) obj;
if (getSleepWindow()
!= other.getSleepWindow()) return false;
if (getConsecutiveSuccess()
!= other.getConsecutiveSuccess()) 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) + SLEEP_WINDOW_FIELD_NUMBER;
hash = (53 * hash) + getSleepWindow();
hash = (37 * hash) + CONSECUTIVESUCCESS_FIELD_NUMBER;
hash = (53 * hash) + getConsecutiveSuccess();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition 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(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition 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 v1.RecoverCondition}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:v1.RecoverCondition)
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverConditionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RecoverCondition_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RecoverCondition_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition.Builder.class);
}
// Construct using com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
sleepWindow_ = 0;
consecutiveSuccess_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_RecoverCondition_descriptor;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition getDefaultInstanceForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition.getDefaultInstance();
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition build() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition buildPartial() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition result = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition(this);
result.sleepWindow_ = sleepWindow_;
result.consecutiveSuccess_ = consecutiveSuccess_;
onBuilt();
return result;
}
@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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition) {
return mergeFrom((com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition other) {
if (other == com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition.getDefaultInstance()) return this;
if (other.getSleepWindow() != 0) {
setSleepWindow(other.getSleepWindow());
}
if (other.getConsecutiveSuccess() != 0) {
setConsecutiveSuccess(other.getConsecutiveSuccess());
}
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: {
sleepWindow_ = input.readUInt32();
break;
} // case 8
case 16: {
consecutiveSuccess_ = input.readUInt32();
break;
} // case 16
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 sleepWindow_ ;
/**
*
* seconds from open to half-open
*
*
* uint32 sleep_window = 1;
* @return The sleepWindow.
*/
@java.lang.Override
public int getSleepWindow() {
return sleepWindow_;
}
/**
*
* seconds from open to half-open
*
*
* uint32 sleep_window = 1;
* @param value The sleepWindow to set.
* @return This builder for chaining.
*/
public Builder setSleepWindow(int value) {
sleepWindow_ = value;
onChanged();
return this;
}
/**
*
* seconds from open to half-open
*
*
* uint32 sleep_window = 1;
* @return This builder for chaining.
*/
public Builder clearSleepWindow() {
sleepWindow_ = 0;
onChanged();
return this;
}
private int consecutiveSuccess_ ;
/**
*
* consecutive success request to recover
*
*
* uint32 consecutiveSuccess = 2;
* @return The consecutiveSuccess.
*/
@java.lang.Override
public int getConsecutiveSuccess() {
return consecutiveSuccess_;
}
/**
*
* consecutive success request to recover
*
*
* uint32 consecutiveSuccess = 2;
* @param value The consecutiveSuccess to set.
* @return This builder for chaining.
*/
public Builder setConsecutiveSuccess(int value) {
consecutiveSuccess_ = value;
onChanged();
return this;
}
/**
*
* consecutive success request to recover
*
*
* uint32 consecutiveSuccess = 2;
* @return This builder for chaining.
*/
public Builder clearConsecutiveSuccess() {
consecutiveSuccess_ = 0;
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:v1.RecoverCondition)
}
// @@protoc_insertion_point(class_scope:v1.RecoverCondition)
private static final com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition();
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RecoverCondition 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.RecoverCondition getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface FaultDetectConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:v1.FaultDetectConfig)
com.google.protobuf.MessageOrBuilder {
/**
* bool enable = 1;
* @return The enable.
*/
boolean getEnable();
}
/**
* Protobuf type {@code v1.FaultDetectConfig}
*/
public static final class FaultDetectConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:v1.FaultDetectConfig)
FaultDetectConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use FaultDetectConfig.newBuilder() to construct.
private FaultDetectConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private FaultDetectConfig() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new FaultDetectConfig();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_FaultDetectConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_FaultDetectConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig.Builder.class);
}
public static final int ENABLE_FIELD_NUMBER = 1;
private boolean enable_;
/**
* bool enable = 1;
* @return The enable.
*/
@java.lang.Override
public boolean getEnable() {
return enable_;
}
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 (enable_ != false) {
output.writeBool(1, enable_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (enable_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(1, enable_);
}
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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig)) {
return super.equals(obj);
}
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig other = (com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig) obj;
if (getEnable()
!= other.getEnable()) 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) + ENABLE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getEnable());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig 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(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig 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 v1.FaultDetectConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:v1.FaultDetectConfig)
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_FaultDetectConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_FaultDetectConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig.Builder.class);
}
// Construct using com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
enable_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_FaultDetectConfig_descriptor;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig getDefaultInstanceForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig.getDefaultInstance();
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig build() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig buildPartial() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig result = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig(this);
result.enable_ = enable_;
onBuilt();
return result;
}
@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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig) {
return mergeFrom((com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig other) {
if (other == com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig.getDefaultInstance()) return this;
if (other.getEnable() != false) {
setEnable(other.getEnable());
}
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: {
enable_ = input.readBool();
break;
} // case 8
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 boolean enable_ ;
/**
* bool enable = 1;
* @return The enable.
*/
@java.lang.Override
public boolean getEnable() {
return enable_;
}
/**
* bool enable = 1;
* @param value The enable to set.
* @return This builder for chaining.
*/
public Builder setEnable(boolean value) {
enable_ = value;
onChanged();
return this;
}
/**
* bool enable = 1;
* @return This builder for chaining.
*/
public Builder clearEnable() {
enable_ = false;
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:v1.FaultDetectConfig)
}
// @@protoc_insertion_point(class_scope:v1.FaultDetectConfig)
private static final com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig();
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public FaultDetectConfig 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FaultDetectConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface FallbackConfigOrBuilder extends
// @@protoc_insertion_point(interface_extends:v1.FallbackConfig)
com.google.protobuf.MessageOrBuilder {
/**
* bool enable = 1;
* @return The enable.
*/
boolean getEnable();
/**
* .v1.FallbackResponse response = 2;
* @return Whether the response field is set.
*/
boolean hasResponse();
/**
* .v1.FallbackResponse response = 2;
* @return The response.
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse getResponse();
/**
* .v1.FallbackResponse response = 2;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponseOrBuilder getResponseOrBuilder();
}
/**
* Protobuf type {@code v1.FallbackConfig}
*/
public static final class FallbackConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:v1.FallbackConfig)
FallbackConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use FallbackConfig.newBuilder() to construct.
private FallbackConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private FallbackConfig() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new FallbackConfig();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_FallbackConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_FallbackConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig.Builder.class);
}
public static final int ENABLE_FIELD_NUMBER = 1;
private boolean enable_;
/**
* bool enable = 1;
* @return The enable.
*/
@java.lang.Override
public boolean getEnable() {
return enable_;
}
public static final int RESPONSE_FIELD_NUMBER = 2;
private com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse response_;
/**
* .v1.FallbackResponse response = 2;
* @return Whether the response field is set.
*/
@java.lang.Override
public boolean hasResponse() {
return response_ != null;
}
/**
* .v1.FallbackResponse response = 2;
* @return The response.
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse getResponse() {
return response_ == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.getDefaultInstance() : response_;
}
/**
* .v1.FallbackResponse response = 2;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponseOrBuilder getResponseOrBuilder() {
return getResponse();
}
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 (enable_ != false) {
output.writeBool(1, enable_);
}
if (response_ != null) {
output.writeMessage(2, getResponse());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (enable_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(1, enable_);
}
if (response_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getResponse());
}
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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig)) {
return super.equals(obj);
}
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig other = (com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig) obj;
if (getEnable()
!= other.getEnable()) return false;
if (hasResponse() != other.hasResponse()) return false;
if (hasResponse()) {
if (!getResponse()
.equals(other.getResponse())) 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) + ENABLE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getEnable());
if (hasResponse()) {
hash = (37 * hash) + RESPONSE_FIELD_NUMBER;
hash = (53 * hash) + getResponse().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig 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(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig 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 v1.FallbackConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:v1.FallbackConfig)
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_FallbackConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_FallbackConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig.Builder.class);
}
// Construct using com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
enable_ = false;
if (responseBuilder_ == null) {
response_ = null;
} else {
response_ = null;
responseBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_FallbackConfig_descriptor;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig getDefaultInstanceForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig.getDefaultInstance();
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig build() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig buildPartial() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig result = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig(this);
result.enable_ = enable_;
if (responseBuilder_ == null) {
result.response_ = response_;
} else {
result.response_ = responseBuilder_.build();
}
onBuilt();
return result;
}
@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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig) {
return mergeFrom((com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig other) {
if (other == com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig.getDefaultInstance()) return this;
if (other.getEnable() != false) {
setEnable(other.getEnable());
}
if (other.hasResponse()) {
mergeResponse(other.getResponse());
}
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: {
enable_ = input.readBool();
break;
} // case 8
case 18: {
input.readMessage(
getResponseFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private boolean enable_ ;
/**
* bool enable = 1;
* @return The enable.
*/
@java.lang.Override
public boolean getEnable() {
return enable_;
}
/**
* bool enable = 1;
* @param value The enable to set.
* @return This builder for chaining.
*/
public Builder setEnable(boolean value) {
enable_ = value;
onChanged();
return this;
}
/**
* bool enable = 1;
* @return This builder for chaining.
*/
public Builder clearEnable() {
enable_ = false;
onChanged();
return this;
}
private com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse response_;
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponseOrBuilder> responseBuilder_;
/**
* .v1.FallbackResponse response = 2;
* @return Whether the response field is set.
*/
public boolean hasResponse() {
return responseBuilder_ != null || response_ != null;
}
/**
* .v1.FallbackResponse response = 2;
* @return The response.
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse getResponse() {
if (responseBuilder_ == null) {
return response_ == null ? com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.getDefaultInstance() : response_;
} else {
return responseBuilder_.getMessage();
}
}
/**
* .v1.FallbackResponse response = 2;
*/
public Builder setResponse(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse value) {
if (responseBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
response_ = value;
onChanged();
} else {
responseBuilder_.setMessage(value);
}
return this;
}
/**
* .v1.FallbackResponse response = 2;
*/
public Builder setResponse(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.Builder builderForValue) {
if (responseBuilder_ == null) {
response_ = builderForValue.build();
onChanged();
} else {
responseBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .v1.FallbackResponse response = 2;
*/
public Builder mergeResponse(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse value) {
if (responseBuilder_ == null) {
if (response_ != null) {
response_ =
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.newBuilder(response_).mergeFrom(value).buildPartial();
} else {
response_ = value;
}
onChanged();
} else {
responseBuilder_.mergeFrom(value);
}
return this;
}
/**
* .v1.FallbackResponse response = 2;
*/
public Builder clearResponse() {
if (responseBuilder_ == null) {
response_ = null;
onChanged();
} else {
response_ = null;
responseBuilder_ = null;
}
return this;
}
/**
* .v1.FallbackResponse response = 2;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.Builder getResponseBuilder() {
onChanged();
return getResponseFieldBuilder().getBuilder();
}
/**
* .v1.FallbackResponse response = 2;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponseOrBuilder getResponseOrBuilder() {
if (responseBuilder_ != null) {
return responseBuilder_.getMessageOrBuilder();
} else {
return response_ == null ?
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.getDefaultInstance() : response_;
}
}
/**
* .v1.FallbackResponse response = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponseOrBuilder>
getResponseFieldBuilder() {
if (responseBuilder_ == null) {
responseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponseOrBuilder>(
getResponse(),
getParentForChildren(),
isClean());
response_ = null;
}
return responseBuilder_;
}
@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:v1.FallbackConfig)
}
// @@protoc_insertion_point(class_scope:v1.FallbackConfig)
private static final com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig();
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public FallbackConfig 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface FallbackResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:v1.FallbackResponse)
com.google.protobuf.MessageOrBuilder {
/**
* int32 code = 1;
* @return The code.
*/
int getCode();
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
java.util.List
getHeadersList();
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader getHeaders(int index);
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
int getHeadersCount();
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeaderOrBuilder>
getHeadersOrBuilderList();
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeaderOrBuilder getHeadersOrBuilder(
int index);
/**
* string body = 3;
* @return The body.
*/
java.lang.String getBody();
/**
* string body = 3;
* @return The bytes for body.
*/
com.google.protobuf.ByteString
getBodyBytes();
}
/**
* Protobuf type {@code v1.FallbackResponse}
*/
public static final class FallbackResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:v1.FallbackResponse)
FallbackResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use FallbackResponse.newBuilder() to construct.
private FallbackResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private FallbackResponse() {
headers_ = java.util.Collections.emptyList();
body_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new FallbackResponse();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_FallbackResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_FallbackResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.Builder.class);
}
public interface MessageHeaderOrBuilder extends
// @@protoc_insertion_point(interface_extends:v1.FallbackResponse.MessageHeader)
com.google.protobuf.MessageOrBuilder {
/**
* string key = 1;
* @return The key.
*/
java.lang.String getKey();
/**
* string key = 1;
* @return The bytes for key.
*/
com.google.protobuf.ByteString
getKeyBytes();
/**
* string value = 2;
* @return The value.
*/
java.lang.String getValue();
/**
* string value = 2;
* @return The bytes for value.
*/
com.google.protobuf.ByteString
getValueBytes();
}
/**
* Protobuf type {@code v1.FallbackResponse.MessageHeader}
*/
public static final class MessageHeader extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:v1.FallbackResponse.MessageHeader)
MessageHeaderOrBuilder {
private static final long serialVersionUID = 0L;
// Use MessageHeader.newBuilder() to construct.
private MessageHeader(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private MessageHeader() {
key_ = "";
value_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MessageHeader();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_FallbackResponse_MessageHeader_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_FallbackResponse_MessageHeader_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader.Builder.class);
}
public static final int KEY_FIELD_NUMBER = 1;
private volatile java.lang.Object key_;
/**
* string key = 1;
* @return The key.
*/
@java.lang.Override
public java.lang.String getKey() {
java.lang.Object ref = key_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
key_ = s;
return s;
}
}
/**
* string key = 1;
* @return The bytes for key.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getKeyBytes() {
java.lang.Object ref = key_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
key_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VALUE_FIELD_NUMBER = 2;
private volatile java.lang.Object value_;
/**
* string value = 2;
* @return The value.
*/
@java.lang.Override
public java.lang.String getValue() {
java.lang.Object ref = value_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
value_ = s;
return s;
}
}
/**
* string value = 2;
* @return The bytes for value.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getValueBytes() {
java.lang.Object ref = value_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
value_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_);
}
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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader)) {
return super.equals(obj);
}
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader other = (com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader) obj;
if (!getKey()
.equals(other.getKey())) return false;
if (!getValue()
.equals(other.getValue())) 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) + KEY_FIELD_NUMBER;
hash = (53 * hash) + getKey().hashCode();
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + getValue().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader 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(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader 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 v1.FallbackResponse.MessageHeader}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:v1.FallbackResponse.MessageHeader)
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeaderOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_FallbackResponse_MessageHeader_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_FallbackResponse_MessageHeader_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader.Builder.class);
}
// Construct using com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
key_ = "";
value_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_FallbackResponse_MessageHeader_descriptor;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader getDefaultInstanceForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader.getDefaultInstance();
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader build() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader buildPartial() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader result = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader(this);
result.key_ = key_;
result.value_ = value_;
onBuilt();
return result;
}
@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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader) {
return mergeFrom((com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader other) {
if (other == com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader.getDefaultInstance()) return this;
if (!other.getKey().isEmpty()) {
key_ = other.key_;
onChanged();
}
if (!other.getValue().isEmpty()) {
value_ = other.value_;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
key_ = input.readStringRequireUtf8();
break;
} // case 10
case 18: {
value_ = input.readStringRequireUtf8();
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private java.lang.Object key_ = "";
/**
* string key = 1;
* @return The key.
*/
public java.lang.String getKey() {
java.lang.Object ref = key_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
key_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string key = 1;
* @return The bytes for key.
*/
public com.google.protobuf.ByteString
getKeyBytes() {
java.lang.Object ref = key_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
key_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string key = 1;
* @param value The key to set.
* @return This builder for chaining.
*/
public Builder setKey(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
key_ = value;
onChanged();
return this;
}
/**
* string key = 1;
* @return This builder for chaining.
*/
public Builder clearKey() {
key_ = getDefaultInstance().getKey();
onChanged();
return this;
}
/**
* string key = 1;
* @param value The bytes for key to set.
* @return This builder for chaining.
*/
public Builder setKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
key_ = value;
onChanged();
return this;
}
private java.lang.Object value_ = "";
/**
* string value = 2;
* @return The value.
*/
public java.lang.String getValue() {
java.lang.Object ref = value_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
value_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string value = 2;
* @return The bytes for value.
*/
public com.google.protobuf.ByteString
getValueBytes() {
java.lang.Object ref = value_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
value_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string value = 2;
* @param value The value to set.
* @return This builder for chaining.
*/
public Builder setValue(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
return this;
}
/**
* string value = 2;
* @return This builder for chaining.
*/
public Builder clearValue() {
value_ = getDefaultInstance().getValue();
onChanged();
return this;
}
/**
* string value = 2;
* @param value The bytes for value to set.
* @return This builder for chaining.
*/
public Builder setValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
value_ = value;
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:v1.FallbackResponse.MessageHeader)
}
// @@protoc_insertion_point(class_scope:v1.FallbackResponse.MessageHeader)
private static final com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader();
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public MessageHeader 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int CODE_FIELD_NUMBER = 1;
private int code_;
/**
* int32 code = 1;
* @return The code.
*/
@java.lang.Override
public int getCode() {
return code_;
}
public static final int HEADERS_FIELD_NUMBER = 2;
private java.util.List headers_;
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
@java.lang.Override
public java.util.List getHeadersList() {
return headers_;
}
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
@java.lang.Override
public java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeaderOrBuilder>
getHeadersOrBuilderList() {
return headers_;
}
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
@java.lang.Override
public int getHeadersCount() {
return headers_.size();
}
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader getHeaders(int index) {
return headers_.get(index);
}
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeaderOrBuilder getHeadersOrBuilder(
int index) {
return headers_.get(index);
}
public static final int BODY_FIELD_NUMBER = 3;
private volatile java.lang.Object body_;
/**
* string body = 3;
* @return The body.
*/
@java.lang.Override
public java.lang.String getBody() {
java.lang.Object ref = body_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
body_ = s;
return s;
}
}
/**
* string body = 3;
* @return The bytes for body.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getBodyBytes() {
java.lang.Object ref = body_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
body_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (code_ != 0) {
output.writeInt32(1, code_);
}
for (int i = 0; i < headers_.size(); i++) {
output.writeMessage(2, headers_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(body_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, body_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (code_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, code_);
}
for (int i = 0; i < headers_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, headers_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(body_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, body_);
}
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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse)) {
return super.equals(obj);
}
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse other = (com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse) obj;
if (getCode()
!= other.getCode()) return false;
if (!getHeadersList()
.equals(other.getHeadersList())) return false;
if (!getBody()
.equals(other.getBody())) 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) + CODE_FIELD_NUMBER;
hash = (53 * hash) + getCode();
if (getHeadersCount() > 0) {
hash = (37 * hash) + HEADERS_FIELD_NUMBER;
hash = (53 * hash) + getHeadersList().hashCode();
}
hash = (37 * hash) + BODY_FIELD_NUMBER;
hash = (53 * hash) + getBody().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse 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(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse 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 v1.FallbackResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:v1.FallbackResponse)
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_FallbackResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_FallbackResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.class, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.Builder.class);
}
// Construct using com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
code_ = 0;
if (headersBuilder_ == null) {
headers_ = java.util.Collections.emptyList();
} else {
headers_ = null;
headersBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
body_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.internal_static_v1_FallbackResponse_descriptor;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse getDefaultInstanceForType() {
return com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.getDefaultInstance();
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse build() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse buildPartial() {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse result = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse(this);
int from_bitField0_ = bitField0_;
result.code_ = code_;
if (headersBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
headers_ = java.util.Collections.unmodifiableList(headers_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.headers_ = headers_;
} else {
result.headers_ = headersBuilder_.build();
}
result.body_ = body_;
onBuilt();
return result;
}
@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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse) {
return mergeFrom((com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse other) {
if (other == com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.getDefaultInstance()) return this;
if (other.getCode() != 0) {
setCode(other.getCode());
}
if (headersBuilder_ == null) {
if (!other.headers_.isEmpty()) {
if (headers_.isEmpty()) {
headers_ = other.headers_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureHeadersIsMutable();
headers_.addAll(other.headers_);
}
onChanged();
}
} else {
if (!other.headers_.isEmpty()) {
if (headersBuilder_.isEmpty()) {
headersBuilder_.dispose();
headersBuilder_ = null;
headers_ = other.headers_;
bitField0_ = (bitField0_ & ~0x00000001);
headersBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getHeadersFieldBuilder() : null;
} else {
headersBuilder_.addAllMessages(other.headers_);
}
}
}
if (!other.getBody().isEmpty()) {
body_ = other.body_;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
code_ = input.readInt32();
break;
} // case 8
case 18: {
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader m =
input.readMessage(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader.parser(),
extensionRegistry);
if (headersBuilder_ == null) {
ensureHeadersIsMutable();
headers_.add(m);
} else {
headersBuilder_.addMessage(m);
}
break;
} // case 18
case 26: {
body_ = input.readStringRequireUtf8();
break;
} // case 26
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 code_ ;
/**
* int32 code = 1;
* @return The code.
*/
@java.lang.Override
public int getCode() {
return code_;
}
/**
* int32 code = 1;
* @param value The code to set.
* @return This builder for chaining.
*/
public Builder setCode(int value) {
code_ = value;
onChanged();
return this;
}
/**
* int32 code = 1;
* @return This builder for chaining.
*/
public Builder clearCode() {
code_ = 0;
onChanged();
return this;
}
private java.util.List headers_ =
java.util.Collections.emptyList();
private void ensureHeadersIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
headers_ = new java.util.ArrayList(headers_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeaderOrBuilder> headersBuilder_;
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
public java.util.List getHeadersList() {
if (headersBuilder_ == null) {
return java.util.Collections.unmodifiableList(headers_);
} else {
return headersBuilder_.getMessageList();
}
}
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
public int getHeadersCount() {
if (headersBuilder_ == null) {
return headers_.size();
} else {
return headersBuilder_.getCount();
}
}
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader getHeaders(int index) {
if (headersBuilder_ == null) {
return headers_.get(index);
} else {
return headersBuilder_.getMessage(index);
}
}
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
public Builder setHeaders(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader value) {
if (headersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHeadersIsMutable();
headers_.set(index, value);
onChanged();
} else {
headersBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
public Builder setHeaders(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader.Builder builderForValue) {
if (headersBuilder_ == null) {
ensureHeadersIsMutable();
headers_.set(index, builderForValue.build());
onChanged();
} else {
headersBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
public Builder addHeaders(com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader value) {
if (headersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHeadersIsMutable();
headers_.add(value);
onChanged();
} else {
headersBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
public Builder addHeaders(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader value) {
if (headersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureHeadersIsMutable();
headers_.add(index, value);
onChanged();
} else {
headersBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
public Builder addHeaders(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader.Builder builderForValue) {
if (headersBuilder_ == null) {
ensureHeadersIsMutable();
headers_.add(builderForValue.build());
onChanged();
} else {
headersBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
public Builder addHeaders(
int index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader.Builder builderForValue) {
if (headersBuilder_ == null) {
ensureHeadersIsMutable();
headers_.add(index, builderForValue.build());
onChanged();
} else {
headersBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
public Builder addAllHeaders(
java.lang.Iterable extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader> values) {
if (headersBuilder_ == null) {
ensureHeadersIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, headers_);
onChanged();
} else {
headersBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
public Builder clearHeaders() {
if (headersBuilder_ == null) {
headers_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
headersBuilder_.clear();
}
return this;
}
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
public Builder removeHeaders(int index) {
if (headersBuilder_ == null) {
ensureHeadersIsMutable();
headers_.remove(index);
onChanged();
} else {
headersBuilder_.remove(index);
}
return this;
}
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader.Builder getHeadersBuilder(
int index) {
return getHeadersFieldBuilder().getBuilder(index);
}
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeaderOrBuilder getHeadersOrBuilder(
int index) {
if (headersBuilder_ == null) {
return headers_.get(index); } else {
return headersBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
public java.util.List extends com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeaderOrBuilder>
getHeadersOrBuilderList() {
if (headersBuilder_ != null) {
return headersBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(headers_);
}
}
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader.Builder addHeadersBuilder() {
return getHeadersFieldBuilder().addBuilder(
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader.getDefaultInstance());
}
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
public com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader.Builder addHeadersBuilder(
int index) {
return getHeadersFieldBuilder().addBuilder(
index, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader.getDefaultInstance());
}
/**
* repeated .v1.FallbackResponse.MessageHeader headers = 2;
*/
public java.util.List
getHeadersBuilderList() {
return getHeadersFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeaderOrBuilder>
getHeadersFieldBuilder() {
if (headersBuilder_ == null) {
headersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeader.Builder, com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse.MessageHeaderOrBuilder>(
headers_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
headers_ = null;
}
return headersBuilder_;
}
private java.lang.Object body_ = "";
/**
* string body = 3;
* @return The body.
*/
public java.lang.String getBody() {
java.lang.Object ref = body_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
body_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string body = 3;
* @return The bytes for body.
*/
public com.google.protobuf.ByteString
getBodyBytes() {
java.lang.Object ref = body_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
body_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string body = 3;
* @param value The body to set.
* @return This builder for chaining.
*/
public Builder setBody(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
body_ = value;
onChanged();
return this;
}
/**
* string body = 3;
* @return This builder for chaining.
*/
public Builder clearBody() {
body_ = getDefaultInstance().getBody();
onChanged();
return this;
}
/**
* string body = 3;
* @param value The bytes for body to set.
* @return This builder for chaining.
*/
public Builder setBodyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
body_ = value;
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:v1.FallbackResponse)
}
// @@protoc_insertion_point(class_scope:v1.FallbackResponse)
private static final com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse();
}
public static com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public FallbackResponse 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 com.tencent.polaris.specification.api.v1.fault.tolerance.CircuitBreakerProto.FallbackResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_v1_CircuitBreaker_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_v1_CircuitBreaker_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_v1_SourceMatcher_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_v1_SourceMatcher_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_v1_SourceMatcher_LabelsEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_v1_SourceMatcher_LabelsEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_v1_RecoverConfig_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_v1_RecoverConfig_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_v1_CbPolicy_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_v1_CbPolicy_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_v1_CbPolicy_ErrRateConfig_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_v1_CbPolicy_ErrRateConfig_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_v1_CbPolicy_ErrRateConfig_SpecialConfig_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_v1_CbPolicy_ErrRateConfig_SpecialConfig_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_v1_CbPolicy_SlowRateConfig_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_v1_CbPolicy_SlowRateConfig_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_v1_CbPolicy_ConsecutiveErrConfig_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_v1_CbPolicy_ConsecutiveErrConfig_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_v1_DestinationSet_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_v1_DestinationSet_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_v1_DestinationSet_MetadataEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_v1_DestinationSet_MetadataEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_v1_CbRule_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_v1_CbRule_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_v1_RuleMatcher_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_v1_RuleMatcher_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_v1_RuleMatcher_SourceService_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_v1_RuleMatcher_SourceService_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_v1_RuleMatcher_DestinationService_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_v1_RuleMatcher_DestinationService_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_v1_CircuitBreakerRule_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_v1_CircuitBreakerRule_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_v1_ErrorCondition_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_v1_ErrorCondition_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_v1_TriggerCondition_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_v1_TriggerCondition_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_v1_RecoverCondition_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_v1_RecoverCondition_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_v1_FaultDetectConfig_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_v1_FaultDetectConfig_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_v1_FallbackConfig_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_v1_FallbackConfig_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_v1_FallbackResponse_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_v1_FallbackResponse_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_v1_FallbackResponse_MessageHeader_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_v1_FallbackResponse_MessageHeader_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\024circuitbreaker.proto\022\002v1\032\036google/proto" +
"buf/wrappers.proto\032\036google/protobuf/dura" +
"tion.proto\032\013model.proto\"\216\006\n\016CircuitBreak" +
"er\022(\n\002id\030\001 \001(\0132\034.google.protobuf.StringV" +
"alue\022-\n\007version\030\002 \001(\0132\034.google.protobuf." +
"StringValue\022*\n\004name\030\003 \001(\0132\034.google.proto" +
"buf.StringValue\022/\n\tnamespace\030\004 \001(\0132\034.goo" +
"gle.protobuf.StringValue\022-\n\007service\030\005 \001(" +
"\0132\034.google.protobuf.StringValue\0227\n\021servi" +
"ce_namespace\030\006 \001(\0132\034.google.protobuf.Str" +
"ingValue\022\034\n\010inbounds\030\007 \003(\0132\n.v1.CbRule\022\035" +
"\n\toutbounds\030\010 \003(\0132\n.v1.CbRule\022+\n\005token\030\t" +
" \001(\0132\034.google.protobuf.StringValue\022,\n\006ow" +
"ners\030\n \001(\0132\034.google.protobuf.StringValue" +
"\022.\n\010business\030\013 \001(\0132\034.google.protobuf.Str" +
"ingValue\0220\n\ndepartment\030\014 \001(\0132\034.google.pr" +
"otobuf.StringValue\022-\n\007comment\030\r \001(\0132\034.go" +
"ogle.protobuf.StringValue\022+\n\005ctime\030\016 \001(\013" +
"2\034.google.protobuf.StringValue\022+\n\005mtime\030" +
"\017 \001(\0132\034.google.protobuf.StringValue\022.\n\010r" +
"evision\030\020 \001(\0132\034.google.protobuf.StringVa" +
"lue\022%\n\005rules\030\025 \003(\0132\026.v1.CircuitBreakerRu" +
"leJ\004\010\021\020\025\"\336\001\n\rSourceMatcher\022-\n\007service\030\001 " +
"\001(\0132\034.google.protobuf.StringValue\022/\n\tnam" +
"espace\030\002 \001(\0132\034.google.protobuf.StringVal" +
"ue\022-\n\006labels\030\003 \003(\0132\035.v1.SourceMatcher.La" +
"belsEntry\032>\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\036\n" +
"\005value\030\002 \001(\0132\017.v1.MatchString:\0028\001\"\263\003\n\rRe" +
"coverConfig\022.\n\013sleepWindow\030\001 \001(\0132\031.googl" +
"e.protobuf.Duration\022;\n\025maxRetryAfterHalf" +
"Open\030\002 \001(\0132\034.google.protobuf.UInt32Value" +
"\022>\n\030requestRateAfterHalfOpen\030\003 \003(\0132\034.goo" +
"gle.protobuf.UInt32Value\0228\n\022successRateT" +
"oClose\030\004 \001(\0132\034.google.protobuf.UInt32Val" +
"ue\022?\n\031requestCountAfterHalfOpen\030\005 \001(\0132\034." +
"google.protobuf.UInt32Value\022>\n\021outlierDe" +
"tectWhen\030\006 \001(\0162#.v1.RecoverConfig.Outlie" +
"rDetectWhen\":\n\021OutlierDetectWhen\022\t\n\005NEVE" +
"R\020\000\022\016\n\nON_RECOVER\020\001\022\n\n\006ALWAYS\020\002\"\271\t\n\010CbPo" +
"licy\022-\n\terrorRate\030\001 \001(\0132\032.v1.CbPolicy.Er" +
"rRateConfig\022-\n\010slowRate\030\002 \001(\0132\033.v1.CbPol" +
"icy.SlowRateConfig\0220\n\rjudgeDuration\030\003 \001(" +
"\0132\031.google.protobuf.Duration\0228\n\022maxEject" +
"ionPercent\030\004 \001(\0132\034.google.protobuf.UInt3" +
"2Value\0226\n\013consecutive\030\005 \001(\0132!.v1.CbPolic" +
"y.ConsecutiveErrConfig\032\212\004\n\rErrRateConfig" +
"\022*\n\006enable\030\001 \001(\0132\032.google.protobuf.BoolV" +
"alue\022<\n\026requestVolumeThreshold\030\002 \001(\0132\034.g" +
"oogle.protobuf.UInt32Value\022:\n\024errorRateT" +
"oPreserved\030\003 \001(\0132\034.google.protobuf.UInt3" +
"2Value\0225\n\017errorRateToOpen\030\004 \001(\0132\034.google" +
".protobuf.UInt32Value\022:\n\010specials\030\005 \003(\0132" +
"(.v1.CbPolicy.ErrRateConfig.SpecialConfi" +
"g\032\337\001\n\rSpecialConfig\022*\n\004type\030\001 \001(\0132\034.goog" +
"le.protobuf.StringValue\022/\n\nerrorCodes\030\002 " +
"\003(\0132\033.google.protobuf.Int64Value\022:\n\024erro" +
"rRateToPreserved\030\003 \001(\0132\034.google.protobuf" +
".UInt32Value\0225\n\017errorRateToOpen\030\004 \001(\0132\034." +
"google.protobuf.UInt32Value\032\327\001\n\016SlowRate" +
"Config\022*\n\006enable\030\001 \001(\0132\032.google.protobuf" +
".BoolValue\022(\n\005maxRt\030\002 \001(\0132\031.google.proto" +
"buf.Duration\0229\n\023slowRateToPreserved\030\003 \001(" +
"\0132\034.google.protobuf.UInt32Value\0224\n\016slowR" +
"ateToOpen\030\004 \001(\0132\034.google.protobuf.UInt32" +
"Value\032\303\001\n\024ConsecutiveErrConfig\022*\n\006enable" +
"\030\001 \001(\0132\032.google.protobuf.BoolValue\022A\n\033co" +
"nsecutiveErrorToPreserved\030\002 \001(\0132\034.google" +
".protobuf.UInt32Value\022<\n\026consecutiveErro" +
"rToOpen\030\003 \001(\0132\034.google.protobuf.UInt32Va" +
"lue\"\370\005\n\016DestinationSet\022-\n\007service\030\001 \001(\0132" +
"\034.google.protobuf.StringValue\022/\n\tnamespa" +
"ce\030\002 \001(\0132\034.google.protobuf.StringValue\0222" +
"\n\010metadata\030\003 \003(\0132 .v1.DestinationSet.Met" +
"adataEntry\022-\n\010resource\030\004 \001(\0162\033.v1.Destin" +
"ationSet.Resource\022%\n\004type\030\005 \001(\0162\027.v1.Des" +
"tinationSet.Type\022\'\n\005scope\030\006 \001(\0162\030.v1.Des" +
"tinationSet.Scope\022/\n\014metricWindow\030\007 \001(\0132" +
"\031.google.protobuf.Duration\0225\n\017metricPrec" +
"ision\030\010 \001(\0132\034.google.protobuf.UInt32Valu" +
"e\0221\n\016updateInterval\030\t \001(\0132\031.google.proto" +
"buf.Duration\022\"\n\007recover\030\n \001(\0132\021.v1.Recov" +
"erConfig\022\034\n\006policy\030\013 \001(\0132\014.v1.CbPolicy\022\037" +
"\n\006method\030\014 \001(\0132\017.v1.MatchString\022/\n\nerror" +
"Codes\030\r \003(\0132\033.google.protobuf.Int64Value" +
"\032@\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022\036\n\005value\030" +
"\002 \001(\0132\017.v1.MatchString:\0028\001\"$\n\010Resource\022\n" +
"\n\006SUBSET\020\000\022\014\n\010INSTANCE\020\001\"\035\n\004Type\022\n\n\006GLOB" +
"AL\020\000\022\t\n\005LOCAL\020\001\"\035\n\005Scope\022\007\n\003ALL\020\000\022\013\n\007CUR" +
"RENT\020\001\"V\n\006CbRule\022\"\n\007sources\030\001 \003(\0132\021.v1.S" +
"ourceMatcher\022(\n\014destinations\030\002 \003(\0132\022.v1." +
"DestinationSet\"\205\002\n\013RuleMatcher\022-\n\006source" +
"\030\001 \001(\0132\035.v1.RuleMatcher.SourceService\0227\n" +
"\013destination\030\002 \001(\0132\".v1.RuleMatcher.Dest" +
"inationService\0323\n\rSourceService\022\017\n\007servi" +
"ce\030\001 \001(\t\022\021\n\tnamespace\030\002 \001(\t\032Y\n\022Destinati" +
"onService\022\017\n\007service\030\001 \001(\t\022\021\n\tnamespace\030" +
"\002 \001(\t\022\037\n\006method\030\003 \001(\0132\017.v1.MatchString\"\367" +
"\003\n\022CircuitBreakerRule\022\n\n\002id\030\001 \001(\t\022\014\n\004nam" +
"e\030\002 \001(\t\022\021\n\tnamespace\030\003 \001(\t\022\016\n\006enable\030\004 \001" +
"(\010\022\020\n\010revision\030\005 \001(\t\022\r\n\005ctime\030\006 \001(\t\022\r\n\005m" +
"time\030\007 \001(\t\022\r\n\005etime\030\010 \001(\t\022\023\n\013description" +
"\030\t \001(\t\022\030\n\005level\030\025 \001(\0162\t.v1.Level\022%\n\014rule" +
"_matcher\030\026 \001(\0132\017.v1.RuleMatcher\022,\n\020error" +
"_conditions\030\027 \003(\0132\022.v1.ErrorCondition\022/\n" +
"\021trigger_condition\030\030 \003(\0132\024.v1.TriggerCon" +
"dition\022\034\n\024max_ejection_percent\030\031 \001(\r\022.\n\020" +
"recoverCondition\030\032 \001(\0132\024.v1.RecoverCondi" +
"tion\0220\n\021faultDetectConfig\030\033 \001(\0132\025.v1.Fau" +
"ltDetectConfig\022*\n\016fallbackConfig\030\034 \001(\0132\022" +
".v1.FallbackConfigJ\004\010\n\020\025\"\231\001\n\016ErrorCondit" +
"ion\0220\n\ninput_type\030\001 \001(\0162\034.v1.ErrorCondit" +
"ion.InputType\022\"\n\tcondition\030\002 \001(\0132\017.v1.Ma" +
"tchString\"1\n\tInputType\022\013\n\007UNKNOWN\020\000\022\014\n\010R" +
"ET_CODE\020\001\022\t\n\005DELAY\020\002\"\344\001\n\020TriggerConditio" +
"n\0226\n\014trigger_type\030\001 \001(\0162 .v1.TriggerCond" +
"ition.TriggerType\022\023\n\013error_count\030\002 \001(\r\022\025" +
"\n\rerror_percent\030\003 \001(\r\022\020\n\010interval\030\004 \001(\r\022" +
"\027\n\017minimum_request\030\005 \001(\r\"A\n\013TriggerType\022" +
"\013\n\007UNKNOWN\020\000\022\016\n\nERROR_RATE\020\001\022\025\n\021CONSECUT" +
"IVE_ERROR\020\002\"D\n\020RecoverCondition\022\024\n\014sleep" +
"_window\030\001 \001(\r\022\032\n\022consecutiveSuccess\030\002 \001(" +
"\r\"#\n\021FaultDetectConfig\022\016\n\006enable\030\001 \001(\010\"H" +
"\n\016FallbackConfig\022\016\n\006enable\030\001 \001(\010\022&\n\010resp" +
"onse\030\002 \001(\0132\024.v1.FallbackResponse\"\220\001\n\020Fal" +
"lbackResponse\022\014\n\004code\030\001 \001(\005\0223\n\007headers\030\002" +
" \003(\0132\".v1.FallbackResponse.MessageHeader" +
"\022\014\n\004body\030\003 \001(\t\032+\n\rMessageHeader\022\013\n\003key\030\001" +
" \001(\t\022\r\n\005value\030\002 \001(\t*F\n\005Level\022\013\n\007UNKNOWN\020" +
"\000\022\013\n\007SERVICE\020\001\022\n\n\006METHOD\020\002\022\t\n\005GROUP\020\003\022\014\n" +
"\010INSTANCE\020\004B\226\001\n8com.tencent.polaris.spec" +
"ification.api.v1.fault.toleranceB\023Circui" +
"tBreakerProtoZEgithub.com/polarismesh/sp" +
"ecification/source/go/api/v1/fault_toler" +
"anceb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.protobuf.WrappersProto.getDescriptor(),
com.google.protobuf.DurationProto.getDescriptor(),
com.tencent.polaris.specification.api.v1.model.ModelProto.getDescriptor(),
});
internal_static_v1_CircuitBreaker_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_v1_CircuitBreaker_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_v1_CircuitBreaker_descriptor,
new java.lang.String[] { "Id", "Version", "Name", "Namespace", "Service", "ServiceNamespace", "Inbounds", "Outbounds", "Token", "Owners", "Business", "Department", "Comment", "Ctime", "Mtime", "Revision", "Rules", });
internal_static_v1_SourceMatcher_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_v1_SourceMatcher_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_v1_SourceMatcher_descriptor,
new java.lang.String[] { "Service", "Namespace", "Labels", });
internal_static_v1_SourceMatcher_LabelsEntry_descriptor =
internal_static_v1_SourceMatcher_descriptor.getNestedTypes().get(0);
internal_static_v1_SourceMatcher_LabelsEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_v1_SourceMatcher_LabelsEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_v1_RecoverConfig_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_v1_RecoverConfig_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_v1_RecoverConfig_descriptor,
new java.lang.String[] { "SleepWindow", "MaxRetryAfterHalfOpen", "RequestRateAfterHalfOpen", "SuccessRateToClose", "RequestCountAfterHalfOpen", "OutlierDetectWhen", });
internal_static_v1_CbPolicy_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_v1_CbPolicy_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_v1_CbPolicy_descriptor,
new java.lang.String[] { "ErrorRate", "SlowRate", "JudgeDuration", "MaxEjectionPercent", "Consecutive", });
internal_static_v1_CbPolicy_ErrRateConfig_descriptor =
internal_static_v1_CbPolicy_descriptor.getNestedTypes().get(0);
internal_static_v1_CbPolicy_ErrRateConfig_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_v1_CbPolicy_ErrRateConfig_descriptor,
new java.lang.String[] { "Enable", "RequestVolumeThreshold", "ErrorRateToPreserved", "ErrorRateToOpen", "Specials", });
internal_static_v1_CbPolicy_ErrRateConfig_SpecialConfig_descriptor =
internal_static_v1_CbPolicy_ErrRateConfig_descriptor.getNestedTypes().get(0);
internal_static_v1_CbPolicy_ErrRateConfig_SpecialConfig_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_v1_CbPolicy_ErrRateConfig_SpecialConfig_descriptor,
new java.lang.String[] { "Type", "ErrorCodes", "ErrorRateToPreserved", "ErrorRateToOpen", });
internal_static_v1_CbPolicy_SlowRateConfig_descriptor =
internal_static_v1_CbPolicy_descriptor.getNestedTypes().get(1);
internal_static_v1_CbPolicy_SlowRateConfig_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_v1_CbPolicy_SlowRateConfig_descriptor,
new java.lang.String[] { "Enable", "MaxRt", "SlowRateToPreserved", "SlowRateToOpen", });
internal_static_v1_CbPolicy_ConsecutiveErrConfig_descriptor =
internal_static_v1_CbPolicy_descriptor.getNestedTypes().get(2);
internal_static_v1_CbPolicy_ConsecutiveErrConfig_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_v1_CbPolicy_ConsecutiveErrConfig_descriptor,
new java.lang.String[] { "Enable", "ConsecutiveErrorToPreserved", "ConsecutiveErrorToOpen", });
internal_static_v1_DestinationSet_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_v1_DestinationSet_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_v1_DestinationSet_descriptor,
new java.lang.String[] { "Service", "Namespace", "Metadata", "Resource", "Type", "Scope", "MetricWindow", "MetricPrecision", "UpdateInterval", "Recover", "Policy", "Method", "ErrorCodes", });
internal_static_v1_DestinationSet_MetadataEntry_descriptor =
internal_static_v1_DestinationSet_descriptor.getNestedTypes().get(0);
internal_static_v1_DestinationSet_MetadataEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_v1_DestinationSet_MetadataEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_v1_CbRule_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_v1_CbRule_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_v1_CbRule_descriptor,
new java.lang.String[] { "Sources", "Destinations", });
internal_static_v1_RuleMatcher_descriptor =
getDescriptor().getMessageTypes().get(6);
internal_static_v1_RuleMatcher_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_v1_RuleMatcher_descriptor,
new java.lang.String[] { "Source", "Destination", });
internal_static_v1_RuleMatcher_SourceService_descriptor =
internal_static_v1_RuleMatcher_descriptor.getNestedTypes().get(0);
internal_static_v1_RuleMatcher_SourceService_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_v1_RuleMatcher_SourceService_descriptor,
new java.lang.String[] { "Service", "Namespace", });
internal_static_v1_RuleMatcher_DestinationService_descriptor =
internal_static_v1_RuleMatcher_descriptor.getNestedTypes().get(1);
internal_static_v1_RuleMatcher_DestinationService_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_v1_RuleMatcher_DestinationService_descriptor,
new java.lang.String[] { "Service", "Namespace", "Method", });
internal_static_v1_CircuitBreakerRule_descriptor =
getDescriptor().getMessageTypes().get(7);
internal_static_v1_CircuitBreakerRule_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_v1_CircuitBreakerRule_descriptor,
new java.lang.String[] { "Id", "Name", "Namespace", "Enable", "Revision", "Ctime", "Mtime", "Etime", "Description", "Level", "RuleMatcher", "ErrorConditions", "TriggerCondition", "MaxEjectionPercent", "RecoverCondition", "FaultDetectConfig", "FallbackConfig", });
internal_static_v1_ErrorCondition_descriptor =
getDescriptor().getMessageTypes().get(8);
internal_static_v1_ErrorCondition_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_v1_ErrorCondition_descriptor,
new java.lang.String[] { "InputType", "Condition", });
internal_static_v1_TriggerCondition_descriptor =
getDescriptor().getMessageTypes().get(9);
internal_static_v1_TriggerCondition_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_v1_TriggerCondition_descriptor,
new java.lang.String[] { "TriggerType", "ErrorCount", "ErrorPercent", "Interval", "MinimumRequest", });
internal_static_v1_RecoverCondition_descriptor =
getDescriptor().getMessageTypes().get(10);
internal_static_v1_RecoverCondition_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_v1_RecoverCondition_descriptor,
new java.lang.String[] { "SleepWindow", "ConsecutiveSuccess", });
internal_static_v1_FaultDetectConfig_descriptor =
getDescriptor().getMessageTypes().get(11);
internal_static_v1_FaultDetectConfig_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_v1_FaultDetectConfig_descriptor,
new java.lang.String[] { "Enable", });
internal_static_v1_FallbackConfig_descriptor =
getDescriptor().getMessageTypes().get(12);
internal_static_v1_FallbackConfig_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_v1_FallbackConfig_descriptor,
new java.lang.String[] { "Enable", "Response", });
internal_static_v1_FallbackResponse_descriptor =
getDescriptor().getMessageTypes().get(13);
internal_static_v1_FallbackResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_v1_FallbackResponse_descriptor,
new java.lang.String[] { "Code", "Headers", "Body", });
internal_static_v1_FallbackResponse_MessageHeader_descriptor =
internal_static_v1_FallbackResponse_descriptor.getNestedTypes().get(0);
internal_static_v1_FallbackResponse_MessageHeader_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_v1_FallbackResponse_MessageHeader_descriptor,
new java.lang.String[] { "Key", "Value", });
com.google.protobuf.WrappersProto.getDescriptor();
com.google.protobuf.DurationProto.getDescriptor();
com.tencent.polaris.specification.api.v1.model.ModelProto.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy