// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v6.33.2
// source: envoy/type/v3/token_bucket.proto

package typev3

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"
	durationpb "google.golang.org/protobuf/types/known/durationpb"
	wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
	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)
)

// Configures a token bucket, typically used for rate limiting.
type TokenBucket struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The maximum tokens that the bucket can hold. This is also the number of tokens that the bucket
	// initially contains.
	MaxTokens uint32 `protobuf:"varint,1,opt,name=max_tokens,json=maxTokens,proto3" json:"max_tokens,omitempty"`
	// The number of tokens added to the bucket during each fill interval. If not specified, defaults
	// to a single token.
	TokensPerFill *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=tokens_per_fill,json=tokensPerFill,proto3" json:"tokens_per_fill,omitempty"`
	// The fill interval that tokens are added to the bucket. During each fill interval
	// “tokens_per_fill“ are added to the bucket. The bucket will never contain more than
	// “max_tokens“ tokens.
	FillInterval  *durationpb.Duration `protobuf:"bytes,3,opt,name=fill_interval,json=fillInterval,proto3" json:"fill_interval,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*TokenBucket) ProtoMessage() {}

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

func (x *TokenBucket) GetMaxTokens() uint32 {
	if x != nil {
		return x.MaxTokens
	}
	return 0
}

func (x *TokenBucket) GetTokensPerFill() *wrapperspb.UInt32Value {
	if x != nil {
		return x.TokensPerFill
	}
	return nil
}

func (x *TokenBucket) GetFillInterval() *durationpb.Duration {
	if x != nil {
		return x.FillInterval
	}
	return nil
}

var File_envoy_type_v3_token_bucket_proto protoreflect.FileDescriptor

const file_envoy_type_v3_token_bucket_proto_rawDesc = "" +
	"\n" +
	" envoy/type/v3/token_bucket.proto\x12\renvoy.type.v3\x1a\x1egoogle/protobuf/duration.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1dudpa/annotations/status.proto\x1a!udpa/annotations/versioning.proto\x1a\x17validate/validate.proto\"\xef\x01\n" +
	"\vTokenBucket\x12&\n" +
	"\n" +
	"max_tokens\x18\x01 \x01(\rB\a\xfaB\x04*\x02 \x00R\tmaxTokens\x12M\n" +
	"\x0ftokens_per_fill\x18\x02 \x01(\v2\x1c.google.protobuf.UInt32ValueB\a\xfaB\x04*\x02 \x00R\rtokensPerFill\x12J\n" +
	"\rfill_interval\x18\x03 \x01(\v2\x19.google.protobuf.DurationB\n" +
	"\xfaB\a\xaa\x01\x04\b\x01*\x00R\ffillInterval:\x1d\x9aň\x1e\x18\n" +
	"\x16envoy.type.TokenBucketBv\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	"\x1bio.envoyproxy.envoy.type.v3B\x10TokenBucketProtoP\x01Z;github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3b\x06proto3"

var (
	file_envoy_type_v3_token_bucket_proto_rawDescOnce sync.Once
	file_envoy_type_v3_token_bucket_proto_rawDescData []byte
)

func file_envoy_type_v3_token_bucket_proto_rawDescGZIP() []byte {
	file_envoy_type_v3_token_bucket_proto_rawDescOnce.Do(func() {
		file_envoy_type_v3_token_bucket_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_type_v3_token_bucket_proto_rawDesc), len(file_envoy_type_v3_token_bucket_proto_rawDesc)))
	})
	return file_envoy_type_v3_token_bucket_proto_rawDescData
}

var file_envoy_type_v3_token_bucket_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_envoy_type_v3_token_bucket_proto_goTypes = []any{
	(*TokenBucket)(nil),            // 0: envoy.type.v3.TokenBucket
	(*wrapperspb.UInt32Value)(nil), // 1: google.protobuf.UInt32Value
	(*durationpb.Duration)(nil),    // 2: google.protobuf.Duration
}
var file_envoy_type_v3_token_bucket_proto_depIdxs = []int32{
	1, // 0: envoy.type.v3.TokenBucket.tokens_per_fill:type_name -> google.protobuf.UInt32Value
	2, // 1: envoy.type.v3.TokenBucket.fill_interval:type_name -> google.protobuf.Duration
	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_type_v3_token_bucket_proto_init() }
func file_envoy_type_v3_token_bucket_proto_init() {
	if File_envoy_type_v3_token_bucket_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_type_v3_token_bucket_proto_rawDesc), len(file_envoy_type_v3_token_bucket_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_type_v3_token_bucket_proto_goTypes,
		DependencyIndexes: file_envoy_type_v3_token_bucket_proto_depIdxs,
		MessageInfos:      file_envoy_type_v3_token_bucket_proto_msgTypes,
	}.Build()
	File_envoy_type_v3_token_bucket_proto = out.File
	file_envoy_type_v3_token_bucket_proto_goTypes = nil
	file_envoy_type_v3_token_bucket_proto_depIdxs = nil
}
