// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v7.35.1
// source: envoy/api/v2/cluster/circuit_breaker.proto

package cluster

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
	_type "github.com/envoyproxy/go-control-plane/envoy/type"
	_ "github.com/envoyproxy/protoc-gen-validate/validate"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// :ref:`Circuit breaking<arch_overview_circuit_break>` settings can be
// specified individually for each defined priority.
type CircuitBreakers struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>`
	// are defined with the same :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`,
	// the first one in the list is used. If no Thresholds is defined for a given
	// :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`, the default values
	// are used.
	Thresholds    []*CircuitBreakers_Thresholds `protobuf:"bytes,1,rep,name=thresholds,proto3" json:"thresholds,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *CircuitBreakers) Reset() {
	*x = CircuitBreakers{}
	mi := &file_envoy_api_v2_cluster_circuit_breaker_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *CircuitBreakers) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*CircuitBreakers) ProtoMessage() {}

func (x *CircuitBreakers) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_api_v2_cluster_circuit_breaker_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use CircuitBreakers.ProtoReflect.Descriptor instead.
func (*CircuitBreakers) Descriptor() ([]byte, []int) {
	return file_envoy_api_v2_cluster_circuit_breaker_proto_rawDescGZIP(), []int{0}
}

func (x *CircuitBreakers) GetThresholds() []*CircuitBreakers_Thresholds {
	if x != nil {
		return x.Thresholds
	}
	return nil
}

// A Thresholds defines CircuitBreaker settings for a
// :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`.
// [#next-free-field: 9]
type CircuitBreakers_Thresholds struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The :ref:`RoutingPriority<envoy_api_enum_core.RoutingPriority>`
	// the specified CircuitBreaker settings apply to.
	Priority core.RoutingPriority `protobuf:"varint,1,opt,name=priority,proto3,enum=envoy.api.v2.core.RoutingPriority" json:"priority,omitempty"`
	// The maximum number of connections that Envoy will make to the upstream
	// cluster. If not specified, the default is 1024.
	MaxConnections *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=max_connections,json=maxConnections,proto3" json:"max_connections,omitempty"`
	// The maximum number of pending requests that Envoy will allow to the
	// upstream cluster. If not specified, the default is 1024.
	MaxPendingRequests *wrapperspb.UInt32Value `protobuf:"bytes,3,opt,name=max_pending_requests,json=maxPendingRequests,proto3" json:"max_pending_requests,omitempty"`
	// The maximum number of parallel requests that Envoy will make to the
	// upstream cluster. If not specified, the default is 1024.
	MaxRequests *wrapperspb.UInt32Value `protobuf:"bytes,4,opt,name=max_requests,json=maxRequests,proto3" json:"max_requests,omitempty"`
	// The maximum number of parallel retries that Envoy will allow to the
	// upstream cluster. If not specified, the default is 3.
	MaxRetries *wrapperspb.UInt32Value `protobuf:"bytes,5,opt,name=max_retries,json=maxRetries,proto3" json:"max_retries,omitempty"`
	// Specifies a limit on concurrent retries in relation to the number of active requests. This
	// parameter is optional.
	//
	// .. note::
	//
	//	If this field is set, the retry budget will override any configured retry circuit
	//	breaker.
	RetryBudget *CircuitBreakers_Thresholds_RetryBudget `protobuf:"bytes,8,opt,name=retry_budget,json=retryBudget,proto3" json:"retry_budget,omitempty"`
	// If track_remaining is true, then stats will be published that expose
	// the number of resources remaining until the circuit breakers open. If
	// not specified, the default is false.
	//
	// .. note::
	//
	//	If a retry budget is used in lieu of the max_retries circuit breaker,
	//	the remaining retry resources remaining will not be tracked.
	TrackRemaining bool `protobuf:"varint,6,opt,name=track_remaining,json=trackRemaining,proto3" json:"track_remaining,omitempty"`
	// The maximum number of connection pools per cluster that Envoy will concurrently support at
	// once. If not specified, the default is unlimited. Set this for clusters which create a
	// large number of connection pools. See
	// :ref:`Circuit Breaking <arch_overview_circuit_break_cluster_maximum_connection_pools>` for
	// more details.
	MaxConnectionPools *wrapperspb.UInt32Value `protobuf:"bytes,7,opt,name=max_connection_pools,json=maxConnectionPools,proto3" json:"max_connection_pools,omitempty"`
	unknownFields      protoimpl.UnknownFields
	sizeCache          protoimpl.SizeCache
}

