// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v7.35.1
// source: envoy/extensions/filters/network/local_ratelimit/v3/local_rate_limit.proto

package local_ratelimitv3

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	v31 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
	v3 "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"
	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, unless
	//	a shared rate limit is configured via :ref:`share_key <envoy_v3_api_field_extensions.filters.network.local_ratelimit.v3.LocalRateLimit.share_key>`.
	//
	// .. note::
	//
	//	In the current implementation the token bucket's :ref:`fill_interval
	//	<envoy_v3_api_field_type.v3.TokenBucket.fill_interval>` must be >= 50ms to avoid too aggressive
	//	refills.
	TokenBucket *v3.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 *v31.RuntimeFeatureFlag `protobuf:"bytes,3,opt,name=runtime_enabled,json=runtimeEnabled,proto3" json:"runtime_enabled,omitempty"`
	// Specifies that the token bucket used for rate limiting should be shared with other local_rate_limit filters
	// with a matching :ref:`token_bucket <envoy_v3_api_field_extensions.filters.network.local_ratelimit.v3.LocalRateLimit.token_bucket>`
	// and “share_key“ configuration. All fields of “token_bucket“ must match exactly for the token bucket to be shared. If this
	// field is empty, this filter will not share a token bucket with any other filter.
	ShareKey      string `protobuf:"bytes,4,opt,name=share_key,json=shareKey,proto3" json:"share_key,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *LocalRateLimit) Reset() {
	*x = LocalRateLimit{}
	mi := &file_envoy_extensions_filters_network_local_ratelimit_v3_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_extensions_filters_network_local_ratelimit_v3_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_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto_rawDescGZIP(), []int{0}
}

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

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

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

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

var File_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto protoreflect.FileDescriptor

const file_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto_rawDesc = "" +
	"\n" +
	"Jenvoy/extensions/filters/network/local_ratelimit/v3/local_rate_limit.proto\x123envoy.extensions.filters.network.local_ratelimit.v3\x1a\x1fenvoy/config/core/v3/base.proto\x1a envoy/type/v3/token_bucket.proto\x1a\x1dudpa/annotations/status.proto\x1a!udpa/annotations/versioning.proto\x1a\x17validate/validate.proto\"\xbf\x02\n" +
	"\x0eLocalRateLimit\x12(\n" +
	"\vstat_prefix\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\n" +
	"statPrefix\x12G\n" +
	"\ftoken_bucket\x18\x02 \x01(\v2\x1a.envoy.type.v3.TokenBucketB\b\xfaB\x05\x8a\x01\x02\x10\x01R\vtokenBucket\x12Q\n" +
	"\x0fruntime_enabled\x18\x03 \x01(\v2(.envoy.config.core.v3.RuntimeFeatureFlagR\x0eruntimeEnabled\x12\x1b\n" +
	"\tshare_key\x18\x04 \x01(\tR\bshareKey:J\x9aň\x1eE\n" +
	"Cenvoy.config.filter.network.local_rate_limit.v2alpha.LocalRateLimitB\xd0\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	"Aio.envoyproxy.envoy.extensions.filters.network.local_ratelimit.v3B\x13LocalRateLimitProtoP\x01Zlgithub.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/local_ratelimit/v3;local_ratelimitv3b\x06proto3"

var (
	file_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto_rawDescOnce sync.Once
	file_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto_rawDescData []byte
)

func file_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto_rawDescGZIP() []byte {
	file_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto_rawDescOnce.Do(func() {
		file_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto_rawDesc), len(file_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto_rawDesc)))
	})
	return file_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto_rawDescData
}

var file_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto_goTypes = []any{
	(*LocalRateLimit)(nil),         // 0: envoy.extensions.filters.network.local_ratelimit.v3.LocalRateLimit
	(*v3.TokenBucket)(nil),         // 1: envoy.type.v3.TokenBucket
	(*v31.RuntimeFeatureFlag)(nil), // 2: envoy.config.core.v3.RuntimeFeatureFlag
}
var file_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto_depIdxs = []int32{
	1, // 0: envoy.extensions.filters.network.local_ratelimit.v3.LocalRateLimit.token_bucket:type_name -> envoy.type.v3.TokenBucket
	2, // 1: envoy.extensions.filters.network.local_ratelimit.v3.LocalRateLimit.runtime_enabled:type_name -> envoy.config.core.v3.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_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto_init() }
func file_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto_init() {
	if File_envoy_extensions_filters_network_local_ratelimit_v3_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_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto_rawDesc), len(file_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto_goTypes,
		DependencyIndexes: file_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto_depIdxs,
		MessageInfos:      file_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto_msgTypes,
	}.Build()
	File_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto = out.File
	file_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto_goTypes = nil
	file_envoy_extensions_filters_network_local_ratelimit_v3_local_rate_limit_proto_depIdxs = nil
}
