// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.4
// 	protoc        v5.29.0
// source: app/v1/middleware/throttle.proto

package v1

import (
	_ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate"
	v1 "github.com/aileron-gateway/aileron-gateway/apis/core/v1"
	kernel "github.com/aileron-gateway/aileron-gateway/apis/kernel"
	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)
)

// ThrottleMiddleware resource definition.
// apiVersion="app/v1", kind="ThrottleMiddleware".
type ThrottleMiddleware struct {
	state         protoimpl.MessageState  `protogen:"open.v1"`
	APIVersion    string                  `protobuf:"bytes,1,opt,name=APIVersion,json=apiVersion,proto3" json:"APIVersion,omitempty"`
	Kind          string                  `protobuf:"bytes,2,opt,name=Kind,json=kind,proto3" json:"Kind,omitempty"`
	Metadata      *kernel.Metadata        `protobuf:"bytes,3,opt,name=Metadata,json=metadata,proto3" json:"Metadata,omitempty"`
	Spec          *ThrottleMiddlewareSpec `protobuf:"bytes,4,opt,name=Spec,json=spec,proto3" json:"Spec,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ThrottleMiddleware) ProtoMessage() {}

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

func (x *ThrottleMiddleware) GetAPIVersion() string {
	if x != nil {
		return x.APIVersion
	}
	return ""
}

func (x *ThrottleMiddleware) GetKind() string {
	if x != nil {
		return x.Kind
	}
	return ""
}

func (x *ThrottleMiddleware) GetMetadata() *kernel.Metadata {
	if x != nil {
		return x.Metadata
	}
	return nil
}

func (x *ThrottleMiddleware) GetSpec() *ThrottleMiddlewareSpec {
	if x != nil {
		return x.Spec
	}
	return nil
}

// ThrottleMiddlewareSpec is the specifications for the ThrottleMiddleware object.
type ThrottleMiddlewareSpec struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// [OPTIONAL]
	// APIThrottlers is the list of APIThrottler objects.
	// Throttler that matches all requests should be defined at the last of this list to
	// protect the application from DDoS attack.
	APIThrottlers []*APIThrottlerSpec `protobuf:"bytes,1,rep,name=APIThrottlers,json=apiThrottlers,proto3" json:"APIThrottlers,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ThrottleMiddlewareSpec) ProtoMessage() {}

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

func (x *ThrottleMiddlewareSpec) GetAPIThrottlers() []*APIThrottlerSpec {
	if x != nil {
		return x.APIThrottlers
	}
	return nil
}

// APIThrottlerSpec creates a timeout which is applied to requests
// with configured methods and a path.
type APIThrottlerSpec struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// [REQUIRED]
	// Matcher is a matcher which matches to defined patterns.
	// Default is not set.
	Matcher *kernel.MatcherSpec `protobuf:"bytes,1,opt,name=Matcher,json=matcher,proto3" json:"Matcher,omitempty"`
	// [OPTIONAL]
	// Methods is the list of HTTP methods to be matched.
	// If not set, all methods are matched.
	// If set, only configured methods are matched.
	// Default is not set.
	Methods []v1.HTTPMethod `protobuf:"varint,2,rep,packed,name=Methods,json=methods,proto3,enum=core.v1.HTTPMethod" json:"Methods,omitempty"`
	// [OPTIONAL]
	// maxRetry is the maximum retry count to accept the requests when throttled.
	// Errors are returned to the requests that are not accepted after retrying maxRetry times.
	// Default is [0] or no retry by default.
	MaxRetry int32 `protobuf:"varint,3,opt,name=MaxRetry,json=maxRetry,proto3" json:"MaxRetry,omitempty"`
	// [REQUIRED]
	// Throttlers is the list of the throttlers that are applied to the requests matched to the matcher.
	// No throttlers are applied when nothing has specified in this field.
	//
	// Types that are valid to be assigned to Throttlers:
	//
	//	*APIThrottlerSpec_MaxConnections
	//	*APIThrottlerSpec_TokenBucket
	//	*APIThrottlerSpec_FixedWindow
	//	*APIThrottlerSpec_LeakyBucket
	Throttlers    isAPIThrottlerSpec_Throttlers `protobuf_oneof:"Throttlers"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*APIThrottlerSpec) ProtoMessage() {}

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

func (x *APIThrottlerSpec) GetMatcher() *kernel.MatcherSpec {
	if x != nil {
		return x.Matcher
	}
	return nil
}

func (x *APIThrottlerSpec) GetMethods() []v1.HTTPMethod {
	if x != nil {
		return x.Methods
	}
	return nil
}

func (x *APIThrottlerSpec) GetMaxRetry() int32 {
	if x != nil {
		return x.MaxRetry
	}
	return 0
}

func (x *APIThrottlerSpec) GetThrottlers() isAPIThrottlerSpec_Throttlers {
	if x != nil {
		return x.Throttlers
	}
	return nil
}

func (x *APIThrottlerSpec) GetMaxConnections() *MaxConnectionsSpec {
	if x != nil {
		if x, ok := x.Throttlers.(*APIThrottlerSpec_MaxConnections); ok {
			return x.MaxConnections
		}
	}
	return nil
}

func (x *APIThrottlerSpec) GetTokenBucket() *TokenBucketSpec {
	if x != nil {
		if x, ok := x.Throttlers.(*APIThrottlerSpec_TokenBucket); ok {
			return x.TokenBucket
		}
	}
	return nil
}

func (x *APIThrottlerSpec) GetFixedWindow() *FixedWindowSpec {
	if x != nil {
		if x, ok := x.Throttlers.(*APIThrottlerSpec_FixedWindow); ok {
			return x.FixedWindow
		}
	}
	return nil
}

func (x *APIThrottlerSpec) GetLeakyBucket() *LeakyBucketSpec {
	if x != nil {
		if x, ok := x.Throttlers.(*APIThrottlerSpec_LeakyBucket); ok {
			return x.LeakyBucket
		}
	}
	return nil
}

type isAPIThrottlerSpec_Throttlers interface {
	isAPIThrottlerSpec_Throttlers()
}

type APIThrottlerSpec_MaxConnections struct {
	// MaxConnections is the setting for throttler with max connection algorithm.
	MaxConnections *MaxConnectionsSpec `protobuf:"bytes,10,opt,name=MaxConnections,json=maxConnections,proto3,oneof"`
}

type APIThrottlerSpec_TokenBucket struct {
	// TokenBucket is the setting for throttler with token bucket algorithm.
	TokenBucket *TokenBucketSpec `protobuf:"bytes,11,opt,name=TokenBucket,json=tokenBucket,proto3,oneof"`
}

type APIThrottlerSpec_FixedWindow struct {
	// FixedWindow is the setting for throttler with fixed window algorithm.
	FixedWindow *FixedWindowSpec `protobuf:"bytes,12,opt,name=FixedWindow,json=fixedWindow,proto3,oneof"`
}

type APIThrottlerSpec_LeakyBucket struct {
	// LeakyBucket is the setting for throttler with leaky bucket algorithm.
	LeakyBucket *LeakyBucketSpec `protobuf:"bytes,13,opt,name=LeakyBucket,json=leakyBucket,proto3,oneof"`
}

func (*APIThrottlerSpec_MaxConnections) isAPIThrottlerSpec_Throttlers() {}

func (*APIThrottlerSpec_TokenBucket) isAPIThrottlerSpec_Throttlers() {}

func (*APIThrottlerSpec_FixedWindow) isAPIThrottlerSpec_Throttlers() {}

func (*APIThrottlerSpec_LeakyBucket) isAPIThrottlerSpec_Throttlers() {}

// MaxConnectionsSpec is the specification for max connection algorithms of throttling.
type MaxConnectionsSpec struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// [OPTIONAL]
	// maxConns is the max connection to allow to connect at a moment.
	// Default is [128].
	MaxConns      int32 `protobuf:"varint,1,opt,name=MaxConns,json=maxConns,proto3" json:"MaxConns,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*MaxConnectionsSpec) ProtoMessage() {}

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

func (x *MaxConnectionsSpec) GetMaxConns() int32 {
	if x != nil {
		return x.MaxConns
	}
	return 0
}

// FixedWindowSpec is the specification for token fixed window algorithms of throttling.
type FixedWindowSpec struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// [OPTIONAL]
	// WindowSize is the time span of the window in millisecond.
	// Default is [1000] or 1 second.
	WindowSize int64 `protobuf:"varint,1,opt,name=WindowSize,json=windowSize,proto3" json:"WindowSize,omitempty"`
	// [OPTIONAL]
	// Limit is the limit of requests in the windows.
	// Default is [1000].
	Limit         int32 `protobuf:"varint,2,opt,name=Limit,json=limit,proto3" json:"Limit,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*FixedWindowSpec) ProtoMessage() {}

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

func (x *FixedWindowSpec) GetWindowSize() int64 {
	if x != nil {
		return x.WindowSize
	}
	return 0
}

func (x *FixedWindowSpec) GetLimit() int32 {
	if x != nil {
		return x.Limit
	}
	return 0
}

// TokenBucketSpec is the specification for token bucket algorithms of throttling.
type TokenBucketSpec struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// [OPTIONAL]
	// BucketSize is the number of tokens that the bucket can keep.
	// Default is [1000].
	BucketSize int32 `protobuf:"varint,1,opt,name=BucketSize,json=bucketSize,proto3" json:"BucketSize,omitempty"`
	// [OPTIONAL]
	// FillInterval is the interval to fill tokens in the bucket in millisecond.
	// Default is [1000] or 1 second.
	FillInterval int64 `protobuf:"varint,2,opt,name=FillInterval,json=fillInterval,proto3" json:"FillInterval,omitempty"`
	// [OPTIONAL]
	// FillRate is the number of tokens to fill in the bucket at every fill interval.
	// Default is [1000].
	FillRate      int32 `protobuf:"varint,3,opt,name=FillRate,json=fillRate,proto3" json:"FillRate,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *TokenBucketSpec) Reset() {
	*x = TokenBucketSpec{}
	mi := &file_app_v1_middleware_throttle_proto_msgTypes[5]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*TokenBucketSpec) ProtoMessage() {}