func (x *CircuitBreakers_Thresholds) Reset() {
	*x = CircuitBreakers_Thresholds{}
	mi := &file_envoy_api_v2_cluster_circuit_breaker_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *CircuitBreakers_Thresholds) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*CircuitBreakers_Thresholds) ProtoMessage() {}

func (x *CircuitBreakers_Thresholds) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_api_v2_cluster_circuit_breaker_proto_msgTypes[1]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use CircuitBreakers_Thresholds.ProtoReflect.Descriptor instead.
func (*CircuitBreakers_Thresholds) Descriptor() ([]byte, []int) {
	return file_envoy_api_v2_cluster_circuit_breaker_proto_rawDescGZIP(), []int{0, 0}
}

func (x *CircuitBreakers_Thresholds) GetPriority() core.RoutingPriority {
	if x != nil {
		return x.Priority
	}
	return core.RoutingPriority(0)
}

func (x *CircuitBreakers_Thresholds) GetMaxConnections() *wrapperspb.UInt32Value {
	if x != nil {
		return x.MaxConnections
	}
	return nil
}

func (x *CircuitBreakers_Thresholds) GetMaxPendingRequests() *wrapperspb.UInt32Value {
	if x != nil {
		return x.MaxPendingRequests
	}
	return nil
}

func (x *CircuitBreakers_Thresholds) GetMaxRequests() *wrapperspb.UInt32Value {
	if x != nil {
		return x.MaxRequests
	}
	return nil
}

func (x *CircuitBreakers_Thresholds) GetMaxRetries() *wrapperspb.UInt32Value {
	if x != nil {
		return x.MaxRetries
	}
	return nil
}

func (x *CircuitBreakers_Thresholds) GetRetryBudget() *CircuitBreakers_Thresholds_RetryBudget {
	if x != nil {
		return x.RetryBudget
	}
	return nil
}

func (x *CircuitBreakers_Thresholds) GetTrackRemaining() bool {
	if x != nil {
		return x.TrackRemaining
	}
	return false
}

func (x *CircuitBreakers_Thresholds) GetMaxConnectionPools() *wrapperspb.UInt32Value {
	if x != nil {
		return x.MaxConnectionPools
	}
	return nil
}

type CircuitBreakers_Thresholds_RetryBudget struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Specifies the limit on concurrent retries as a percentage of the sum of active requests and
	// active pending requests. For example, if there are 100 active requests and the
	// budget_percent is set to 25, there may be 25 active retries.
	//
	// This parameter is optional. Defaults to 20%.
	BudgetPercent *_type.Percent `protobuf:"bytes,1,opt,name=budget_percent,json=budgetPercent,proto3" json:"budget_percent,omitempty"`
	// Specifies the minimum retry concurrency allowed for the retry budget. The limit on the
	// number of active retries may never go below this number.
	//
	// This parameter is optional. Defaults to 3.
	MinRetryConcurrency *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=min_retry_concurrency,json=minRetryConcurrency,proto3" json:"min_retry_concurrency,omitempty"`
	unknownFields       protoimpl.UnknownFields
	sizeCache           protoimpl.SizeCache
}

func (x *CircuitBreakers_Thresholds_RetryBudget) Reset() {
	*x = CircuitBreakers_Thresholds_RetryBudget{}
	mi := &file_envoy_api_v2_cluster_circuit_breaker_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *CircuitBreakers_Thresholds_RetryBudget) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*CircuitBreakers_Thresholds_RetryBudget) ProtoMessage() {}

