// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v6.33.2
// source: envoy/config/cluster/v3/circuit_breaker.proto

package clusterv3

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
	v31 "github.com/envoyproxy/go-control-plane/envoy/type/v3"
	_ "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_v3_api_msg_config.cluster.v3.CircuitBreakers.Thresholds>`
	// are defined with the same :ref:`RoutingPriority<envoy_v3_api_enum_config.core.v3.RoutingPriority>`,
	// the first one in the list is used. If no Thresholds is defined for a given
	// :ref:`RoutingPriority<envoy_v3_api_enum_config.core.v3.RoutingPriority>`, the default values
	// are used.
	Thresholds []*CircuitBreakers_Thresholds `protobuf:"bytes,1,rep,name=thresholds,proto3" json:"thresholds,omitempty"`
	// Optional per-host limits which apply to each individual host in a cluster.
	//
	// .. note::
	//
	//	currently only the :ref:`max_connections
	//	<envoy_v3_api_field_config.cluster.v3.CircuitBreakers.Thresholds.max_connections>` field is supported for per-host limits.
	//
	// If multiple per-host :ref:`Thresholds<envoy_v3_api_msg_config.cluster.v3.CircuitBreakers.Thresholds>`
	// are defined with the same :ref:`RoutingPriority<envoy_v3_api_enum_config.core.v3.RoutingPriority>`,
	// the first one in the list is used. If no per-host Thresholds are defined for a given
	// :ref:`RoutingPriority<envoy_v3_api_enum_config.core.v3.RoutingPriority>`,
	// the cluster will not have per-host limits.
	PerHostThresholds []*CircuitBreakers_Thresholds `protobuf:"bytes,2,rep,name=per_host_thresholds,json=perHostThresholds,proto3" json:"per_host_thresholds,omitempty"`
	unknownFields     protoimpl.UnknownFields
	sizeCache         protoimpl.SizeCache
}

func (x *CircuitBreakers) Reset() {
	*x = CircuitBreakers{}
	mi := &file_envoy_config_cluster_v3_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_config_cluster_v3_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_config_cluster_v3_circuit_breaker_proto_rawDescGZIP(), []int{0}
}

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

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

// A Thresholds defines CircuitBreaker settings for a
// :ref:`RoutingPriority<envoy_v3_api_enum_config.core.v3.RoutingPriority>`.
// [#next-free-field: 9]
type CircuitBreakers_Thresholds struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The :ref:`RoutingPriority<envoy_v3_api_enum_config.core.v3.RoutingPriority>`
	// the specified CircuitBreaker settings apply to.
	Priority v3.RoutingPriority `protobuf:"varint,1,opt,name=priority,proto3,enum=envoy.config.core.v3.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.
	// This limit is applied as a connection limit for non-HTTP traffic.
	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.
	// This limit does not apply to non-HTTP traffic.
	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_config_cluster_v3_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_config_cluster_v3_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_config_cluster_v3_circuit_breaker_proto_rawDescGZIP(), []int{0, 0}
}

func (x *CircuitBreakers_Thresholds) GetPriority() v3.RoutingPriority {
	if x != nil {
		return x.Priority
	}
	return v3.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 *v31.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_config_cluster_v3_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_config_cluster_v3_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_config_cluster_v3_circuit_breaker_proto_rawDescGZIP(), []int{0, 0, 0}
}

func (x *CircuitBreakers_Thresholds_RetryBudget) GetBudgetPercent() *v31.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_config_cluster_v3_circuit_breaker_proto protoreflect.FileDescriptor

const file_envoy_config_cluster_v3_circuit_breaker_proto_rawDesc = "" +
	"\n" +
	"-envoy/config/cluster/v3/circuit_breaker.proto\x12\x17envoy.config.cluster.v3\x1a\x1fenvoy/config/core/v3/base.proto\x1a\x1benvoy/type/v3/percent.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1dudpa/annotations/status.proto\x1a!udpa/annotations/versioning.proto\x1a\x17validate/validate.proto\"\xe5\b\n" +
	"\x0fCircuitBreakers\x12S\n" +
	"\n" +
	"thresholds\x18\x01 \x03(\v23.envoy.config.cluster.v3.CircuitBreakers.ThresholdsR\n" +
	"thresholds\x12c\n" +
	"\x13per_host_thresholds\x18\x02 \x03(\v23.envoy.config.cluster.v3.CircuitBreakers.ThresholdsR\x11perHostThresholds\x1a\xea\x06\n" +
	"\n" +
	"Thresholds\x12K\n" +
	"\bpriority\x18\x01 \x01(\x0e2%.envoy.config.core.v3.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\x12b\n" +
	"\fretry_budget\x18\b \x01(\v2?.envoy.config.cluster.v3.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\xe2\x01\n" +
	"\vRetryBudget\x12=\n" +
	"\x0ebudget_percent\x18\x01 \x01(\v2\x16.envoy.type.v3.PercentR\rbudgetPercent\x12P\n" +
	"\x15min_retry_concurrency\x18\x02 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x13minRetryConcurrency:B\x9aň\x1e=\n" +
	";envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget:6\x9aň\x1e1\n" +
	"/envoy.api.v2.cluster.CircuitBreakers.Thresholds:+\x9aň\x1e&\n" +
	"$envoy.api.v2.cluster.CircuitBreakersB\x90\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	"%io.envoyproxy.envoy.config.cluster.v3B\x13CircuitBreakerProtoP\x01ZHgithub.com/envoyproxy/go-control-plane/envoy/config/cluster/v3;clusterv3b\x06proto3"

var (
	file_envoy_config_cluster_v3_circuit_breaker_proto_rawDescOnce sync.Once
	file_envoy_config_cluster_v3_circuit_breaker_proto_rawDescData []byte
)

func file_envoy_config_cluster_v3_circuit_breaker_proto_rawDescGZIP() []byte {
	file_envoy_config_cluster_v3_circuit_breaker_proto_rawDescOnce.Do(func() {
		file_envoy_config_cluster_v3_circuit_breaker_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_config_cluster_v3_circuit_breaker_proto_rawDesc), len(file_envoy_config_cluster_v3_circuit_breaker_proto_rawDesc)))
	})
	return file_envoy_config_cluster_v3_circuit_breaker_proto_rawDescData
}

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

func init() { file_envoy_config_cluster_v3_circuit_breaker_proto_init() }
func file_envoy_config_cluster_v3_circuit_breaker_proto_init() {
	if File_envoy_config_cluster_v3_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_config_cluster_v3_circuit_breaker_proto_rawDesc), len(file_envoy_config_cluster_v3_circuit_breaker_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_config_cluster_v3_circuit_breaker_proto_goTypes,
		DependencyIndexes: file_envoy_config_cluster_v3_circuit_breaker_proto_depIdxs,
		MessageInfos:      file_envoy_config_cluster_v3_circuit_breaker_proto_msgTypes,
	}.Build()
	File_envoy_config_cluster_v3_circuit_breaker_proto = out.File
	file_envoy_config_cluster_v3_circuit_breaker_proto_goTypes = nil
	file_envoy_config_cluster_v3_circuit_breaker_proto_depIdxs = nil
}
