1// Code generated by protoc-gen-go. DO NOT EDIT.
2// versions:
3// 	protoc-gen-go v1.25.0
4// 	protoc        v3.19.1
5// source: envoy/type/v3/token_bucket.proto
6
7package envoy_type_v3
8
9import (
10	_ "github.com/cncf/xds/go/udpa/annotations"
11	_ "github.com/envoyproxy/protoc-gen-validate/validate"
12	proto "github.com/golang/protobuf/proto"
13	duration "github.com/golang/protobuf/ptypes/duration"
14	wrappers "github.com/golang/protobuf/ptypes/wrappers"
15	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
16	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
17	reflect "reflect"
18	sync "sync"
19)
20
21const (
22	// Verify that this generated code is sufficiently up-to-date.
23	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
24	// Verify that runtime/protoimpl is sufficiently up-to-date.
25	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
26)
27
28// This is a compile-time assertion that a sufficiently up-to-date version
29// of the legacy proto package is being used.
30const _ = proto.ProtoPackageIsVersion4
31
32// Configures a token bucket, typically used for rate limiting.
33type TokenBucket struct {
34	state         protoimpl.MessageState
35	sizeCache     protoimpl.SizeCache
36	unknownFields protoimpl.UnknownFields
37
38	// The maximum tokens that the bucket can hold. This is also the number of tokens that the bucket
39	// initially contains.
40	MaxTokens uint32 `protobuf:"varint,1,opt,name=max_tokens,json=maxTokens,proto3" json:"max_tokens,omitempty"`
41	// The number of tokens added to the bucket during each fill interval. If not specified, defaults
42	// to a single token.
43	TokensPerFill *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=tokens_per_fill,json=tokensPerFill,proto3" json:"tokens_per_fill,omitempty"`
44	// The fill interval that tokens are added to the bucket. During each fill interval
45	// `tokens_per_fill` are added to the bucket. The bucket will never contain more than
46	// `max_tokens` tokens.
47	FillInterval *duration.Duration `protobuf:"bytes,3,opt,name=fill_interval,json=fillInterval,proto3" json:"fill_interval,omitempty"`
48}
49
50func (x *TokenBucket) Reset() {
51	*x = TokenBucket{}
52	if protoimpl.UnsafeEnabled {
53		mi := &file_envoy_type_v3_token_bucket_proto_msgTypes[0]
54		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
55		ms.StoreMessageInfo(mi)
56	}
57}
58
59func (x *TokenBucket) String() string {
60	return protoimpl.X.MessageStringOf(x)
61}
62
63func (*TokenBucket) ProtoMessage() {}
64
65func (x *TokenBucket) ProtoReflect() protoreflect.Message {
66	mi := &file_envoy_type_v3_token_bucket_proto_msgTypes[0]
67	if protoimpl.UnsafeEnabled && x != nil {
68		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
69		if ms.LoadMessageInfo() == nil {
70			ms.StoreMessageInfo(mi)
71		}
72		return ms
73	}
74	return mi.MessageOf(x)
75}
76
77// Deprecated: Use TokenBucket.ProtoReflect.Descriptor instead.
78func (*TokenBucket) Descriptor() ([]byte, []int) {
79	return file_envoy_type_v3_token_bucket_proto_rawDescGZIP(), []int{0}
80}
81
82func (x *TokenBucket) GetMaxTokens() uint32 {
83	if x != nil {
84		return x.MaxTokens
85	}
86	return 0
87}
88
89func (x *TokenBucket) GetTokensPerFill() *wrappers.UInt32Value {
90	if x != nil {
91		return x.TokensPerFill
92	}
93	return nil
94}
95
96func (x *TokenBucket) GetFillInterval() *duration.Duration {
97	if x != nil {
98		return x.FillInterval
99	}
100	return nil
101}
102
103var File_envoy_type_v3_token_bucket_proto protoreflect.FileDescriptor
104
105var file_envoy_type_v3_token_bucket_proto_rawDesc = []byte{
106	0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f,
107	0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f,
108	0x74, 0x6f, 0x12, 0x0d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76,
109	0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
110	0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
111	0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
112	0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
113	0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
114	0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
115	0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
116	0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72,
117	0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61,
118	0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xef, 0x01, 0x0a,
119	0x0b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x26, 0x0a, 0x0a,
120	0x6d, 0x61, 0x78, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d,
121	0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x54, 0x6f,
122	0x6b, 0x65, 0x6e, 0x73, 0x12, 0x4d, 0x0a, 0x0f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x5f, 0x70,
123	0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e,
124	0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
125	0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04,
126	0x2a, 0x02, 0x20, 0x00, 0x52, 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x50, 0x65, 0x72, 0x46,
127	0x69, 0x6c, 0x6c, 0x12, 0x4a, 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65,
128	0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f,
129	0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72,
130	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x08, 0x01, 0x2a,
131	0x00, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a,
132	0x1d, 0x9a, 0xc5, 0x88, 0x1e, 0x18, 0x0a, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79,
133	0x70, 0x65, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x39,
134	0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e,
135	0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x54,
136	0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
137	0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
138	0x33,
139}
140
141var (
142	file_envoy_type_v3_token_bucket_proto_rawDescOnce sync.Once
143	file_envoy_type_v3_token_bucket_proto_rawDescData = file_envoy_type_v3_token_bucket_proto_rawDesc
144)
145
146func file_envoy_type_v3_token_bucket_proto_rawDescGZIP() []byte {
147	file_envoy_type_v3_token_bucket_proto_rawDescOnce.Do(func() {
148		file_envoy_type_v3_token_bucket_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_v3_token_bucket_proto_rawDescData)
149	})
150	return file_envoy_type_v3_token_bucket_proto_rawDescData
151}
152
153var file_envoy_type_v3_token_bucket_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
154var file_envoy_type_v3_token_bucket_proto_goTypes = []interface{}{
155	(*TokenBucket)(nil),          // 0: envoy.type.v3.TokenBucket
156	(*wrappers.UInt32Value)(nil), // 1: google.protobuf.UInt32Value
157	(*duration.Duration)(nil),    // 2: google.protobuf.Duration
158}
159var file_envoy_type_v3_token_bucket_proto_depIdxs = []int32{
160	1, // 0: envoy.type.v3.TokenBucket.tokens_per_fill:type_name -> google.protobuf.UInt32Value
161	2, // 1: envoy.type.v3.TokenBucket.fill_interval:type_name -> google.protobuf.Duration
162	2, // [2:2] is the sub-list for method output_type
163	2, // [2:2] is the sub-list for method input_type
164	2, // [2:2] is the sub-list for extension type_name
165	2, // [2:2] is the sub-list for extension extendee
166	0, // [0:2] is the sub-list for field type_name
167}
168
169func init() { file_envoy_type_v3_token_bucket_proto_init() }
170func file_envoy_type_v3_token_bucket_proto_init() {
171	if File_envoy_type_v3_token_bucket_proto != nil {
172		return
173	}
174	if !protoimpl.UnsafeEnabled {
175		file_envoy_type_v3_token_bucket_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
176			switch v := v.(*TokenBucket); i {
177			case 0:
178				return &v.state
179			case 1:
180				return &v.sizeCache
181			case 2:
182				return &v.unknownFields
183			default:
184				return nil
185			}
186		}
187	}
188	type x struct{}
189	out := protoimpl.TypeBuilder{
190		File: protoimpl.DescBuilder{
191			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
192			RawDescriptor: file_envoy_type_v3_token_bucket_proto_rawDesc,
193			NumEnums:      0,
194			NumMessages:   1,
195			NumExtensions: 0,
196			NumServices:   0,
197		},
198		GoTypes:           file_envoy_type_v3_token_bucket_proto_goTypes,
199		DependencyIndexes: file_envoy_type_v3_token_bucket_proto_depIdxs,
200		MessageInfos:      file_envoy_type_v3_token_bucket_proto_msgTypes,
201	}.Build()
202	File_envoy_type_v3_token_bucket_proto = out.File
203	file_envoy_type_v3_token_bucket_proto_rawDesc = nil
204	file_envoy_type_v3_token_bucket_proto_goTypes = nil
205	file_envoy_type_v3_token_bucket_proto_depIdxs = nil
206}
207