func (x *CircuitBreakers_Thresholds_RetryBudget) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_api_v2_cluster_circuit_breaker_proto_msgTypes[2]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use CircuitBreakers_Thresholds_RetryBudget.ProtoReflect.Descriptor instead.
func (*CircuitBreakers_Thresholds_RetryBudget) Descriptor() ([]byte, []int) {
	return file_envoy_api_v2_cluster_circuit_breaker_proto_rawDescGZIP(), []int{0, 0, 0}
}

func (x *CircuitBreakers_Thresholds_RetryBudget) GetBudgetPercent() *_type.Percent {
	if x != nil {
		return x.BudgetPercent
	}
	return nil
}

func (x *CircuitBreakers_Thresholds_RetryBudget) GetMinRetryConcurrency() *wrapperspb.UInt32Value {
	if x != nil {
		return x.MinRetryConcurrency
	}
	return nil
}

var File_envoy_api_v2_cluster_circuit_breaker_proto protoreflect.FileDescriptor

const file_envoy_api_v2_cluster_circuit_breaker_proto_rawDesc = "" +
	"\n" +
	"*envoy/api/v2/cluster/circuit_breaker.proto\x12\x14envoy.api.v2.cluster\x1a\x1cenvoy/api/v2/core/base.proto\x1a\x18envoy/type/percent.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1eudpa/annotations/migrate.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\xcb\x06\n" +
	"\x0fCircuitBreakers\x12P\n" +
	"\n" +
	"thresholds\x18\x01 \x03(\v20.envoy.api.v2.cluster.CircuitBreakers.ThresholdsR\n" +
	"thresholds\x1a\xe5\x05\n" +
	"\n" +
	"Thresholds\x12H\n" +
	"\bpriority\x18\x01 \x01(\x0e2\".envoy.api.v2.core.RoutingPriorityB\b\xfaB\x05\x82\x01\x02\x10\x01R\bpriority\x12E\n" +
	"\x0fmax_connections\x18\x02 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x0emaxConnections\x12N\n" +
	"\x14max_pending_requests\x18\x03 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x12maxPendingRequests\x12?\n" +
	"\fmax_requests\x18\x04 \x01(\v2\x1c.google.protobuf.UInt32ValueR\vmaxRequests\x12=\n" +
	"\vmax_retries\x18\x05 \x01(\v2\x1c.google.protobuf.UInt32ValueR\n" +
	"maxRetries\x12_\n" +
	"\fretry_budget\x18\b \x01(\v2<.envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudgetR\vretryBudget\x12'\n" +
	"\x0ftrack_remaining\x18\x06 \x01(\bR\x0etrackRemaining\x12N\n" +
	"\x14max_connection_pools\x18\a \x01(\v2\x1c.google.protobuf.UInt32ValueR\x12maxConnectionPools\x1a\x9b\x01\n" +
	"\vRetryBudget\x12:\n" +
	"\x0ebudget_percent\x18\x01 \x01(\v2\x13.envoy.type.PercentR\rbudgetPercent\x12P\n" +
	"\x15min_retry_concurrency\x18\x02 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x13minRetryConcurrencyB\xd4\x01\xf2\x98\xfe\x8f\x05\x19\x12\x17envoy.config.cluster.v3\xba\x80\xc8\xd1\x06\x02\x10\x01\n" +
	"\"io.envoyproxy.envoy.api.v2.clusterB\x13CircuitBreakerProtoP\x01Z;github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster\xaa\x02\x16Envoy.Api.V2.ClusterNS\xea\x02\x19Envoy::Api::V2::ClusterNSb\x06proto3"

var (
	file_envoy_api_v2_cluster_circuit_breaker_proto_rawDescOnce sync.Once
	file_envoy_api_v2_cluster_circuit_breaker_proto_rawDescData []byte
)