func (x *TokenBucketSpec) ProtoReflect() protoreflect.Message {
	mi := &file_app_v1_middleware_throttle_proto_msgTypes[5]
	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 TokenBucketSpec.ProtoReflect.Descriptor instead.
func (*TokenBucketSpec) Descriptor() ([]byte, []int) {
	return file_app_v1_middleware_throttle_proto_rawDescGZIP(), []int{5}
}

func (x *TokenBucketSpec) GetBucketSize() int32 {
	if x != nil {
		return x.BucketSize
	}
	return 0
}

func (x *TokenBucketSpec) GetFillInterval() int64 {
	if x != nil {
		return x.FillInterval
	}
	return 0
}

func (x *TokenBucketSpec) GetFillRate() int32 {
	if x != nil {
		return x.FillRate
	}
	return 0
}

// LeakyBucketSpec is the specification for leaky bucket algorithms of throttling.
type LeakyBucketSpec struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// [OPTIONAL]
	// BucketSize is the size of bucket.
	// Requests will be en-queued in the bucket and will be de-queued with
	// the interval of LeakInterval.
	// Default is [1000].
	BucketSize int32 `protobuf:"varint,1,opt,name=BucketSize,json=bucketSize,proto3" json:"BucketSize,omitempty"`
	// [OPTIONAL]
	// LeakInterval is the accept interval in millisecond.
	// Default is [1] millisecond.
	LeakInterval  int64 `protobuf:"varint,2,opt,name=LeakInterval,json=leakInterval,proto3" json:"LeakInterval,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *LeakyBucketSpec) Reset() {
	*x = LeakyBucketSpec{}
	mi := &file_app_v1_middleware_throttle_proto_msgTypes[6]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*LeakyBucketSpec) ProtoMessage() {}

func (x *LeakyBucketSpec) ProtoReflect() protoreflect.Message {
	mi := &file_app_v1_middleware_throttle_proto_msgTypes[6]
	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 LeakyBucketSpec.ProtoReflect.Descriptor instead.
func (*LeakyBucketSpec) Descriptor() ([]byte, []int) {
	return file_app_v1_middleware_throttle_proto_rawDescGZIP(), []int{6}
}

func (x *LeakyBucketSpec) GetBucketSize() int32 {
	if x != nil {
		return x.BucketSize
	}
	return 0
}

func (x *LeakyBucketSpec) GetLeakInterval() int64 {
	if x != nil {
		return x.LeakInterval
	}
	return 0
}

var File_app_v1_middleware_throttle_proto protoreflect.FileDescriptor

var file_app_v1_middleware_throttle_proto_rawDesc = string([]byte{
	0x0a, 0x20, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77,
	0x61, 0x72, 0x65, 0x2f, 0x74, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
	0x74, 0x6f, 0x12, 0x06, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f,
	0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
	0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31,
	0x2f, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x6b, 0x65, 0x72,
	0x6e, 0x65, 0x6c, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
	0x6f, 0x1a, 0x15, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
	0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaa, 0x01, 0x0a, 0x12, 0x54, 0x68, 0x72,
	0x6f, 0x74, 0x74, 0x6c, 0x65, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x12,
	0x1e, 0x0a, 0x0a, 0x41, 0x50, 0x49, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20,
	0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,
	0x12, 0x0a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b,
	0x69, 0x6e, 0x64, 0x12, 0x2c, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18,
	0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x2e, 0x4d,
	0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
	0x61, 0x12, 0x32, 0x0a, 0x04, 0x53, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
	0x1e, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c,
	0x65, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52,
	0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x58, 0x0a, 0x16, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c,
	0x65, 0x4d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x77, 0x61, 0x72, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12,
	0x3e, 0x0a, 0x0d, 0x41, 0x50, 0x49, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x73,
	0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x2e,
	0x41, 0x50, 0x49, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63,
	0x52, 0x0d, 0x61, 0x70, 0x69, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x73, 0x22,
	0xb9, 0x03, 0x0a, 0x10, 0x41, 0x50, 0x49, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74, 0x6c, 0x65, 0x72,
	0x53, 0x70, 0x65, 0x63, 0x12, 0x35, 0x0a, 0x07, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18,
	0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x2e, 0x4d,
	0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8,
	0x01, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x07, 0x4d,
	0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x63,
	0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x65, 0x74, 0x68, 0x6f,
	0x64, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x18, 0x01, 0x52, 0x07, 0x6d, 0x65, 0x74,
	0x68, 0x6f, 0x64, 0x73, 0x12, 0x23, 0x0a, 0x08, 0x4d, 0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x79,
	0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, 0xba, 0x48, 0x04, 0x1a, 0x02, 0x28, 0x00, 0x52,
	0x08, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x79, 0x12, 0x44, 0x0a, 0x0e, 0x4d, 0x61, 0x78,
	0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28,
	0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x78, 0x43, 0x6f,
	0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52,
	0x0e, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12,
	0x3b, 0x0a, 0x0b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x0b,
	0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f,
	0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52,
	0x0b, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x0b,
	0x46, 0x69, 0x78, 0x65, 0x64, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x0c, 0x20, 0x01, 0x28,
	0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x78, 0x65, 0x64,
	0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x0b, 0x66, 0x69,
	0x78, 0x65, 0x64, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x3b, 0x0a, 0x0b, 0x4c, 0x65, 0x61,
	0x6b, 0x79, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
	0x2e, 0x61, 0x70, 0x70, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x65, 0x61, 0x6b, 0x79, 0x42, 0x75, 0x63,
	0x6b, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x48, 0x00, 0x52, 0x0b, 0x6c, 0x65, 0x61, 0x6b, 0x79,
	0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x13, 0x0a, 0x0a, 0x54, 0x68, 0x72, 0x6f, 0x74, 0x74,
	0x6c, 0x65, 0x72, 0x73, 0x12, 0x05, 0xba, 0x48, 0x02, 0x08, 0x01, 0x22, 0x30, 0x0a, 0x12, 0x4d,
	0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x70, 0x65,
	0x63, 0x12, 0x1a, 0x0a, 0x08, 0x4d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x73, 0x18, 0x01, 0x20,
	0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x73, 0x22, 0x59, 0x0a,
	0x0f, 0x46, 0x69, 0x78, 0x65, 0x64, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x53, 0x70, 0x65, 0x63,
	0x12, 0x27, 0x0a, 0x0a, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x01,
	0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xba, 0x48, 0x04, 0x22, 0x02, 0x28, 0x01, 0x52, 0x0a, 0x77,
	0x69, 0x6e, 0x64, 0x6f, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x05, 0x4c, 0x69, 0x6d,
	0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, 0xba, 0x48, 0x04, 0x1a, 0x02, 0x28,
	0x01, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x8c, 0x01, 0x0a, 0x0f, 0x54, 0x6f, 0x6b,
	0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x27, 0x0a, 0x0a,
	0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
	0x42, 0x07, 0xba, 0x48, 0x04, 0x1a, 0x02, 0x28, 0x01, 0x52, 0x0a, 0x62, 0x75, 0x63, 0x6b, 0x65,
	0x74, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2b, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x6c, 0x49, 0x6e, 0x74,
	0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xba, 0x48, 0x04,
	0x22, 0x02, 0x28, 0x01, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76,
	0x61, 0x6c, 0x12, 0x23, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x18, 0x03,
	0x20, 0x01, 0x28, 0x05, 0x42, 0x07, 0xba, 0x48, 0x04, 0x1a, 0x02, 0x28, 0x01, 0x52, 0x08, 0x66,
	0x69, 0x6c, 0x6c, 0x52, 0x61, 0x74, 0x65, 0x22, 0x67, 0x0a, 0x0f, 0x4c, 0x65, 0x61, 0x6b, 0x79,
	0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x27, 0x0a, 0x0a, 0x42, 0x75,
	0x63, 0x6b, 0x65, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x07,
	0xba, 0x48, 0x04, 0x1a, 0x02, 0x28, 0x01, 0x52, 0x0a, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53,
	0x69, 0x7a, 0x65, 0x12, 0x2b, 0x0a, 0x0c, 0x4c, 0x65, 0x61, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72,
	0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xba, 0x48, 0x04, 0x22, 0x02,
	0x28, 0x01, 0x52, 0x0c, 0x6c, 0x65, 0x61, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c,
	0x42, 0x38, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61,
	0x69, 0x6c, 0x65, 0x72, 0x6f, 0x6e, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x61,
	0x69, 0x6c, 0x65, 0x72, 0x6f, 0x6e, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x61,
	0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
	0x6f, 0x33,
})

var (
	file_app_v1_middleware_throttle_proto_rawDescOnce sync.Once
	file_app_v1_middleware_throttle_proto_rawDescData []byte
)

func file_app_v1_middleware_throttle_proto_rawDescGZIP() []byte {
	file_app_v1_middleware_throttle_proto_rawDescOnce.Do(func() {
		file_app_v1_middleware_throttle_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_app_v1_middleware_throttle_proto_rawDesc), len(file_app_v1_middleware_throttle_proto_rawDesc)))
	})
	return file_app_v1_middleware_throttle_proto_rawDescData
}

var file_app_v1_middleware_throttle_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_app_v1_middleware_throttle_proto_goTypes = []any{
	(*ThrottleMiddleware)(nil),     // 0: app.v1.ThrottleMiddleware
	(*ThrottleMiddlewareSpec)(nil), // 1: app.v1.ThrottleMiddlewareSpec
	(*APIThrottlerSpec)(nil),       // 2: app.v1.APIThrottlerSpec
	(*MaxConnectionsSpec)(nil),     // 3: app.v1.MaxConnectionsSpec
	(*FixedWindowSpec)(nil),        // 4: app.v1.FixedWindowSpec
	(*TokenBucketSpec)(nil),        // 5: app.v1.TokenBucketSpec
	(*LeakyBucketSpec)(nil),        // 6: app.v1.LeakyBucketSpec
	(*kernel.Metadata)(nil),        // 7: kernel.Metadata
	(*kernel.MatcherSpec)(nil),     // 8: kernel.MatcherSpec
	(v1.HTTPMethod)(0),             // 9: core.v1.HTTPMethod
}
var file_app_v1_middleware_throttle_proto_depIdxs = []int32{
	7, // 0: app.v1.ThrottleMiddleware.Metadata:type_name -> kernel.Metadata
	1, // 1: app.v1.ThrottleMiddleware.Spec:type_name -> app.v1.ThrottleMiddlewareSpec
	2, // 2: app.v1.ThrottleMiddlewareSpec.APIThrottlers:type_name -> app.v1.APIThrottlerSpec
	8, // 3: app.v1.APIThrottlerSpec.Matcher:type_name -> kernel.MatcherSpec
	9, // 4: app.v1.APIThrottlerSpec.Methods:type_name -> core.v1.HTTPMethod
	3, // 5: app.v1.APIThrottlerSpec.MaxConnections:type_name -> app.v1.MaxConnectionsSpec
	5, // 6: app.v1.APIThrottlerSpec.TokenBucket:type_name -> app.v1.TokenBucketSpec
	4, // 7: app.v1.APIThrottlerSpec.FixedWindow:type_name -> app.v1.FixedWindowSpec
	6, // 8: app.v1.APIThrottlerSpec.LeakyBucket:type_name -> app.v1.LeakyBucketSpec
	9, // [9:9] is the sub-list for method output_type
	9, // [9:9] is the sub-list for method input_type
	9, // [9:9] is the sub-list for extension type_name
	9, // [9:9] is the sub-list for extension extendee
	0, // [0:9] is the sub-list for field type_name
}

func init() { file_app_v1_middleware_throttle_proto_init() }
func file_app_v1_middleware_throttle_proto_init() {
	if File_app_v1_middleware_throttle_proto != nil {
		return
	}
	file_app_v1_middleware_throttle_proto_msgTypes[2].OneofWrappers = []any{
		(*APIThrottlerSpec_MaxConnections)(nil),
		(*APIThrottlerSpec_TokenBucket)(nil),
		(*APIThrottlerSpec_FixedWindow)(nil),
		(*APIThrottlerSpec_LeakyBucket)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_app_v1_middleware_throttle_proto_rawDesc), len(file_app_v1_middleware_throttle_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   7,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_app_v1_middleware_throttle_proto_goTypes,
		DependencyIndexes: file_app_v1_middleware_throttle_proto_depIdxs,
		MessageInfos:      file_app_v1_middleware_throttle_proto_msgTypes,
	}.Build()
	File_app_v1_middleware_throttle_proto = out.File
	file_app_v1_middleware_throttle_proto_goTypes = nil
	file_app_v1_middleware_throttle_proto_depIdxs = nil
}
