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

package v2alpha

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	_ "github.com/envoyproxy/protoc-gen-validate/validate"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	anypb "google.golang.org/protobuf/types/known/anypb"
	durationpb "google.golang.org/protobuf/types/known/durationpb"
	structpb "google.golang.org/protobuf/types/known/structpb"
	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)
)

type ResourceMonitor struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The name of the resource monitor to instantiate. Must match a registered
	// resource monitor type. The built-in resource monitors are:
	//
	//   - :ref:`envoy.resource_monitors.fixed_heap
	//     <envoy_api_msg_config.resource_monitor.fixed_heap.v2alpha.FixedHeapConfig>`
	//   - :ref:`envoy.resource_monitors.injected_resource
	//     <envoy_api_msg_config.resource_monitor.injected_resource.v2alpha.InjectedResourceConfig>`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Configuration for the resource monitor being instantiated.
	//
	// Types that are valid to be assigned to ConfigType:
	//
	//	*ResourceMonitor_Config
	//	*ResourceMonitor_TypedConfig
	ConfigType    isResourceMonitor_ConfigType `protobuf_oneof:"config_type"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ResourceMonitor) ProtoMessage() {}

func (x *ResourceMonitor) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_config_overload_v2alpha_overload_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 ResourceMonitor.ProtoReflect.Descriptor instead.
func (*ResourceMonitor) Descriptor() ([]byte, []int) {
	return file_envoy_config_overload_v2alpha_overload_proto_rawDescGZIP(), []int{0}
}

func (x *ResourceMonitor) GetName() string {
	if x != nil {
		return x.Name
	}
	return ""
}

func (x *ResourceMonitor) GetConfigType() isResourceMonitor_ConfigType {
	if x != nil {
		return x.ConfigType
	}
	return nil
}

// Deprecated: Marked as deprecated in envoy/config/overload/v2alpha/overload.proto.
func (x *ResourceMonitor) GetConfig() *structpb.Struct {
	if x != nil {
		if x, ok := x.ConfigType.(*ResourceMonitor_Config); ok {
			return x.Config
		}
	}
	return nil
}

func (x *ResourceMonitor) GetTypedConfig() *anypb.Any {
	if x != nil {
		if x, ok := x.ConfigType.(*ResourceMonitor_TypedConfig); ok {
			return x.TypedConfig
		}
	}
	return nil
}

type isResourceMonitor_ConfigType interface {
	isResourceMonitor_ConfigType()
}

type ResourceMonitor_Config struct {
	// Deprecated: Marked as deprecated in envoy/config/overload/v2alpha/overload.proto.
	Config *structpb.Struct `protobuf:"bytes,2,opt,name=config,proto3,oneof"`
}

type ResourceMonitor_TypedConfig struct {
	TypedConfig *anypb.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"`
}

func (*ResourceMonitor_Config) isResourceMonitor_ConfigType() {}

func (*ResourceMonitor_TypedConfig) isResourceMonitor_ConfigType() {}

type ThresholdTrigger struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// If the resource pressure is greater than or equal to this value, the trigger
	// will fire.
	Value         float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ThresholdTrigger) ProtoMessage() {}

func (x *ThresholdTrigger) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_config_overload_v2alpha_overload_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 ThresholdTrigger.ProtoReflect.Descriptor instead.
func (*ThresholdTrigger) Descriptor() ([]byte, []int) {
	return file_envoy_config_overload_v2alpha_overload_proto_rawDescGZIP(), []int{1}
}

func (x *ThresholdTrigger) GetValue() float64 {
	if x != nil {
		return x.Value
	}
	return 0
}

type Trigger struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The name of the resource this is a trigger for.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Types that are valid to be assigned to TriggerOneof:
	//
	//	*Trigger_Threshold
	TriggerOneof  isTrigger_TriggerOneof `protobuf_oneof:"trigger_oneof"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Trigger) ProtoMessage() {}

func (x *Trigger) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_config_overload_v2alpha_overload_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 Trigger.ProtoReflect.Descriptor instead.
func (*Trigger) Descriptor() ([]byte, []int) {
	return file_envoy_config_overload_v2alpha_overload_proto_rawDescGZIP(), []int{2}
}

func (x *Trigger) GetName() string {
	if x != nil {
		return x.Name
	}
	return ""
}

func (x *Trigger) GetTriggerOneof() isTrigger_TriggerOneof {
	if x != nil {
		return x.TriggerOneof
	}
	return nil
}

func (x *Trigger) GetThreshold() *ThresholdTrigger {
	if x != nil {
		if x, ok := x.TriggerOneof.(*Trigger_Threshold); ok {
			return x.Threshold
		}
	}
	return nil
}

type isTrigger_TriggerOneof interface {
	isTrigger_TriggerOneof()
}

type Trigger_Threshold struct {
	Threshold *ThresholdTrigger `protobuf:"bytes,2,opt,name=threshold,proto3,oneof"`
}

func (*Trigger_Threshold) isTrigger_TriggerOneof() {}

type OverloadAction struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The name of the overload action. This is just a well-known string that listeners can
	// use for registering callbacks. Custom overload actions should be named using reverse
	// DNS to ensure uniqueness.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// A set of triggers for this action. If any of these triggers fire the overload action
	// is activated. Listeners are notified when the overload action transitions from
	// inactivated to activated, or vice versa.
	Triggers      []*Trigger `protobuf:"bytes,2,rep,name=triggers,proto3" json:"triggers,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *OverloadAction) Reset() {
	*x = OverloadAction{}
	mi := &file_envoy_config_overload_v2alpha_overload_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*OverloadAction) ProtoMessage() {}

