// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v7.35.1
// source: envoy/config/filter/thrift/rate_limit/v2alpha1/rate_limit.proto

package v2alpha1

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

// [#next-free-field: 6]
type RateLimit struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The rate limit domain to use in the rate limit service request.
	Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
	// Specifies the rate limit configuration stage. Each configured rate limit filter performs a
	// rate limit check using descriptors configured in the
	// :ref:`envoy_api_msg_config.filter.network.thrift_proxy.v2alpha1.RouteAction` for the request.
	// Only those entries with a matching stage number are used for a given filter. If not set, the
	// default stage number is 0.
	//
	// .. note::
	//
	//	The filter supports a range of 0 - 10 inclusively for stage numbers.
	Stage uint32 `protobuf:"varint,2,opt,name=stage,proto3" json:"stage,omitempty"`
	// The timeout in milliseconds for the rate limit service RPC. If not
	// set, this defaults to 20ms.
	Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// The filter's behaviour in case the rate limiting service does
	// not respond back. When it is set to true, Envoy will not allow traffic in case of
	// communication failure between rate limiting service and the proxy.
	// Defaults to false.
	FailureModeDeny bool `protobuf:"varint,4,opt,name=failure_mode_deny,json=failureModeDeny,proto3" json:"failure_mode_deny,omitempty"`
	// Configuration for an external rate limit service provider. If not
	// specified, any calls to the rate limit service will immediately return
	// success.
	RateLimitService *v2.RateLimitServiceConfig `protobuf:"bytes,5,opt,name=rate_limit_service,json=rateLimitService,proto3" json:"rate_limit_service,omitempty"`
	unknownFields    protoimpl.UnknownFields
	sizeCache        protoimpl.SizeCache
}

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

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

func (*RateLimit) ProtoMessage() {}

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

func (x *RateLimit) GetDomain() string {
	if x != nil {
		return x.Domain
	}
	return ""
}

func (x *RateLimit) GetStage() uint32 {
	if x != nil {
		return x.Stage
	}
	return 0
}

func (x *RateLimit) GetTimeout() *durationpb.Duration {
	if x != nil {
		return x.Timeout
	}
	return nil
}

func (x *RateLimit) GetFailureModeDeny() bool {
	if x != nil {
		return x.FailureModeDeny
	}
	return false
}

func (x *RateLimit) GetRateLimitService() *v2.RateLimitServiceConfig {
	if x != nil {
		return x.RateLimitService
	}
	return nil
}

var File_envoy_config_filter_thrift_rate_limit_v2alpha1_rate_limit_proto protoreflect.FileDescriptor

const file_envoy_config_filter_thrift_rate_limit_v2alpha1_rate_limit_proto_rawDesc = "" +
	"\n" +
	"?envoy/config/filter/thrift/rate_limit/v2alpha1/rate_limit.proto\x12.envoy.config.filter.thrift.rate_limit.v2alpha1\x1a#envoy/config/ratelimit/v2/rls.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1eudpa/annotations/migrate.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\x97\x02\n" +
	"\tRateLimit\x12\x1f\n" +
	"\x06domain\x18\x01 \x01(\tB\a\xfaB\x04r\x02 \x01R\x06domain\x12\x1d\n" +
	"\x05stage\x18\x02 \x01(\rB\a\xfaB\x04*\x02\x18\n" +
	"R\x05stage\x123\n" +
	"\atimeout\x18\x03 \x01(\v2\x19.google.protobuf.DurationR\atimeout\x12*\n" +
	"\x11failure_mode_deny\x18\x04 \x01(\bR\x0ffailureModeDeny\x12i\n" +
	"\x12rate_limit_service\x18\x05 \x01(\v21.envoy.config.ratelimit.v2.RateLimitServiceConfigB\b\xfaB\x05\x8a\x01\x02\x10\x01R\x10rateLimitServiceB\xf9\x01\xf2\x98\xfe\x8f\x05D\x12Benvoy.extensions.filters.network.thrift_proxy.filters.ratelimit.v3\xba\x80\xc8\xd1\x06\x02\x10\x01\n" +
	"<io.envoyproxy.envoy.config.filter.thrift.rate_limit.v2alpha1B\x0eRateLimitProtoP\x01ZUgithub.com/envoyproxy/go-control-plane/envoy/config/filter/thrift/rate_limit/v2alpha1b\x06proto3"

