// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v7.35.1
// source: envoy/config/filter/network/local_rate_limit/v2alpha/local_rate_limit.proto

package v2alpha

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"
	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 LocalRateLimit struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The prefix to use when emitting :ref:`statistics
	// <config_network_filters_local_rate_limit_stats>`.
	StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"`
	// The token bucket configuration to use for rate limiting connections that are processed by the
	// filter's filter chain. Each incoming connection processed by the filter consumes a single
	// token. If the token is available, the connection will be allowed. If no tokens are available,
	// the connection will be immediately closed.
	//
	// .. note::
	//
	//	In the current implementation each filter and filter chain has an independent rate limit.
	//
	// .. note::
	//
	//	In the current implementation the token bucket's :ref:`fill_interval
	//	<envoy_api_field_type.TokenBucket.fill_interval>` must be >= 50ms to avoid too aggressive
	//	refills.
	TokenBucket *_type.TokenBucket `protobuf:"bytes,2,opt,name=token_bucket,json=tokenBucket,proto3" json:"token_bucket,omitempty"`
	// Runtime flag that controls whether the filter is enabled or not. If not specified, defaults
	// to enabled.
	RuntimeEnabled *core.RuntimeFeatureFlag `protobuf:"bytes,3,opt,name=runtime_enabled,json=runtimeEnabled,proto3" json:"runtime_enabled,omitempty"`
	unknownFields  protoimpl.UnknownFields
	sizeCache      protoimpl.SizeCache
}

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

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

func (*LocalRateLimit) ProtoMessage() {}

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

func (x *LocalRateLimit) GetStatPrefix() string {
	if x != nil {
		return x.StatPrefix
	}
	return ""
}

func (x *LocalRateLimit) GetTokenBucket() *_type.TokenBucket {
	if x != nil {
		return x.TokenBucket
	}
	return nil
}

func (x *LocalRateLimit) GetRuntimeEnabled() *core.RuntimeFeatureFlag {
	if x != nil {
		return x.RuntimeEnabled
	}
	return nil
}

var File_envoy_config_filter_network_local_rate_limit_v2alpha_local_rate_limit_proto protoreflect.FileDescriptor

const file_envoy_config_filter_network_local_rate_limit_v2alpha_local_rate_limit_proto_rawDesc = "" +
	"\n" +
	"Kenvoy/config/filter/network/local_rate_limit/v2alpha/local_rate_limit.proto\x124envoy.config.filter.network.local_rate_limit.v2alpha\x1a\x1cenvoy/api/v2/core/base.proto\x1a\x1denvoy/type/token_bucket.proto\x1a\x1eudpa/annotations/migrate.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\xd0\x01\n" +
	"\x0eLocalRateLimit\x12(\n" +
	"\vstat_prefix\x18\x01 \x01(\tB\a\xfaB\x04r\x02 \x01R\n" +
	"statPrefix\x12D\n" +
	"\ftoken_bucket\x18\x02 \x01(\v2\x17.envoy.type.TokenBucketB\b\xfaB\x05\x8a\x01\x02\x10\x01R\vtokenBucket\x12N\n" +
	"\x0fruntime_enabled\x18\x03 \x01(\v2%.envoy.api.v2.core.RuntimeFeatureFlagR\x0eruntimeEnabledB\xfb\x01\xf2\x98\xfe\x8f\x055\x123envoy.extensions.filters.network.local_ratelimit.v3\xba\x80\xc8\xd1\x06\x02\x10\x01\n" +
	"Bio.envoyproxy.envoy.config.filter.network.local_rate_limit.v2alphaB\x13LocalRateLimitProtoP\x01Z[github.com/envoyproxy/go-control-plane/envoy/config/filter/network/local_rate_limit/v2alphab\x06proto3"

var (
	file_envoy_config_filter_network_local_rate_limit_v2alpha_local_rate_limit_proto_rawDescOnce sync.Once
	file_envoy_config_filter_network_local_rate_limit_v2alpha_local_rate_limit_proto_rawDescData []byte
)

func file_envoy_config_filter_network_local_rate_limit_v2alpha_local_rate_limit_proto_rawDescGZIP() []byte {
	file_envoy_config_filter_network_local_rate_limit_v2alpha_local_rate_limit_proto_rawDescOnce.Do(func() {
		file_envoy_config_filter_network_local_rate_limit_v2alpha_local_rate_limit_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_config_filter_network_local_rate_limit_v2alpha_local_rate_limit_proto_rawDesc), len(file_envoy_config_filter_network_local_rate_limit_v2alpha_local_rate_limit_proto_rawDesc)))
	})
	return file_envoy_config_filter_network_local_rate_limit_v2alpha_local_rate_limit_proto_rawDescData
}

var file_envoy_config_filter_network_local_rate_limit_v2alpha_local_rate_limit_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_envoy_config_filter_network_local_rate_limit_v2alpha_local_rate_limit_proto_goTypes = []any{
	(*LocalRateLimit)(nil),          // 0: envoy.config.filter.network.local_rate_limit.v2alpha.LocalRateLimit
	(*_type.TokenBucket)(nil),       // 1: envoy.type.TokenBucket
	(*core.RuntimeFeatureFlag)(nil), // 2: envoy.api.v2.core.RuntimeFeatureFlag
}
var file_envoy_config_filter_network_local_rate_limit_v2alpha_local_rate_limit_proto_depIdxs = []int32{
	1, // 0: envoy.config.filter.network.local_rate_limit.v2alpha.LocalRateLimit.token_bucket:type_name -> envoy.type.TokenBucket
	2, // 1: envoy.config.filter.network.local_rate_limit.v2alpha.LocalRateLimit.runtime_enabled:type_name -> envoy.api.v2.core.RuntimeFeatureFlag
	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_network_local_rate_limit_v2alpha_local_rate_limit_proto_init() }
func file_envoy_config_filter_network_local_rate_limit_v2alpha_local_rate_limit_proto_init() {
	if File_envoy_config_filter_network_local_rate_limit_v2alpha_local_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_network_local_rate_limit_v2alpha_local_rate_limit_proto_rawDesc), len(file_envoy_config_filter_network_local_rate_limit_v2alpha_local_rate_limit_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_config_filter_network_local_rate_limit_v2alpha_local_rate_limit_proto_goTypes,
		DependencyIndexes: file_envoy_config_filter_network_local_rate_limit_v2alpha_local_rate_limit_proto_depIdxs,
		MessageInfos:      file_envoy_config_filter_network_local_rate_limit_v2alpha_local_rate_limit_proto_msgTypes,
	}.Build()
	File_envoy_config_filter_network_local_rate_limit_v2alpha_local_rate_limit_proto = out.File
	file_envoy_config_filter_network_local_rate_limit_v2alpha_local_rate_limit_proto_goTypes = nil
	file_envoy_config_filter_network_local_rate_limit_v2alpha_local_rate_limit_proto_depIdxs = nil
}