func (x *OverloadAction) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_config_overload_v2alpha_overload_proto_msgTypes[3]
	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 OverloadAction.ProtoReflect.Descriptor instead.
func (*OverloadAction) Descriptor() ([]byte, []int) {
	return file_envoy_config_overload_v2alpha_overload_proto_rawDescGZIP(), []int{3}
}

func (x *OverloadAction) GetName() string {
	if x != nil {
		return x.Name
	}
	return ""
}

func (x *OverloadAction) GetTriggers() []*Trigger {
	if x != nil {
		return x.Triggers
	}
	return nil
}

type OverloadManager struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The interval for refreshing resource usage.
	RefreshInterval *durationpb.Duration `protobuf:"bytes,1,opt,name=refresh_interval,json=refreshInterval,proto3" json:"refresh_interval,omitempty"`
	// The set of resources to monitor.
	ResourceMonitors []*ResourceMonitor `protobuf:"bytes,2,rep,name=resource_monitors,json=resourceMonitors,proto3" json:"resource_monitors,omitempty"`
	// The set of overload actions.
	Actions       []*OverloadAction `protobuf:"bytes,3,rep,name=actions,proto3" json:"actions,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *OverloadManager) Reset() {
	*x = OverloadManager{}
	mi := &file_envoy_config_overload_v2alpha_overload_proto_msgTypes[4]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*OverloadManager) ProtoMessage() {}

func (x *OverloadManager) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_config_overload_v2alpha_overload_proto_msgTypes[4]
	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 OverloadManager.ProtoReflect.Descriptor instead.
func (*OverloadManager) Descriptor() ([]byte, []int) {
	return file_envoy_config_overload_v2alpha_overload_proto_rawDescGZIP(), []int{4}
}

func (x *OverloadManager) GetRefreshInterval() *durationpb.Duration {
	if x != nil {
		return x.RefreshInterval
	}
	return nil
}

func (x *OverloadManager) GetResourceMonitors() []*ResourceMonitor {
	if x != nil {
		return x.ResourceMonitors
	}
	return nil
}

func (x *OverloadManager) GetActions() []*OverloadAction {
	if x != nil {
		return x.Actions
	}
	return nil
}

var File_envoy_config_overload_v2alpha_overload_proto protoreflect.FileDescriptor

const file_envoy_config_overload_v2alpha_overload_proto_rawDesc = "" +
	"\n" +
	",envoy/config/overload/v2alpha/overload.proto\x12\x1denvoy.config.overload.v2alpha\x1a\x19google/protobuf/any.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\xaf\x01\n" +
	"\x0fResourceMonitor\x12\x1b\n" +
	"\x04name\x18\x01 \x01(\tB\a\xfaB\x04r\x02 \x01R\x04name\x125\n" +
	"\x06config\x18\x02 \x01(\v2\x17.google.protobuf.StructB\x02\x18\x01H\x00R\x06config\x129\n" +
	"\ftyped_config\x18\x03 \x01(\v2\x14.google.protobuf.AnyH\x00R\vtypedConfigB\r\n" +
	"\vconfig_type\"A\n" +
	"\x10ThresholdTrigger\x12-\n" +
	"\x05value\x18\x01 \x01(\x01B\x17\xfaB\x14\x12\x12\x19\x00\x00\x00\x00\x00\x00\xf0?)\x00\x00\x00\x00\x00\x00\x00\x00R\x05value\"\x8d\x01\n" +
	"\aTrigger\x12\x1b\n" +
	"\x04name\x18\x01 \x01(\tB\a\xfaB\x04r\x02 \x01R\x04name\x12O\n" +
	"\tthreshold\x18\x02 \x01(\v2/.envoy.config.overload.v2alpha.ThresholdTriggerH\x00R\tthresholdB\x14\n" +
	"\rtrigger_oneof\x12\x03\xf8B\x01\"{\n" +
	"\x0eOverloadAction\x12\x1b\n" +
	"\x04name\x18\x01 \x01(\tB\a\xfaB\x04r\x02 \x01R\x04name\x12L\n" +
	"\btriggers\x18\x02 \x03(\v2&.envoy.config.overload.v2alpha.TriggerB\b\xfaB\x05\x92\x01\x02\b\x01R\btriggers\"\x87\x02\n" +
	"\x0fOverloadManager\x12D\n" +
	"\x10refresh_interval\x18\x01 \x01(\v2\x19.google.protobuf.DurationR\x0frefreshInterval\x12e\n" +
	"\x11resource_monitors\x18\x02 \x03(\v2..envoy.config.overload.v2alpha.ResourceMonitorB\b\xfaB\x05\x92\x01\x02\b\x01R\x10resourceMonitors\x12G\n" +
	"\aactions\x18\x03 \x03(\v2-.envoy.config.overload.v2alpha.OverloadActionR\aactionsB\x8c\x01\xba\x80\xc8\xd1\x06\x02\x10\x01\n" +
	"+io.envoyproxy.envoy.config.overload.v2alphaB\rOverloadProtoP\x01ZDgithub.com/envoyproxy/go-control-plane/envoy/config/overload/v2alphab\x06proto3"

var (
	file_envoy_config_overload_v2alpha_overload_proto_rawDescOnce sync.Once
	file_envoy_config_overload_v2alpha_overload_proto_rawDescData []byte
)

func file_envoy_config_overload_v2alpha_overload_proto_rawDescGZIP() []byte {
	file_envoy_config_overload_v2alpha_overload_proto_rawDescOnce.Do(func() {
		file_envoy_config_overload_v2alpha_overload_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_config_overload_v2alpha_overload_proto_rawDesc), len(file_envoy_config_overload_v2alpha_overload_proto_rawDesc)))
	})
	return file_envoy_config_overload_v2alpha_overload_proto_rawDescData
}

var file_envoy_config_overload_v2alpha_overload_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_envoy_config_overload_v2alpha_overload_proto_goTypes = []any{
	(*ResourceMonitor)(nil),     // 0: envoy.config.overload.v2alpha.ResourceMonitor
	(*ThresholdTrigger)(nil),    // 1: envoy.config.overload.v2alpha.ThresholdTrigger
	(*Trigger)(nil),             // 2: envoy.config.overload.v2alpha.Trigger
	(*OverloadAction)(nil),      // 3: envoy.config.overload.v2alpha.OverloadAction
	(*OverloadManager)(nil),     // 4: envoy.config.overload.v2alpha.OverloadManager
	(*structpb.Struct)(nil),     // 5: google.protobuf.Struct
	(*anypb.Any)(nil),           // 6: google.protobuf.Any
	(*durationpb.Duration)(nil), // 7: google.protobuf.Duration
}
var file_envoy_config_overload_v2alpha_overload_proto_depIdxs = []int32{
	5, // 0: envoy.config.overload.v2alpha.ResourceMonitor.config:type_name -> google.protobuf.Struct
	6, // 1: envoy.config.overload.v2alpha.ResourceMonitor.typed_config:type_name -> google.protobuf.Any
	1, // 2: envoy.config.overload.v2alpha.Trigger.threshold:type_name -> envoy.config.overload.v2alpha.ThresholdTrigger
	2, // 3: envoy.config.overload.v2alpha.OverloadAction.triggers:type_name -> envoy.config.overload.v2alpha.Trigger
	7, // 4: envoy.config.overload.v2alpha.OverloadManager.refresh_interval:type_name -> google.protobuf.Duration
	0, // 5: envoy.config.overload.v2alpha.OverloadManager.resource_monitors:type_name -> envoy.config.overload.v2alpha.ResourceMonitor
	3, // 6: envoy.config.overload.v2alpha.OverloadManager.actions:type_name -> envoy.config.overload.v2alpha.OverloadAction
	7, // [7:7] is the sub-list for method output_type
	7, // [7:7] is the sub-list for method input_type
	7, // [7:7] is the sub-list for extension type_name
	7, // [7:7] is the sub-list for extension extendee
	0, // [0:7] is the sub-list for field type_name
}

func init() { file_envoy_config_overload_v2alpha_overload_proto_init() }
func file_envoy_config_overload_v2alpha_overload_proto_init() {
	if File_envoy_config_overload_v2alpha_overload_proto != nil {
		return
	}
	file_envoy_config_overload_v2alpha_overload_proto_msgTypes[0].OneofWrappers = []any{
		(*ResourceMonitor_Config)(nil),
		(*ResourceMonitor_TypedConfig)(nil),
	}
	file_envoy_config_overload_v2alpha_overload_proto_msgTypes[2].OneofWrappers = []any{
		(*Trigger_Threshold)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_config_overload_v2alpha_overload_proto_rawDesc), len(file_envoy_config_overload_v2alpha_overload_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   5,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_config_overload_v2alpha_overload_proto_goTypes,
		DependencyIndexes: file_envoy_config_overload_v2alpha_overload_proto_depIdxs,
		MessageInfos:      file_envoy_config_overload_v2alpha_overload_proto_msgTypes,
	}.Build()
	File_envoy_config_overload_v2alpha_overload_proto = out.File
	file_envoy_config_overload_v2alpha_overload_proto_goTypes = nil
	file_envoy_config_overload_v2alpha_overload_proto_depIdxs = nil
}