func file_envoy_api_v2_cluster_circuit_breaker_proto_rawDescGZIP() []byte {
	file_envoy_api_v2_cluster_circuit_breaker_proto_rawDescOnce.Do(func() {
		file_envoy_api_v2_cluster_circuit_breaker_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_api_v2_cluster_circuit_breaker_proto_rawDesc), len(file_envoy_api_v2_cluster_circuit_breaker_proto_rawDesc)))
	})
	return file_envoy_api_v2_cluster_circuit_breaker_proto_rawDescData
}

var file_envoy_api_v2_cluster_circuit_breaker_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_envoy_api_v2_cluster_circuit_breaker_proto_goTypes = []any{
	(*CircuitBreakers)(nil),                        // 0: envoy.api.v2.cluster.CircuitBreakers
	(*CircuitBreakers_Thresholds)(nil),             // 1: envoy.api.v2.cluster.CircuitBreakers.Thresholds
	(*CircuitBreakers_Thresholds_RetryBudget)(nil), // 2: envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget
	(core.RoutingPriority)(0),                      // 3: envoy.api.v2.core.RoutingPriority
	(*wrapperspb.UInt32Value)(nil),                 // 4: google.protobuf.UInt32Value
	(*_type.Percent)(nil),                          // 5: envoy.type.Percent
}
var file_envoy_api_v2_cluster_circuit_breaker_proto_depIdxs = []int32{
	1,  // 0: envoy.api.v2.cluster.CircuitBreakers.thresholds:type_name -> envoy.api.v2.cluster.CircuitBreakers.Thresholds
	3,  // 1: envoy.api.v2.cluster.CircuitBreakers.Thresholds.priority:type_name -> envoy.api.v2.core.RoutingPriority
	4,  // 2: envoy.api.v2.cluster.CircuitBreakers.Thresholds.max_connections:type_name -> google.protobuf.UInt32Value
	4,  // 3: envoy.api.v2.cluster.CircuitBreakers.Thresholds.max_pending_requests:type_name -> google.protobuf.UInt32Value
	4,  // 4: envoy.api.v2.cluster.CircuitBreakers.Thresholds.max_requests:type_name -> google.protobuf.UInt32Value
	4,  // 5: envoy.api.v2.cluster.CircuitBreakers.Thresholds.max_retries:type_name -> google.protobuf.UInt32Value
	2,  // 6: envoy.api.v2.cluster.CircuitBreakers.Thresholds.retry_budget:type_name -> envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget
	4,  // 7: envoy.api.v2.cluster.CircuitBreakers.Thresholds.max_connection_pools:type_name -> google.protobuf.UInt32Value
	5,  // 8: envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget.budget_percent:type_name -> envoy.type.Percent
	4,  // 9: envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget.min_retry_concurrency:type_name -> google.protobuf.UInt32Value
	10, // [10:10] is the sub-list for method output_type
	10, // [10:10] is the sub-list for method input_type
	10, // [10:10] is the sub-list for extension type_name
	10, // [10:10] is the sub-list for extension extendee
	0,  // [0:10] is the sub-list for field type_name
}

func init() { file_envoy_api_v2_cluster_circuit_breaker_proto_init() }
func file_envoy_api_v2_cluster_circuit_breaker_proto_init() {
	if File_envoy_api_v2_cluster_circuit_breaker_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_api_v2_cluster_circuit_breaker_proto_rawDesc), len(file_envoy_api_v2_cluster_circuit_breaker_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_api_v2_cluster_circuit_breaker_proto_goTypes,
		DependencyIndexes: file_envoy_api_v2_cluster_circuit_breaker_proto_depIdxs,
		MessageInfos:      file_envoy_api_v2_cluster_circuit_breaker_proto_msgTypes,
	}.Build()
	File_envoy_api_v2_cluster_circuit_breaker_proto = out.File
	file_envoy_api_v2_cluster_circuit_breaker_proto_goTypes = nil
	file_envoy_api_v2_cluster_circuit_breaker_proto_depIdxs = nil
}