var (
	file_envoy_config_filter_thrift_rate_limit_v2alpha1_rate_limit_proto_rawDescOnce sync.Once
	file_envoy_config_filter_thrift_rate_limit_v2alpha1_rate_limit_proto_rawDescData []byte
)

func file_envoy_config_filter_thrift_rate_limit_v2alpha1_rate_limit_proto_rawDescGZIP() []byte {
	file_envoy_config_filter_thrift_rate_limit_v2alpha1_rate_limit_proto_rawDescOnce.Do(func() {
		file_envoy_config_filter_thrift_rate_limit_v2alpha1_rate_limit_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_config_filter_thrift_rate_limit_v2alpha1_rate_limit_proto_rawDesc), len(file_envoy_config_filter_thrift_rate_limit_v2alpha1_rate_limit_proto_rawDesc)))
	})
	return file_envoy_config_filter_thrift_rate_limit_v2alpha1_rate_limit_proto_rawDescData
}

var file_envoy_config_filter_thrift_rate_limit_v2alpha1_rate_limit_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_envoy_config_filter_thrift_rate_limit_v2alpha1_rate_limit_proto_goTypes = []any{
	(*RateLimit)(nil),                 // 0: envoy.config.filter.thrift.rate_limit.v2alpha1.RateLimit
	(*durationpb.Duration)(nil),       // 1: google.protobuf.Duration
	(*v2.RateLimitServiceConfig)(nil), // 2: envoy.config.ratelimit.v2.RateLimitServiceConfig
}
var file_envoy_config_filter_thrift_rate_limit_v2alpha1_rate_limit_proto_depIdxs = []int32{
	1, // 0: envoy.config.filter.thrift.rate_limit.v2alpha1.RateLimit.timeout:type_name -> google.protobuf.Duration
	2, // 1: envoy.config.filter.thrift.rate_limit.v2alpha1.RateLimit.rate_limit_service:type_name -> envoy.config.ratelimit.v2.RateLimitServiceConfig
	2, // [2:2] is the sub-list for method output_type
	2, // [2:2] is the sub-list for method input_type
	2, // [2:2] is the sub-list for extension type_name
	2, // [2:2] is the sub-list for extension extendee
	0, // [0:2] is the sub-list for field type_name
}

func init() { file_envoy_config_filter_thrift_rate_limit_v2alpha1_rate_limit_proto_init() }
func file_envoy_config_filter_thrift_rate_limit_v2alpha1_rate_limit_proto_init() {
	if File_envoy_config_filter_thrift_rate_limit_v2alpha1_rate_limit_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_filter_thrift_rate_limit_v2alpha1_rate_limit_proto_rawDesc), len(file_envoy_config_filter_thrift_rate_limit_v2alpha1_rate_limit_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_config_filter_thrift_rate_limit_v2alpha1_rate_limit_proto_goTypes,
		DependencyIndexes: file_envoy_config_filter_thrift_rate_limit_v2alpha1_rate_limit_proto_depIdxs,
		MessageInfos:      file_envoy_config_filter_thrift_rate_limit_v2alpha1_rate_limit_proto_msgTypes,
	}.Build()
	File_envoy_config_filter_thrift_rate_limit_v2alpha1_rate_limit_proto = out.File
	file_envoy_config_filter_thrift_rate_limit_v2alpha1_rate_limit_proto_goTypes = nil
	file_envoy_config_filter_thrift_rate_limit_v2alpha1_rate_limit_proto_depIdxs = nil
}
