OSDN Git Service

new repo
[bytom/vapor.git] / vendor / google.golang.org / genproto / googleapis / api / serviceconfig / quota.pb.go
1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: google/api/quota.proto
3
4 package serviceconfig
5
6 import proto "github.com/golang/protobuf/proto"
7 import fmt "fmt"
8 import math "math"
9 import _ "google.golang.org/genproto/googleapis/api/annotations"
10
11 // Reference imports to suppress errors if they are not otherwise used.
12 var _ = proto.Marshal
13 var _ = fmt.Errorf
14 var _ = math.Inf
15
16 // Quota configuration helps to achieve fairness and budgeting in service
17 // usage.
18 //
19 // The quota configuration works this way:
20 // - The service configuration defines a set of metrics.
21 // - For API calls, the quota.metric_rules maps methods to metrics with
22 //   corresponding costs.
23 // - The quota.limits defines limits on the metrics, which will be used for
24 //   quota checks at runtime.
25 //
26 // An example quota configuration in yaml format:
27 //
28 //    quota:
29 //      limits:
30 //
31 //      - name: apiWriteQpsPerProject
32 //        metric: library.googleapis.com/write_calls
33 //        unit: "1/min/{project}"  # rate limit for consumer projects
34 //        values:
35 //          STANDARD: 10000
36 //
37 //      # The metric rules bind all methods to the read_calls metric,
38 //      # except for the UpdateBook and DeleteBook methods. These two methods
39 //      # are mapped to the write_calls metric, with the UpdateBook method
40 //      # consuming at twice rate as the DeleteBook method.
41 //      metric_rules:
42 //      - selector: "*"
43 //        metric_costs:
44 //          library.googleapis.com/read_calls: 1
45 //      - selector: google.example.library.v1.LibraryService.UpdateBook
46 //        metric_costs:
47 //          library.googleapis.com/write_calls: 2
48 //      - selector: google.example.library.v1.LibraryService.DeleteBook
49 //        metric_costs:
50 //          library.googleapis.com/write_calls: 1
51 //
52 //  Corresponding Metric definition:
53 //
54 //      metrics:
55 //      - name: library.googleapis.com/read_calls
56 //        display_name: Read requests
57 //        metric_kind: DELTA
58 //        value_type: INT64
59 //
60 //      - name: library.googleapis.com/write_calls
61 //        display_name: Write requests
62 //        metric_kind: DELTA
63 //        value_type: INT64
64 //
65 type Quota struct {
66         // List of `QuotaLimit` definitions for the service.
67         //
68         // Used by metric-based quotas only.
69         Limits []*QuotaLimit `protobuf:"bytes,3,rep,name=limits" json:"limits,omitempty"`
70         // List of `MetricRule` definitions, each one mapping a selected method to one
71         // or more metrics.
72         //
73         // Used by metric-based quotas only.
74         MetricRules []*MetricRule `protobuf:"bytes,4,rep,name=metric_rules,json=metricRules" json:"metric_rules,omitempty"`
75 }
76
77 func (m *Quota) Reset()                    { *m = Quota{} }
78 func (m *Quota) String() string            { return proto.CompactTextString(m) }
79 func (*Quota) ProtoMessage()               {}
80 func (*Quota) Descriptor() ([]byte, []int) { return fileDescriptor11, []int{0} }
81
82 func (m *Quota) GetLimits() []*QuotaLimit {
83         if m != nil {
84                 return m.Limits
85         }
86         return nil
87 }
88
89 func (m *Quota) GetMetricRules() []*MetricRule {
90         if m != nil {
91                 return m.MetricRules
92         }
93         return nil
94 }
95
96 // Bind API methods to metrics. Binding a method to a metric causes that
97 // metric's configured quota, billing, and monitoring behaviors to apply to the
98 // method call.
99 //
100 // Used by metric-based quotas only.
101 type MetricRule struct {
102         // Selects the methods to which this rule applies.
103         //
104         // Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
105         Selector string `protobuf:"bytes,1,opt,name=selector" json:"selector,omitempty"`
106         // Metrics to update when the selected methods are called, and the associated
107         // cost applied to each metric.
108         //
109         // The key of the map is the metric name, and the values are the amount
110         // increased for the metric against which the quota limits are defined.
111         // The value must not be negative.
112         MetricCosts map[string]int64 `protobuf:"bytes,2,rep,name=metric_costs,json=metricCosts" json:"metric_costs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
113 }
114
115 func (m *MetricRule) Reset()                    { *m = MetricRule{} }
116 func (m *MetricRule) String() string            { return proto.CompactTextString(m) }
117 func (*MetricRule) ProtoMessage()               {}
118 func (*MetricRule) Descriptor() ([]byte, []int) { return fileDescriptor11, []int{1} }
119
120 func (m *MetricRule) GetSelector() string {
121         if m != nil {
122                 return m.Selector
123         }
124         return ""
125 }
126
127 func (m *MetricRule) GetMetricCosts() map[string]int64 {
128         if m != nil {
129                 return m.MetricCosts
130         }
131         return nil
132 }
133
134 // `QuotaLimit` defines a specific limit that applies over a specified duration
135 // for a limit type. There can be at most one limit for a duration and limit
136 // type combination defined within a `QuotaGroup`.
137 type QuotaLimit struct {
138         // Name of the quota limit. The name is used to refer to the limit when
139         // overriding the default limit on per-consumer basis.
140         //
141         // For group-based quota limits, the name must be unique within the quota
142         // group. If a name is not provided, it will be generated from the limit_by
143         // and duration fields.
144         //
145         // For metric-based quota limits, the name must be provided, and it must be
146         // unique within the service. The name can only include alphanumeric
147         // characters as well as '-'.
148         //
149         // The maximum length of the limit name is 64 characters.
150         //
151         // The name of a limit is used as a unique identifier for this limit.
152         // Therefore, once a limit has been put into use, its name should be
153         // immutable. You can use the display_name field to provide a user-friendly
154         // name for the limit. The display name can be evolved over time without
155         // affecting the identity of the limit.
156         Name string `protobuf:"bytes,6,opt,name=name" json:"name,omitempty"`
157         // Optional. User-visible, extended description for this quota limit.
158         // Should be used only when more context is needed to understand this limit
159         // than provided by the limit's display name (see: `display_name`).
160         Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"`
161         // Default number of tokens that can be consumed during the specified
162         // duration. This is the number of tokens assigned when a client
163         // application developer activates the service for his/her project.
164         //
165         // Specifying a value of 0 will block all requests. This can be used if you
166         // are provisioning quota to selected consumers and blocking others.
167         // Similarly, a value of -1 will indicate an unlimited quota. No other
168         // negative values are allowed.
169         //
170         // Used by group-based quotas only.
171         DefaultLimit int64 `protobuf:"varint,3,opt,name=default_limit,json=defaultLimit" json:"default_limit,omitempty"`
172         // Maximum number of tokens that can be consumed during the specified
173         // duration. Client application developers can override the default limit up
174         // to this maximum. If specified, this value cannot be set to a value less
175         // than the default limit. If not specified, it is set to the default limit.
176         //
177         // To allow clients to apply overrides with no upper bound, set this to -1,
178         // indicating unlimited maximum quota.
179         //
180         // Used by group-based quotas only.
181         MaxLimit int64 `protobuf:"varint,4,opt,name=max_limit,json=maxLimit" json:"max_limit,omitempty"`
182         // Free tier value displayed in the Developers Console for this limit.
183         // The free tier is the number of tokens that will be subtracted from the
184         // billed amount when billing is enabled.
185         // This field can only be set on a limit with duration "1d", in a billable
186         // group; it is invalid on any other limit. If this field is not set, it
187         // defaults to 0, indicating that there is no free tier for this service.
188         //
189         // Used by group-based quotas only.
190         FreeTier int64 `protobuf:"varint,7,opt,name=free_tier,json=freeTier" json:"free_tier,omitempty"`
191         // Duration of this limit in textual notation. Example: "100s", "24h", "1d".
192         // For duration longer than a day, only multiple of days is supported. We
193         // support only "100s" and "1d" for now. Additional support will be added in
194         // the future. "0" indicates indefinite duration.
195         //
196         // Used by group-based quotas only.
197         Duration string `protobuf:"bytes,5,opt,name=duration" json:"duration,omitempty"`
198         // The name of the metric this quota limit applies to. The quota limits with
199         // the same metric will be checked together during runtime. The metric must be
200         // defined within the service config.
201         //
202         // Used by metric-based quotas only.
203         Metric string `protobuf:"bytes,8,opt,name=metric" json:"metric,omitempty"`
204         // Specify the unit of the quota limit. It uses the same syntax as
205         // [Metric.unit][]. The supported unit kinds are determined by the quota
206         // backend system.
207         //
208         // The [Google Service Control](https://cloud.google.com/service-control)
209         // supports the following unit components:
210         // * One of the time intevals:
211         //   * "/min"  for quota every minute.
212         //   * "/d"  for quota every 24 hours, starting 00:00 US Pacific Time.
213         //   * Otherwise the quota won't be reset by time, such as storage limit.
214         // * One and only one of the granted containers:
215         //   * "/{organization}" quota for an organization.
216         //   * "/{project}" quota for a project.
217         //   * "/{folder}" quota for a folder.
218         //   * "/{resource}" quota for a universal resource.
219         // * Zero or more quota segmentation dimension. Not all combos are valid.
220         //   * "/{region}" quota for every region. Not to be used with time intervals.
221         //   * Otherwise the resources granted on the target is not segmented.
222         //   * "/{zone}" quota for every zone. Not to be used with time intervals.
223         //   * Otherwise the resources granted on the target is not segmented.
224         //   * "/{resource}" quota for a resource associated with a project or org.
225         //
226         // Here are some examples:
227         // * "1/min/{project}" for quota per minute per project.
228         // * "1/min/{user}" for quota per minute per user.
229         // * "1/min/{organization}" for quota per minute per organization.
230         //
231         // Note: the order of unit components is insignificant.
232         // The "1" at the beginning is required to follow the metric unit syntax.
233         //
234         // Used by metric-based quotas only.
235         Unit string `protobuf:"bytes,9,opt,name=unit" json:"unit,omitempty"`
236         // Tiered limit values. Also allows for regional or zone overrides for these
237         // values if "/{region}" or "/{zone}" is specified in the unit field.
238         //
239         // Currently supported tiers from low to high:
240         // VERY_LOW, LOW, STANDARD, HIGH, VERY_HIGH
241         //
242         // To apply different limit values for users according to their tiers, specify
243         // the values for the tiers you want to differentiate. For example:
244         // {LOW:100, STANDARD:500, HIGH:1000, VERY_HIGH:5000}
245         //
246         // The limit value for each tier is optional except for the tier STANDARD.
247         // The limit value for an unspecified tier falls to the value of its next
248         // tier towards tier STANDARD. For the above example, the limit value for tier
249         // STANDARD is 500.
250         //
251         // To apply the same limit value for all users, just specify limit value for
252         // tier STANDARD. For example: {STANDARD:500}.
253         //
254         // To apply a regional overide for a tier, add a map entry with key
255         // "<TIER>/<region>", where <region> is a region name. Similarly, for a zone
256         // override, add a map entry with key "<TIER>/{zone}".
257         // Further, a wildcard can be used at the end of a zone name in order to
258         // specify zone level overrides. For example:
259         // LOW: 10, STANDARD: 50, HIGH: 100,
260         // LOW/us-central1: 20, STANDARD/us-central1: 60, HIGH/us-central1: 200,
261         // LOW/us-central1-*: 10, STANDARD/us-central1-*: 20, HIGH/us-central1-*: 80
262         //
263         // The regional overrides tier set for each region must be the same as
264         // the tier set for default limit values. Same rule applies for zone overrides
265         // tier as well.
266         //
267         // Used by metric-based quotas only.
268         Values map[string]int64 `protobuf:"bytes,10,rep,name=values" json:"values,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
269         // User-visible display name for this limit.
270         // Optional. If not set, the UI will provide a default display name based on
271         // the quota configuration. This field can be used to override the default
272         // display name generated from the configuration.
273         DisplayName string `protobuf:"bytes,12,opt,name=display_name,json=displayName" json:"display_name,omitempty"`
274 }
275
276 func (m *QuotaLimit) Reset()                    { *m = QuotaLimit{} }
277 func (m *QuotaLimit) String() string            { return proto.CompactTextString(m) }
278 func (*QuotaLimit) ProtoMessage()               {}
279 func (*QuotaLimit) Descriptor() ([]byte, []int) { return fileDescriptor11, []int{2} }
280
281 func (m *QuotaLimit) GetName() string {
282         if m != nil {
283                 return m.Name
284         }
285         return ""
286 }
287
288 func (m *QuotaLimit) GetDescription() string {
289         if m != nil {
290                 return m.Description
291         }
292         return ""
293 }
294
295 func (m *QuotaLimit) GetDefaultLimit() int64 {
296         if m != nil {
297                 return m.DefaultLimit
298         }
299         return 0
300 }
301
302 func (m *QuotaLimit) GetMaxLimit() int64 {
303         if m != nil {
304                 return m.MaxLimit
305         }
306         return 0
307 }
308
309 func (m *QuotaLimit) GetFreeTier() int64 {
310         if m != nil {
311                 return m.FreeTier
312         }
313         return 0
314 }
315
316 func (m *QuotaLimit) GetDuration() string {
317         if m != nil {
318                 return m.Duration
319         }
320         return ""
321 }
322
323 func (m *QuotaLimit) GetMetric() string {
324         if m != nil {
325                 return m.Metric
326         }
327         return ""
328 }
329
330 func (m *QuotaLimit) GetUnit() string {
331         if m != nil {
332                 return m.Unit
333         }
334         return ""
335 }
336
337 func (m *QuotaLimit) GetValues() map[string]int64 {
338         if m != nil {
339                 return m.Values
340         }
341         return nil
342 }
343
344 func (m *QuotaLimit) GetDisplayName() string {
345         if m != nil {
346                 return m.DisplayName
347         }
348         return ""
349 }
350
351 func init() {
352         proto.RegisterType((*Quota)(nil), "google.api.Quota")
353         proto.RegisterType((*MetricRule)(nil), "google.api.MetricRule")
354         proto.RegisterType((*QuotaLimit)(nil), "google.api.QuotaLimit")
355 }
356
357 func init() { proto.RegisterFile("google/api/quota.proto", fileDescriptor11) }
358
359 var fileDescriptor11 = []byte{
360         // 466 bytes of a gzipped FileDescriptorProto
361         0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xc1, 0x8e, 0xd3, 0x30,
362         0x10, 0x55, 0x9a, 0xb6, 0xb4, 0xd3, 0x82, 0x56, 0x16, 0xaa, 0xac, 0xc2, 0xa1, 0x94, 0x03, 0x3d,
363         0xa5, 0x12, 0x5c, 0xd8, 0x45, 0x42, 0x62, 0xd1, 0x0a, 0x81, 0x00, 0x95, 0x08, 0x71, 0xe0, 0x52,
364         0x99, 0x74, 0x1a, 0x59, 0x38, 0x71, 0xb0, 0x9d, 0xd5, 0xf6, 0xcc, 0x9f, 0xf0, 0x0d, 0x7c, 0x20,
365         0xf2, 0xd8, 0xdb, 0x16, 0xd8, 0xcb, 0xde, 0x66, 0xe6, 0xbd, 0xe7, 0x17, 0x3f, 0x4f, 0x60, 0x52,
366         0x6a, 0x5d, 0x2a, 0x5c, 0x8a, 0x46, 0x2e, 0x7f, 0xb4, 0xda, 0x89, 0xac, 0x31, 0xda, 0x69, 0x06,
367         0x61, 0x9e, 0x89, 0x46, 0x4e, 0x1f, 0x1e, 0x71, 0x44, 0x5d, 0x6b, 0x27, 0x9c, 0xd4, 0xb5, 0x0d,
368         0xcc, 0xb9, 0x81, 0xde, 0x27, 0x2f, 0x64, 0x19, 0xf4, 0x95, 0xac, 0xa4, 0xb3, 0x3c, 0x9d, 0xa5,
369         0x8b, 0xd1, 0xd3, 0x49, 0x76, 0x38, 0x23, 0x23, 0xca, 0x7b, 0x0f, 0xe7, 0x91, 0xc5, 0x4e, 0x61,
370         0x5c, 0xa1, 0x33, 0xb2, 0x58, 0x9b, 0x56, 0xa1, 0xe5, 0xdd, 0xff, 0x55, 0x1f, 0x08, 0xcf, 0x5b,
371         0x85, 0xf9, 0xa8, 0xda, 0xd7, 0x76, 0xfe, 0x3b, 0x01, 0x38, 0x60, 0x6c, 0x0a, 0x03, 0x8b, 0x0a,
372         0x0b, 0xa7, 0x0d, 0x4f, 0x66, 0xc9, 0x62, 0x98, 0xef, 0x7b, 0xf6, 0x6e, 0xef, 0x52, 0x68, 0xeb,
373         0x2c, 0xef, 0x90, 0xcb, 0x93, 0x9b, 0x5d, 0x62, 0xf9, 0xda, 0x33, 0x2f, 0x6a, 0x67, 0x76, 0xd7,
374         0xb6, 0x34, 0x99, 0xbe, 0x84, 0x93, 0x7f, 0x09, 0xec, 0x04, 0xd2, 0xef, 0xb8, 0x8b, 0xb6, 0xbe,
375         0x64, 0xf7, 0xa1, 0x77, 0x29, 0x54, 0x8b, 0xbc, 0x33, 0x4b, 0x16, 0x69, 0x1e, 0x9a, 0xb3, 0xce,
376         0xf3, 0x64, 0xfe, 0x33, 0x05, 0x38, 0x04, 0xc1, 0x18, 0x74, 0x6b, 0x51, 0x21, 0xef, 0x93, 0x96,
377         0x6a, 0x36, 0x83, 0xd1, 0x06, 0x6d, 0x61, 0x64, 0xe3, 0x33, 0xa6, 0x23, 0x86, 0xf9, 0xf1, 0x88,
378         0x3d, 0x86, 0xbb, 0x1b, 0xdc, 0x8a, 0x56, 0xb9, 0x35, 0x05, 0xc9, 0x53, 0xb2, 0x19, 0xc7, 0x61,
379         0x38, 0xfa, 0x01, 0x0c, 0x2b, 0x71, 0x15, 0x09, 0x5d, 0x22, 0x0c, 0x2a, 0x71, 0xb5, 0x07, 0xb7,
380         0x06, 0x71, 0xed, 0x24, 0x1a, 0x7e, 0x27, 0x80, 0x7e, 0xf0, 0x59, 0xa2, 0xf1, 0x59, 0x6e, 0x5a,
381         0x43, 0x2f, 0xcc, 0x7b, 0x21, 0xcb, 0xeb, 0x9e, 0x4d, 0xa0, 0x1f, 0xe2, 0xe0, 0x03, 0x42, 0x62,
382         0xe7, 0x2f, 0xd2, 0xd6, 0xd2, 0xf1, 0x61, 0xb8, 0x88, 0xaf, 0xd9, 0x19, 0xf4, 0xe9, 0xe2, 0x96,
383         0x03, 0x25, 0x3e, 0xbf, 0x79, 0x1b, 0xb2, 0x2f, 0x44, 0x0a, 0x61, 0x47, 0x05, 0x7b, 0x04, 0xe3,
384         0x8d, 0xb4, 0x8d, 0x12, 0xbb, 0x35, 0x05, 0x34, 0x8e, 0x29, 0x84, 0xd9, 0x47, 0x51, 0xe1, 0xf4,
385         0x14, 0x46, 0x47, 0xca, 0xdb, 0xbc, 0xc2, 0xb9, 0x82, 0x7b, 0x85, 0xae, 0x8e, 0x3e, 0xe7, 0x3c,
386         0x3c, 0xca, 0xca, 0xaf, 0xf3, 0x2a, 0xf9, 0x7a, 0x11, 0x91, 0x52, 0x2b, 0x51, 0x97, 0x99, 0x36,
387         0xe5, 0xb2, 0xc4, 0x9a, 0x96, 0x7d, 0x19, 0x20, 0xd1, 0x48, 0x4b, 0x7f, 0x83, 0x45, 0x73, 0x29,
388         0x0b, 0x2c, 0x74, 0xbd, 0x95, 0xe5, 0x8b, 0xbf, 0xba, 0x5f, 0x9d, 0xee, 0x9b, 0x57, 0xab, 0xb7,
389         0xdf, 0xfa, 0x24, 0x7c, 0xf6, 0x27, 0x00, 0x00, 0xff, 0xff, 0x90, 0x7e, 0xf5, 0xab, 0x69, 0x03,
390         0x00, 0x00,
391 }