Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Side by Side Diff: third_party/google-endpoints/google/api/gen/servicecontrol_v1_messages.py

Issue 2666783008: Add google-endpoints to third_party/. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2016 Google Inc. All Rights Reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 """Generated message classes for servicecontrol version v1.
16
17 The Service Control API
18 """
19 # NOTE: This file is originally auto-generated using google-apitools then
20 # style-correcting hand edits were applied. New behaviour should not provided
21 # by hand, please re-generate and restyle.
22 from __future__ import absolute_import
23
24 from apitools.base.protorpclite import messages as _messages
25 from apitools.base.py import encoding
26
27 # This is currently not generated, but needs to be present otherwise the methods
28 # in apitools.base.py.encoding module that support json struct protobuf types
29 # does not work
30 from apitools.base.py import extra_types # pylint: disable=unused-import
31
32 package = 'servicecontrol'
33
34
35 class Api(_messages.Message):
36 """Api is a light-weight descriptor for a protocol buffer service.
37
38 Enums:
39 SyntaxValueValuesEnum: The source syntax of the service.
40
41 Fields:
42 methods: The methods of this api, in unspecified order.
43 mixins: Included APIs. See Mixin.
44 name: The fully qualified name of this api, including package name
45 followed by the api's simple name.
46 options: Any metadata attached to the API.
47 sourceContext: Source context for the protocol buffer service represented
48 by this message.
49 syntax: The source syntax of the service.
50 version: A version string for this api. If specified, must have the form
51 `major-version.minor-version`, as in `1.10`. If the minor version is
52 omitted, it defaults to zero. If the entire version field is empty, the
53 major version is derived from the package name, as outlined below. If
54 the field is not empty, the version in the package name will be verified
55 to be consistent with what is provided here. The versioning schema uses
56 [semantic versioning](http://semver.org) where the major version number
57 indicates a breaking change and the minor version an additive, non-
58 breaking change. Both version numbers are signals to users what to
59 expect from different versions, and should be carefully chosen based on
60 the product plan. The major version is also reflected in the package
61 name of the API, which must end in `v<major-version>`, as in
62 `google.feature.v1`. For major versions 0 and 1, the suffix can be
63 omitted. Zero major versions must only be used for experimental, none-GA
64 apis.
65 """
66
67 class SyntaxValueValuesEnum(_messages.Enum):
68 """The source syntax of the service.
69
70 Values:
71 SYNTAX_PROTO2: Syntax `proto2`.
72 SYNTAX_PROTO3: Syntax `proto3`.
73 """
74 SYNTAX_PROTO2 = 0
75 SYNTAX_PROTO3 = 1
76
77 methods = _messages.MessageField('Method', 1, repeated=True)
78 mixins = _messages.MessageField('Mixin', 2, repeated=True)
79 name = _messages.StringField(3)
80 options = _messages.MessageField('Option', 4, repeated=True)
81 sourceContext = _messages.MessageField('SourceContext', 5)
82 syntax = _messages.EnumField('SyntaxValueValuesEnum', 6)
83 version = _messages.StringField(7)
84
85
86 class AreaUnderCurveParams(_messages.Message):
87 """AreaUnderCurveParams groups the metrics relevant to generating duration
88 based metric from base (snapshot) metric and delta (change) metric. The
89 generated metric has two dimensions: resource usage metric and the
90 duration the metric applies. Essentially the generated metric is the Area
91 Under Curve(AUC) of the "duration - resource" usage curve. This AUC metric
92 is readily appliable to billing since "billable resource usage" depends on
93 resource usage and duration of the resource used. A service config may
94 contain multiple resources and corresponding metrics. AreaUnderCurveParams
95 groups the relevant ones: which snapshot_metric and change_metric are used
96 to produce which generated_metric.
97
98 Fields:
99 changeMetric: Change of resource usage at a particular timestamp. This
100 should a DELTA metric.
101 generatedMetric: Metric generated from snapshot_metric and change_metric.
102 This is also a DELTA metric.
103 snapshotMetric: Total usage of a resource at a particular timestamp. This
104 should be a GAUGE metric.
105 """
106
107 changeMetric = _messages.StringField(1)
108 generatedMetric = _messages.StringField(2)
109 snapshotMetric = _messages.StringField(3)
110
111
112 class AuthProvider(_messages.Message):
113 """Configuration for an anthentication provider, including support for [JSON
114 Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-
115 token-32).
116
117 Fields:
118 id: The unique identifier of the auth provider. It will be referred to by
119 `AuthRequirement.provider_id`. Example: "bookstore_auth".
120 issuer: Identifies the principal that issued the JWT. See
121 https://tools.ietf.org/html/draft-ietf-oauth-json-web-
122 token-32#section-4.1.1 Usually a URL or an email address. Example:
123 https://securetoken.google.com Example:
124 1234567-compute@developer.gserviceaccount.com
125 jwksUri: URL of the provider's public key set to validate signature of the
126 JWT. See [OpenID Discovery](https://openid.net/specs/openid-connect-
127 discovery-1_0.html#ProviderMetadata). Optional if the key set document:
128 - can be retrieved from [OpenID Discovery](https://openid.net/specs
129 /openid-connect-discovery-1_0.html of the issuer. - can be inferred
130 from the email domain of the issuer (e.g. a Google service account).
131 Example: https://www.googleapis.com/oauth2/v1/certs
132 """
133
134 id = _messages.StringField(1)
135 issuer = _messages.StringField(2)
136 jwksUri = _messages.StringField(3)
137
138
139 class AuthRequirement(_messages.Message):
140 """User-defined authentication requirements, including support for [JSON Web
141 Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-
142 token-32).
143
144 Fields:
145 audiences: The list of JWT [audiences](https://tools.ietf.org/html/draft-
146 ietf-oauth-json-web-token-32#section-4.1.3). that are allowed to access.
147 A JWT containing any of these audiences will be accepted. When this
148 setting is absent, only JWTs with audience
149 "https://Service_name/API_name" will be accepted. For example, if no
150 audiences are in the setting, LibraryService API will only accept JWTs
151 with the following audience "https://library-
152 example.googleapis.com/google.example.library.v1.LibraryService".
153 Example: audiences: bookstore_android.apps.googleusercontent.com,
154 bookstore_web.apps.googleusercontent.com
155 providerId: id from authentication provider. Example: provider_id:
156 bookstore_auth
157 """
158
159 audiences = _messages.StringField(1)
160 providerId = _messages.StringField(2)
161
162
163 class Authentication(_messages.Message):
164 """`Authentication` defines the authentication configuration for an API.
165 Example for an API targeted for external use: name:
166 calendar.googleapis.com authentication: rules: - selector:
167 "*" oauth: canonical_scopes:
168 https://www.googleapis.com/auth/calendar - selector:
169 google.calendar.Delegate oauth: canonical_scopes:
170 https://www.googleapis.com/auth/calendar.read
171
172 Fields:
173 providers: Defines a set of authentication providers that a service
174 supports.
175 rules: Individual rules for authentication.
176 """
177
178 providers = _messages.MessageField('AuthProvider', 1, repeated=True)
179 rules = _messages.MessageField('AuthenticationRule', 2, repeated=True)
180
181
182 class AuthenticationRule(_messages.Message):
183 """Authentication rules for the service. By default, if a method has any
184 authentication requirements, every request must include a valid credential
185 matching one of the requirements. It's an error to include more than one
186 kind of credential in a single request. If a method doesn't have any auth
187 requirements, request credentials will be ignored.
188
189 Fields:
190 allowWithoutCredential: Whether to allow requests without a credential.
191 If quota is enabled, an API key is required for such request to pass the
192 quota check.
193 oauth: The requirements for OAuth credentials.
194 requirements: Requirements for additional authentication providers.
195 selector: Selects the methods to which this rule applies. Refer to
196 selector for syntax details.
197 """
198
199 allowWithoutCredential = _messages.BooleanField(1)
200 oauth = _messages.MessageField('OAuthRequirements', 2)
201 requirements = _messages.MessageField('AuthRequirement', 3, repeated=True)
202 selector = _messages.StringField(4)
203
204
205 class Backend(_messages.Message):
206 """`Backend` defines the backend configuration for a service.
207
208 Fields:
209 rules: A list of backend rules providing configuration for individual API
210 elements.
211 """
212
213 rules = _messages.MessageField('BackendRule', 1, repeated=True)
214
215
216 class BackendRule(_messages.Message):
217 """A backend rule provides configuration for an individual API element.
218
219 Fields:
220 address: The address of the API backend.
221 deadline: The number of seconds to wait for a response from a request.
222 The default depends on the deployment context.
223 selector: Selects the methods to which this rule applies. Refer to
224 selector for syntax details.
225 """
226
227 address = _messages.StringField(1)
228 deadline = _messages.FloatField(2)
229 selector = _messages.StringField(3)
230
231
232 class Billing(_messages.Message):
233 """Billing related configuration of the service. The following example
234 shows how to configure metrics for billing: metrics: - name:
235 library.googleapis.com/read_calls metric_kind: DELTA value_type:
236 INT64 - name: library.googleapis.com/write_calls metric_kind:
237 DELTA value_type: INT64 billing: metrics: -
238 library.googleapis.com/read_calls - library.googleapis.com/write_calls
239 The next example shows how to enable billing status check and customize the
240 check behavior. It makes sure billing status check is included in the
241 `Check` method of [Service Control API](https://cloud.google.com/service-
242 control/). In the example, "google.storage.Get" method can be served when
243 the billing status is either `current` or `delinquent`, while
244 "google.storage.Write" method can only be served when the billing status is
245 `current`: billing: rules: - selector: google.storage.Get
246 allowed_statuses: - current - delinquent - selector:
247 google.storage.Write allowed_statuses: current Mostly services
248 should only allow `current` status when serving requests. In addition,
249 services can choose to allow both `current` and `delinquent` statuses when
250 serving read-only requests to resources. If there's no matching selector for
251 operation, no billing status check will be performed.
252
253 Fields:
254 areaUnderCurveParams: Per resource grouping for delta billing based
255 resource configs.
256 metrics: Names of the metrics to report to billing. Each name must be
257 defined in Service.metrics section.
258 rules: A list of billing status rules for configuring billing status
259 check.
260 """
261
262 areaUnderCurveParams = _messages.MessageField('AreaUnderCurveParams', 1, rep eated=True)
263 metrics = _messages.StringField(2, repeated=True)
264 rules = _messages.MessageField('BillingStatusRule', 3, repeated=True)
265
266
267 class BillingStatusRule(_messages.Message):
268 """Defines the billing status requirements for operations. When used with
269 [Service Control API](https://cloud.google.com/service-control/), the
270 following statuses are supported: - **current**: the associated billing
271 account is up to date and capable of paying for resource
272 usages. - **delinquent**: the associated billing account has a correctable
273 problem, such as late payment. Mostly services should
274 only allow `current` status when serving requests. In addition, services can
275 choose to allow both `current` and `delinquent` statuses when serving read-
276 only requests to resources. If the list of allowed_statuses is empty, it
277 means no billing requirement.
278
279 Fields:
280 allowedStatuses: Allowed billing statuses. The billing status check passes
281 if the actual billing status matches any of the provided values here.
282 selector: Selects the operation names to which this rule applies. Refer to
283 selector for syntax details.
284 """
285
286 allowedStatuses = _messages.StringField(1, repeated=True)
287 selector = _messages.StringField(2)
288
289
290 class CheckError(_messages.Message):
291 """Defines the errors to be returned in
292 google.api.servicecontrol.v1.CheckResponse.check_errors. NOTE: The list of
293 error code must be in sync with the list in http://cs/google3/tech/internal/
294 env/framework/wrappers/chemist/chemist_wrapper.cc&l=525
295
296 Enums:
297 CodeValueValuesEnum: The error code.
298
299 Fields:
300 code: The error code.
301 detail: The error detail.
302 """
303
304 class CodeValueValuesEnum(_messages.Enum):
305 """The error code.
306
307 Values:
308 ERROR_CODE_UNSPECIFIED: This is never used in `CheckResponse`.
309 NOT_FOUND: The consumer's project id is not found. Same as
310 google.rpc.Code.NOT_FOUND.
311 PERMISSION_DENIED: The consumer doesn't have access to the specified
312 resource. Same as google.rpc.Code.PERMISSION_DENIED.
313 RESOURCE_EXHAUSTED: Quota check failed. Same as
314 google.rpc.Code.RESOURCE_EXHAUSTED.
315 BUDGET_EXCEEDED: Budget check failed.
316 DENIAL_OF_SERVICE_DETECTED: The request has been flagged as a DoS
317 attack.
318 LOAD_SHEDDING: The request should be rejected in order to protect the
319 service from being overloaded.
320 ABUSER_DETECTED: The consumer has been flagged as an abuser.
321 SERVICE_NOT_ACTIVATED: The consumer hasn't activated the service.
322 VISIBILITY_DENIED: The consumer cannot access the service due to
323 visibility configuration.
324 BILLING_DISABLED: The consumer cannot access the service because billi ng
325 is disabled.
326 PROJECT_DELETED: Consumer's project has been marked as deleted (soft
327 deletion).
328 PROJECT_INVALID: Consumer's project number or id does not represent a
329 valid project.
330 IP_ADDRESS_BLOCKED: Consumer's project does not allow requests from th is
331 IP address.
332 REFERER_BLOCKED: Consumer's project does not allow requests from this
333 referer address.
334 CLIENT_APP_BLOCKED: Consumer's project does not allow requests from th is
335 client application.
336 API_KEY_INVALID: The consumer's API key is invalid.
337 API_KEY_EXPIRED: Consumer's API Key has expired.
338 API_KEY_NOT_FOUND: Consumer's API Key not found in config record.
339 SPATULA_HEADER_INVALID: Consumer's spatula header is invalid.
340 NAMESPACE_LOOKUP_UNAVAILABLE: The backend server for looking up projec t
341 id/number is unavailable.
342 SERVICE_STATUS_UNAVAILABLE: The backend server for checking service
343 status is unavailable.
344 BILLING_STATUS_UNAVAILABLE: The backend server for checking billing
345 status is unavailable.
346 QUOTA_CHECK_UNAVAILABLE: The quota check feature is temporarily
347 unavailable: Could be due to either internal config error or server
348 error
349 """
350 ERROR_CODE_UNSPECIFIED = 0
351 NOT_FOUND = 1
352 PERMISSION_DENIED = 2
353 RESOURCE_EXHAUSTED = 3
354 BUDGET_EXCEEDED = 4
355 DENIAL_OF_SERVICE_DETECTED = 5
356 LOAD_SHEDDING = 6
357 ABUSER_DETECTED = 7
358 SERVICE_NOT_ACTIVATED = 8
359 VISIBILITY_DENIED = 9
360 BILLING_DISABLED = 10
361 PROJECT_DELETED = 11
362 PROJECT_INVALID = 12
363 IP_ADDRESS_BLOCKED = 13
364 REFERER_BLOCKED = 14
365 CLIENT_APP_BLOCKED = 15
366 API_KEY_INVALID = 16
367 API_KEY_EXPIRED = 17
368 API_KEY_NOT_FOUND = 18
369 SPATULA_HEADER_INVALID = 19
370 NAMESPACE_LOOKUP_UNAVAILABLE = 20
371 SERVICE_STATUS_UNAVAILABLE = 21
372 BILLING_STATUS_UNAVAILABLE = 22
373 QUOTA_CHECK_UNAVAILABLE = 23
374
375 code = _messages.EnumField('CodeValueValuesEnum', 1)
376 detail = _messages.StringField(2)
377
378
379 class CheckRequest(_messages.Message):
380 """The request message of the Check method.
381
382 Fields:
383 operation: The operation to be checked.
384 """
385
386 operation = _messages.MessageField('Operation', 1)
387
388
389 class CheckResponse(_messages.Message):
390 """The response message of the Check method.
391
392 Fields:
393 checkErrors: Indicate the decision of the check. If no check errors are
394 present, the service should process the operation. Otherwise the service
395 should use the list of errors to determine the appropriate action.
396 operationId: The same operation_id value used in the CheckRequest. Used
397 for logging and diagnostics purpose.
398 """
399
400 checkErrors = _messages.MessageField('CheckError', 1, repeated=True)
401 operationId = _messages.StringField(2)
402
403
404 class Context(_messages.Message):
405 """`Context` defines which contexts an API requests. Example: context:
406 rules: - selector: "*" requested: -
407 google.rpc.context.ProjectContext - google.rpc.context.OriginContext
408 The above specifies that all methods in the API request
409 `google.rpc.context.ProjectContext` and `google.rpc.context.OriginContext`.
410 Available context types are defined in package `google.rpc.context`.
411
412 Fields:
413 rules: List of rules for context, applicable to methods.
414 """
415
416 rules = _messages.MessageField('ContextRule', 1, repeated=True)
417
418
419 class ContextRule(_messages.Message):
420 """A context rule provides information about the context for an individual
421 API element.
422
423 Fields:
424 provided: A list of full type names of provided contexts.
425 requested: A list of full type names of requested contexts.
426 selector: Selects the methods to which this rule applies. Refer to
427 selector for syntax details.
428 """
429
430 provided = _messages.StringField(1, repeated=True)
431 requested = _messages.StringField(2, repeated=True)
432 selector = _messages.StringField(3)
433
434
435 class Control(_messages.Message):
436 """Selects and configures the service controller used by the service. The
437 service controller handles features like abuse, quota, billing, logging,
438 monitoring, etc.
439
440 Fields:
441 environment: The service control environment to use. If empty, no control
442 plane feature (like quota and billing) will be enabled.
443 """
444
445 environment = _messages.StringField(1)
446
447
448 class CustomError(_messages.Message):
449 """Customize service error responses. For example, list any service
450 specific protobuf types that can appear in error detail lists of error
451 responses. Example: custom_error: types: -
452 google.foo.v1.CustomError - google.foo.v1.AnotherError
453
454 Fields:
455 rules: The list of custom error rules to select to which messages this
456 should apply.
457 types: The list of custom error detail types, e.g.
458 'google.foo.v1.CustomError'.
459 """
460
461 rules = _messages.MessageField('CustomErrorRule', 1, repeated=True)
462 types = _messages.StringField(2, repeated=True)
463
464
465 class CustomErrorRule(_messages.Message):
466 """A custom error rule.
467
468 Fields:
469 isErrorType: Mark this message as possible payload in error response.
470 Otherwise, objects of this type will be filtered when they appear in
471 error payload.
472 selector: Selects messages to which this rule applies. Refer to selector
473 for syntax details.
474 """
475
476 isErrorType = _messages.BooleanField(1)
477 selector = _messages.StringField(2)
478
479
480 class CustomHttpPattern(_messages.Message):
481 """A custom pattern is used for defining custom HTTP verb.
482
483 Fields:
484 kind: The name of this custom HTTP verb.
485 path: The path matched by this custom verb.
486 """
487
488 kind = _messages.StringField(1)
489 path = _messages.StringField(2)
490
491
492 class Distribution(_messages.Message):
493 """Distribution represents a frequency distribution of double-valued sample
494 points. It contains the size of the population of sample points plus
495 additional optional information: - the arithmetic mean of the samples -
496 the minimum and maximum of the samples - the sum-squared-deviation of the
497 samples, used to compute variance - a histogram of the values of the
498 sample points
499
500 Fields:
501 bucketCounts: The number of samples in each histogram bucket.
502 `bucket_counts` are optional. If present, they must sum to the `count`
503 value. The buckets are defined below in `bucket_option`. There are N
504 buckets. `bucket_counts[0]` is the number of samples in the underflow
505 bucket. `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of
506 samples in each of the finite buckets. And `bucket_counts[N] is the
507 number of samples in the overflow bucket. See the comments of
508 `bucket_option` below for more details. Any suffix of trailing zeros
509 may be omitted.
510 count: The total number of samples in the distribution. Must be non-
511 negative.
512 explicitBuckets: Buckets with arbitrary user-provided width.
513 exponentialBuckets: Buckets with exponentially growing width.
514 linearBuckets: Buckets with constant width.
515 maximum: The maximum of the population of values. Ignored if `count` is
516 zero.
517 mean: The arithmetic mean of the samples in the distribution. If `count`
518 is zero then this field must be zero, otherwise validation of the
519 request fails.
520 minimum: The minimum of the population of values. Ignored if `count` is
521 zero.
522 sumOfSquaredDeviation: The sum of squared deviations from the mean:
523 Sum[i=1..count]((x_i - mean)^2) where each x_i is a sample values. If
524 `count` is zero then this field must be zero, otherwise validation of
525 the request fails.
526 """
527
528 bucketCounts = _messages.IntegerField(1, repeated=True)
529 count = _messages.IntegerField(2)
530 explicitBuckets = _messages.MessageField('ExplicitBuckets', 3)
531 exponentialBuckets = _messages.MessageField('ExponentialBuckets', 4)
532 linearBuckets = _messages.MessageField('LinearBuckets', 5)
533 maximum = _messages.FloatField(6)
534 mean = _messages.FloatField(7)
535 minimum = _messages.FloatField(8)
536 sumOfSquaredDeviation = _messages.FloatField(9)
537
538
539 class Documentation(_messages.Message):
540 """`Documentation` provides the information for describing a service.
541 Example: <pre><code>documentation: summary: > The Google Calendar API
542 gives access to most calendar features. pages: - name: Overview
543 content: &#40;== include google/foo/overview.md ==&#41; - name: Tutorial
544 content: &#40;== include google/foo/tutorial.md ==&#41; subpages; -
545 name: Java content: &#40;== include google/foo/tutorial_java.md
546 ==&#41; rules: - selector: google.calendar.Calendar.Get description:
547 > ... - selector: google.calendar.Calendar.Put description: >
548 ... </code></pre> Documentation is provided in markdown syntax. In addition
549 to standard markdown features, definition lists, tables and fenced code
550 blocks are supported. Section headers can be provided and are interpreted
551 relative to the section nesting of the context where a documentation
552 fragment is embedded. Documentation from the IDL is merged with
553 documentation defined via the config at normalization time, where
554 documentation provided by config rules overrides IDL provided. A number of
555 constructs specific to the API platform are supported in documentation text.
556 In order to reference a proto element, the following notation can be used:
557 <pre><code>&#91;fully.qualified.proto.name]&#91;]</code></pre> To override
558 the display text used for the link, this can be used:
559 <pre><code>&#91;display text]&#91;fully.qualified.proto.name]</code></pre>
560 Text can be excluded from doc using the following notation:
561 <pre><code>&#40;-- internal comment --&#41;</code></pre> Comments can be
562 made conditional using a visibility label. The below text will be only
563 rendered if the `BETA` label is available: <pre><code>&#40;--BETA: comment
564 for BETA users --&#41;</code></pre> A few directives are available in
565 documentation. Note that directives must appear on a single line to be
566 properly identified. The `include` directive includes a markdown file from
567 an external source: <pre><code>&#40;== include path/to/file
568 ==&#41;</code></pre> The `resource_for` directive marks a message to be the
569 resource of a collection in REST view. If it is not specified, tools attempt
570 to infer the resource from the operations in a collection:
571 <pre><code>&#40;== resource_for v1.shelves.books ==&#41;</code></pre> The
572 directive `suppress_warning` does not directly affect documentation and is
573 documented together with service config validation.
574
575 Fields:
576 documentationRootUrl: The URL to the root of documentation.
577 overview: Declares a single overview page. For example:
578 <pre><code>documentation: summary: ... overview: &#40;== include
579 overview.md ==&#41; </code></pre> This is a shortcut for the following
580 declaration (using pages style): <pre><code>documentation: summary:
581 ... pages: - name: Overview content: &#40;== include overview.md
582 ==&#41; </code></pre> Note: you cannot specify both `overview` field and
583 `pages` field.
584 pages: The top level pages for the documentation set.
585 rules: Documentation rules for individual elements of the service.
586 summary: A short summary of what the service does. Can only be provided by
587 plain text.
588 """
589
590 documentationRootUrl = _messages.StringField(1)
591 overview = _messages.StringField(2)
592 pages = _messages.MessageField('Page', 3, repeated=True)
593 rules = _messages.MessageField('DocumentationRule', 4, repeated=True)
594 summary = _messages.StringField(5)
595
596
597 class DocumentationRule(_messages.Message):
598 """A documentation rule provides information about individual API elements.
599
600 Fields:
601 deprecationDescription: Deprecation description of the selected
602 element(s). It can be provided if an element is marked as `deprecated`.
603 description: Description of the selected API(s).
604 selector: The selector is a comma-separated list of patterns. Each pattern
605 is a qualified name of the element which may end in "*", indicating a
606 wildcard. Wildcards are only allowed at the end and for a whole
607 component of the qualified name, i.e. "foo.*" is ok, but not "foo.b*" or
608 "foo.*.bar". To specify a default for all applicable elements, the whole
609 pattern "*" is used.
610 """
611
612 deprecationDescription = _messages.StringField(1)
613 description = _messages.StringField(2)
614 selector = _messages.StringField(3)
615
616
617 class Enum(_messages.Message):
618 """Enum type definition.
619
620 Enums:
621 SyntaxValueValuesEnum: The source syntax.
622
623 Fields:
624 enumvalue: Enum value definitions.
625 name: Enum type name.
626 options: Protocol buffer options.
627 sourceContext: The source context.
628 syntax: The source syntax.
629 """
630
631 class SyntaxValueValuesEnum(_messages.Enum):
632 """The source syntax.
633
634 Values:
635 SYNTAX_PROTO2: Syntax `proto2`.
636 SYNTAX_PROTO3: Syntax `proto3`.
637 """
638 SYNTAX_PROTO2 = 0
639 SYNTAX_PROTO3 = 1
640
641 enumvalue = _messages.MessageField('EnumValue', 1, repeated=True)
642 name = _messages.StringField(2)
643 options = _messages.MessageField('Option', 3, repeated=True)
644 sourceContext = _messages.MessageField('SourceContext', 4)
645 syntax = _messages.EnumField('SyntaxValueValuesEnum', 5)
646
647
648 class EnumValue(_messages.Message):
649 """Enum value definition.
650
651 Fields:
652 name: Enum value name.
653 number: Enum value number.
654 options: Protocol buffer options.
655 """
656
657 name = _messages.StringField(1)
658 number = _messages.IntegerField(2, variant=_messages.Variant.INT32)
659 options = _messages.MessageField('Option', 3, repeated=True)
660
661
662 class ExplicitBuckets(_messages.Message):
663 """Describing buckets with arbitrary user-provided width.
664
665 Fields:
666 bounds: 'bound' is a list of strictly increasing boundaries between
667 buckets. Note that a list of length N-1 defines N buckets because of
668 fenceposting. See comments on `bucket_options` for details. The i'th
669 finite bucket covers the interval [bound[i-1], bound[i]) where i
670 ranges from 1 to bound_size() - 1. Note that there are no finite buckets
671 at all if 'bound' only contains a single element; in that special case
672 the single bound defines the boundary between the underflow and overflow
673 buckets. bucket number lower bound upper bound i
674 == 0 (underflow) -inf bound[i] 0 < i <
675 bound_size() bound[i-1] bound[i] i == bound_size()
676 (overflow) bound[i-1] +inf
677 """
678
679 bounds = _messages.FloatField(1, repeated=True)
680
681
682 class ExponentialBuckets(_messages.Message):
683 """Describing buckets with exponentially growing width.
684
685 Fields:
686 growthFactor: The i'th exponential bucket covers the interval [scale *
687 growth_factor^(i-1), scale * growth_factor^i) where i ranges from 1 to
688 num_finite_buckets inclusive. Must be larger than 1.0.
689 numFiniteBuckets: The number of finite buckets. With the underflow and
690 overflow buckets, the total number of buckets is `num_finite_buckets` +
691 2. See comments on `bucket_options` for details.
692 scale: The i'th exponential bucket covers the interval [scale *
693 growth_factor^(i-1), scale * growth_factor^i) where i ranges from 1 to
694 num_finite_buckets inclusive. Must be strictly positive.
695 """
696
697 growthFactor = _messages.FloatField(1)
698 numFiniteBuckets = _messages.IntegerField(2, variant=_messages.Variant.INT32 )
699 scale = _messages.FloatField(3)
700
701
702 class Field(_messages.Message):
703 """A single field of a message type.
704
705 Enums:
706 CardinalityValueValuesEnum: The field cardinality.
707 KindValueValuesEnum: The field type.
708
709 Fields:
710 cardinality: The field cardinality.
711 defaultValue: The string value of the default value of this field. Proto2
712 syntax only.
713 jsonName: The field JSON name.
714 kind: The field type.
715 name: The field name.
716 number: The field number.
717 oneofIndex: The index of the field type in `Type.oneofs`, for message or
718 enumeration types. The first type has index 1; zero means the type is
719 not in the list.
720 options: The protocol buffer options.
721 packed: Whether to use alternative packed wire representation.
722 typeUrl: The field type URL, without the scheme, for message or
723 enumeration types. Example:
724 `"type.googleapis.com/google.protobuf.Timestamp"`.
725 """
726
727 class CardinalityValueValuesEnum(_messages.Enum):
728 """The field cardinality.
729
730 Values:
731 CARDINALITY_UNKNOWN: For fields with unknown cardinality.
732 CARDINALITY_OPTIONAL: For optional fields.
733 CARDINALITY_REQUIRED: For required fields. Proto2 syntax only.
734 CARDINALITY_REPEATED: For repeated fields.
735 """
736 CARDINALITY_UNKNOWN = 0
737 CARDINALITY_OPTIONAL = 1
738 CARDINALITY_REQUIRED = 2
739 CARDINALITY_REPEATED = 3
740
741 class KindValueValuesEnum(_messages.Enum):
742 """The field type.
743
744 Values:
745 TYPE_UNKNOWN: Field type unknown.
746 TYPE_DOUBLE: Field type double.
747 TYPE_FLOAT: Field type float.
748 TYPE_INT64: Field type int64.
749 TYPE_UINT64: Field type uint64.
750 TYPE_INT32: Field type int32.
751 TYPE_FIXED64: Field type fixed64.
752 TYPE_FIXED32: Field type fixed32.
753 TYPE_BOOL: Field type bool.
754 TYPE_STRING: Field type string.
755 TYPE_GROUP: Field type group. Proto2 syntax only, and deprecated.
756 TYPE_MESSAGE: Field type message.
757 TYPE_BYTES: Field type bytes.
758 TYPE_UINT32: Field type uint32.
759 TYPE_ENUM: Field type enum.
760 TYPE_SFIXED32: Field type sfixed32.
761 TYPE_SFIXED64: Field type sfixed64.
762 TYPE_SINT32: Field type sint32.
763 TYPE_SINT64: Field type sint64.
764 """
765 TYPE_UNKNOWN = 0
766 TYPE_DOUBLE = 1
767 TYPE_FLOAT = 2
768 TYPE_INT64 = 3
769 TYPE_UINT64 = 4
770 TYPE_INT32 = 5
771 TYPE_FIXED64 = 6
772 TYPE_FIXED32 = 7
773 TYPE_BOOL = 8
774 TYPE_STRING = 9
775 TYPE_GROUP = 10
776 TYPE_MESSAGE = 11
777 TYPE_BYTES = 12
778 TYPE_UINT32 = 13
779 TYPE_ENUM = 14
780 TYPE_SFIXED32 = 15
781 TYPE_SFIXED64 = 16
782 TYPE_SINT32 = 17
783 TYPE_SINT64 = 18
784
785 cardinality = _messages.EnumField('CardinalityValueValuesEnum', 1)
786 defaultValue = _messages.StringField(2)
787 jsonName = _messages.StringField(3)
788 kind = _messages.EnumField('KindValueValuesEnum', 4)
789 name = _messages.StringField(5)
790 number = _messages.IntegerField(6, variant=_messages.Variant.INT32)
791 oneofIndex = _messages.IntegerField(7, variant=_messages.Variant.INT32)
792 options = _messages.MessageField('Option', 8, repeated=True)
793 packed = _messages.BooleanField(9)
794 typeUrl = _messages.StringField(10)
795
796
797 class Http(_messages.Message):
798 """Defines the HTTP configuration for a service. It contains a list of
799 HttpRule, each specifying the mapping of an RPC method to one or more HTTP
800 REST API methods.
801
802 Fields:
803 rules: A list of HTTP rules for configuring the HTTP REST API methods.
804 """
805
806 rules = _messages.MessageField('HttpRule', 1, repeated=True)
807
808
809 class HttpRequest(_messages.Message):
810 """A common proto for logging HTTP requests.
811
812 Fields:
813 cacheFillBytes: The number of HTTP response bytes inserted into cache. Set
814 only when a cache fill was attempted.
815 cacheHit: Whether or not an entity was served from cache (with or without
816 validation).
817 cacheLookup: Whether or not a cache lookup was attempted.
818 cacheValidatedWithOriginServer: Whether or not the response was validated
819 with the origin server before being served from cache. This field is
820 only meaningful if `cache_hit` is True.
821 referer: The referer URL of the request, as defined in [HTTP/1.1 Header
822 Field
823 Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
824 remoteIp: The IP address (IPv4 or IPv6) of the client that issued the HTTP
825 request. Examples: `"192.168.1.1"`, `"FE80::0202:B3FF:FE1E:8329"`.
826 requestMethod: The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`,
827 `"POST"`.
828 requestSize: The size of the HTTP request message in bytes, including the
829 request headers and the request body.
830 requestUrl: The scheme (http, https), the host name, the path and the
831 query portion of the URL that was requested. Example:
832 `"http://example.com/some/info?color=red"`.
833 responseSize: The size of the HTTP response message sent back to the
834 client, in bytes, including the response headers and the response body.
835 serverIp: The IP address (IPv4 or IPv6) of the origin server that the
836 request was sent to.
837 status: The response code indicating the status of response. Examples:
838 200, 404.
839 userAgent: The user agent sent by the client. Example: `"Mozilla/4.0
840 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"`.
841 """
842
843 cacheFillBytes = _messages.IntegerField(1)
844 cacheHit = _messages.BooleanField(2)
845 cacheLookup = _messages.BooleanField(3)
846 cacheValidatedWithOriginServer = _messages.BooleanField(4)
847 referer = _messages.StringField(5)
848 remoteIp = _messages.StringField(6)
849 requestMethod = _messages.StringField(7)
850 requestSize = _messages.IntegerField(8)
851 requestUrl = _messages.StringField(9)
852 responseSize = _messages.IntegerField(10)
853 serverIp = _messages.StringField(11)
854 status = _messages.IntegerField(12, variant=_messages.Variant.INT32)
855 userAgent = _messages.StringField(13)
856
857
858 class HttpRule(_messages.Message):
859 """`HttpRule` defines the mapping of an RPC method to one or more HTTP REST
860 APIs. The mapping determines what portions of the request message are
861 populated from the path, query parameters, or body of the HTTP request. The
862 mapping is typically specified as an `google.api.http` annotation, see
863 "google/api/annotations.proto" for details. The mapping consists of a field
864 specifying the path template and method kind. The path template can refer
865 to fields in the request message, as in the example below which describes a
866 REST GET operation on a resource collection of messages: ```proto service
867 Messaging { rpc GetMessage(GetMessageRequest) returns (Message) {
868 option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}";
869 } } message GetMessageRequest { message SubMessage { string subfield =
870 1; } string message_id = 1; // mapped to the URL SubMessage sub = 2;
871 // `sub.subfield` is url-mapped } message Message { string text = 1; //
872 content of the resource } ``` This definition enables an automatic,
873 bidrectional mapping of HTTP JSON to RPC. Example: HTTP | RPC -----|-----
874 `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub:
875 SubMessage(subfield: "foo"))` In general, not only fields but also field
876 paths can be referenced from a path pattern. Fields mapped to the path
877 pattern cannot be repeated and must have a primitive (non-message) type.
878 Any fields in the request message which are not bound by the path pattern
879 automatically become (optional) HTTP query parameters. Assume the following
880 definition of the request message: ```proto message GetMessageRequest {
881 message SubMessage { string subfield = 1; } string message_id = 1;
882 // mapped to the URL int64 revision = 2; // becomes a parameter
883 SubMessage sub = 3; // `sub.subfield` becomes a parameter } ``` This
884 enables a HTTP JSON to RPC mapping as below: HTTP | RPC -----|----- `GET
885 /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id:
886 "123456" revision: 2 sub: SubMessage(subfield: "foo"))` Note that fields
887 which are mapped to HTTP parameters must have a primitive type or a repeated
888 primitive type. Message types are not allowed. In the case of a repeated
889 type, the parameter can be repeated in the URL, as in `...?param=A&param=B`.
890 For HTTP method kinds which allow a request body, the `body` field specifies
891 the mapping. Consider a REST update method on the message resource
892 collection: ```proto service Messaging { rpc
893 UpdateMessage(UpdateMessageRequest) returns (Message) { option
894 (google.api.http) = { put: "/v1/messages/{message_id}" body:
895 "message" }; } } message UpdateMessageRequest { string message_id =
896 1; // mapped to the URL Message message = 2; // mapped to the body } ```
897 The following HTTP JSON to RPC mapping is enabled, where the representation
898 of the JSON in the request body is determined by protos JSON encoding: HTTP
899 | RPC -----|----- `PUT /v1/messages/123456 { "text": "Hi!" }` |
900 `UpdateMessage(message_id: "123456" message { text: "Hi!" })` The special
901 name `*` can be used in the body mapping to define that every field not
902 bound by the path template should be mapped to the request body. This
903 enables the following alternative definition of the update method: ```proto
904 service Messaging { rpc UpdateMessage(Message) returns (Message) {
905 option (google.api.http) = { put: "/v1/messages/{message_id}"
906 body: "*" }; } } message Message { string message_id = 1; string
907 text = 2; } ``` The following HTTP JSON to RPC mapping is enabled: HTTP |
908 RPC -----|----- `PUT /v1/messages/123456 { "text": "Hi!" }` |
909 `UpdateMessage(message_id: "123456" text: "Hi!")` Note that when using `*`
910 in the body mapping, it is not possible to have HTTP parameters, as all
911 fields not bound by the path end in the body. This makes this option more
912 rarely used in practice of defining REST APIs. The common usage of `*` is in
913 custom methods which don't use the URL at all for transferring data. It is
914 possible to define multiple HTTP methods for one RPC by using the
915 `additional_bindings` option. Example: ```proto service Messaging { rpc
916 GetMessage(GetMessageRequest) returns (Message) { option
917 (google.api.http) = { get: "/v1/messages/{message_id}"
918 additional_bindings { get:
919 "/v1/users/{user_id}/messages/{message_id}" } }; } } message
920 GetMessageRequest { string message_id = 1; string user_id = 2; } ```
921 This enables the following two alternative HTTP JSON to RPC mappings: HTTP
922 | RPC -----|----- `GET /v1/messages/123456` | `GetMessage(message_id:
923 "123456")` `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me"
924 message_id: "123456")` # Rules for HTTP mapping The rules for mapping HTTP
925 path, query parameters, and body fields to the request message are as
926 follows: 1. The `body` field specifies either `*` or a field path, or is
927 omitted. If omitted, it assumes there is no HTTP body. 2. Leaf fields
928 (recursive expansion of nested messages in the request) can be classified
929 into three types: (a) Matched in the URL template. (b) Covered by
930 body (if body is `*`, everything except (a) fields; else everything
931 under the body field) (c) All other fields. 3. URL query parameters
932 found in the HTTP request are mapped to (c) fields. 4. Any body sent with an
933 HTTP request can contain only (b) fields. The syntax of the path template
934 is as follows: Template = "/" Segments [ Verb ] ; Segments =
935 Segment { "/" Segment } ; Segment = "*" | "**" | LITERAL | Variable ;
936 Variable = "{" FieldPath [ "=" Segments ] "}" ; FieldPath = IDENT { "."
937 IDENT } ; Verb = ":" LITERAL ; The syntax `*` matches a single path
938 segment. It follows the semantics of [RFC
939 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
940 Expansion. The syntax `**` matches zero or more path segments. It follows
941 the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section
942 3.2.3 Reserved Expansion. The syntax `LITERAL` matches literal text in the
943 URL path. The syntax `Variable` matches the entire path as specified by its
944 template; this nested template must not contain further variables. If a
945 variable matches a single path segment, its template may be omitted, e.g.
946 `{var}` is equivalent to `{var=*}`. NOTE: the field paths in variables and
947 in the `body` must not refer to repeated fields or map fields. Use
948 CustomHttpPattern to specify any HTTP method that is not included in the
949 `pattern` field, such as HEAD, or "*" to leave the HTTP method unspecified
950 for a given URL path rule. The wild-card rule is useful for services that
951 provide content to Web (HTML) clients.
952
953 Fields:
954 additionalBindings: Additional HTTP bindings for the selector. Nested
955 bindings must not contain an `additional_bindings` field themselves
956 (that is, the nesting may only be one level deep).
957 body: The name of the request field whose value is mapped to the HTTP
958 body, or `*` for mapping all fields not captured by the path pattern to
959 the HTTP body. NOTE: the referred field must not be a repeated field.
960 custom: Custom pattern is used for defining custom verbs.
961 delete: Used for deleting a resource.
962 get: Used for listing and getting information about resources.
963 mediaDownload: Do not use this. For media support, add instead
964 [][google.bytestream.RestByteStream] as an API to your configuration.
965 mediaUpload: Do not use this. For media support, add instead
966 [][google.bytestream.RestByteStream] as an API to your configuration.
967 patch: Used for updating a resource.
968 post: Used for creating a resource.
969 put: Used for updating a resource.
970 selector: Selects methods to which this rule applies. Refer to selector
971 for syntax details.
972 """
973
974 additionalBindings = _messages.MessageField('HttpRule', 1, repeated=True)
975 body = _messages.StringField(2)
976 custom = _messages.MessageField('CustomHttpPattern', 3)
977 delete = _messages.StringField(4)
978 get = _messages.StringField(5)
979 mediaDownload = _messages.MessageField('MediaDownload', 6)
980 mediaUpload = _messages.MessageField('MediaUpload', 7)
981 patch = _messages.StringField(8)
982 post = _messages.StringField(9)
983 put = _messages.StringField(10)
984 selector = _messages.StringField(11)
985
986
987 class LabelDescriptor(_messages.Message):
988 """A description of a label.
989
990 Enums:
991 ValueTypeValueValuesEnum: The type of data that can be assigned to the
992 label.
993
994 Fields:
995 description: A human-readable description for the label.
996 key: The label key.
997 valueType: The type of data that can be assigned to the label.
998 """
999
1000 class ValueTypeValueValuesEnum(_messages.Enum):
1001 """The type of data that can be assigned to the label.
1002
1003 Values:
1004 STRING: A variable-length string. This is the default.
1005 BOOL: Boolean; true or false.
1006 INT64: A 64-bit signed integer.
1007 """
1008 STRING = 0
1009 BOOL = 1
1010 INT64 = 2
1011
1012 description = _messages.StringField(1)
1013 key = _messages.StringField(2)
1014 valueType = _messages.EnumField('ValueTypeValueValuesEnum', 3)
1015
1016
1017 class LinearBuckets(_messages.Message):
1018 """Describing buckets with constant width.
1019
1020 Fields:
1021 numFiniteBuckets: The number of finite buckets. With the underflow and
1022 overflow buckets, the total number of buckets is `num_finite_buckets` +
1023 2. See comments on `bucket_options` for details.
1024 offset: The i'th linear bucket covers the interval [offset + (i-1) *
1025 width, offset + i * width) where i ranges from 1 to num_finite_buckets,
1026 inclusive.
1027 width: The i'th linear bucket covers the interval [offset + (i-1) *
1028 width, offset + i * width) where i ranges from 1 to num_finite_buckets,
1029 inclusive. Must be strictly positive.
1030 """
1031
1032 numFiniteBuckets = _messages.IntegerField(1, variant=_messages.Variant.INT32 )
1033 offset = _messages.FloatField(2)
1034 width = _messages.FloatField(3)
1035
1036
1037 class LogDescriptor(_messages.Message):
1038 """A description of a log type. Example in YAML format: - name:
1039 library.googleapis.com/activity_history description: The history of
1040 borrowing and returning library items. display_name: Activity
1041 labels: - key: /customer_id description: Identifier of a
1042 library customer
1043
1044 Fields:
1045 description: A human-readable description of this log. This information
1046 appears in the documentation and can contain details.
1047 displayName: The human-readable name for this log. This information
1048 appears on the user interface and should be concise.
1049 labels: The set of labels that are available to describe a specific log
1050 entry. Runtime requests that contain labels not specified here are
1051 considered invalid.
1052 name: The name of the log. It must be less than 512 characters long and
1053 can include the following characters: upper- and lower-case alphanumeric
1054 characters [A-Za-z0-9], and punctuation characters including slash,
1055 underscore, hyphen, period [/_-.].
1056 """
1057
1058 description = _messages.StringField(1)
1059 displayName = _messages.StringField(2)
1060 labels = _messages.MessageField('LabelDescriptor', 3, repeated=True)
1061 name = _messages.StringField(4)
1062
1063
1064 class LogEntry(_messages.Message):
1065 """An individual log entry.
1066
1067 Enums:
1068 SeverityValueValuesEnum: Optional. The severity of the log entry. The
1069 default value is `LogSeverity.DEFAULT`.
1070
1071 Messages:
1072 LabelsValue: Optional. A set of user-defined (key, value) data that
1073 provides additional information about the log entry.
1074 ProtoPayloadValue: The log entry payload, represented as a protocol buffer
1075 that is expressed as a JSON object. You can only pass `protoPayload`
1076 values that belong to a set of approved types.
1077 StructPayloadValue: The log entry payload, represented as a structure that
1078 is expressed as a JSON object.
1079
1080 Fields:
1081 httpRequest: Information about the HTTP request associated with this log
1082 entry, if applicable. Deprecated. Please use fields 10-13.
1083 insertId: A unique ID for the log entry used for deduplication. If
1084 omitted, the implementation will generate one based on operation_id.
1085 labels: Optional. A set of user-defined (key, value) data that provides
1086 additional information about the log entry.
1087 log: The log to which this entry belongs. When a log entry is written, the
1088 value of this field is set by the logging system. Deprecated. Please
1089 use fields 10-13.
1090 metadata: Information about the log entry. Deprecated. Please use fields
1091 10-13.
1092 name: Required. The log to which this log entry belongs. Examples:
1093 `"syslog"`, `"book_log"`.
1094 operation: Optional. Information about an operation associated with the
1095 log entry, if applicable. Deprecated. Please use fields 10-13.
1096 protoPayload: The log entry payload, represented as a protocol buffer that
1097 is expressed as a JSON object. You can only pass `protoPayload` values
1098 that belong to a set of approved types.
1099 severity: Optional. The severity of the log entry. The default value is
1100 `LogSeverity.DEFAULT`.
1101 structPayload: The log entry payload, represented as a structure that is
1102 expressed as a JSON object.
1103 textPayload: The log entry payload, represented as a Unicode string
1104 (UTF-8).
1105 timestamp: Optional. The time the event described by the log entry
1106 occurred. If omitted, defaults to operation start time.
1107 """
1108
1109 class SeverityValueValuesEnum(_messages.Enum):
1110 """Optional. The severity of the log entry. The default value is
1111 `LogSeverity.DEFAULT`.
1112
1113 Values:
1114 DEFAULT: The log entry has no assigned severity level.
1115 DEBUG: Debug or trace information.
1116 INFO: Routine information, such as ongoing status or performance.
1117 NOTICE: Normal but significant events, such as start up, shut down, or
1118 configuration.
1119 WARNING: Warning events might cause problems.
1120 ERROR: Error events are likely to cause problems.
1121 CRITICAL: Critical events cause more severe problems or brief outages.
1122 ALERT: A person must take an action immediately.
1123 EMERGENCY: One or more systems are unusable.
1124 """
1125 DEFAULT = 0
1126 DEBUG = 1
1127 INFO = 2
1128 NOTICE = 3
1129 WARNING = 4
1130 ERROR = 5
1131 CRITICAL = 6
1132 ALERT = 7
1133 EMERGENCY = 8
1134
1135 @encoding.MapUnrecognizedFields('additionalProperties')
1136 class LabelsValue(_messages.Message):
1137 """Optional. A set of user-defined (key, value) data that provides
1138 additional information about the log entry.
1139
1140 Messages:
1141 AdditionalProperty: An additional property for a LabelsValue object.
1142
1143 Fields:
1144 additionalProperties: Additional properties of type LabelsValue
1145 """
1146
1147 class AdditionalProperty(_messages.Message):
1148 """An additional property for a LabelsValue object.
1149
1150 Fields:
1151 key: Name of the additional property.
1152 value: A string attribute.
1153 """
1154
1155 key = _messages.StringField(1)
1156 value = _messages.StringField(2)
1157
1158 additionalProperties = _messages.MessageField('AdditionalProperty', 1, r epeated=True)
1159
1160 @encoding.MapUnrecognizedFields('additionalProperties')
1161 class ProtoPayloadValue(_messages.Message):
1162 """The log entry payload, represented as a protocol buffer that is
1163 expressed as a JSON object. You can only pass `protoPayload` values that
1164 belong to a set of approved types.
1165
1166 Messages:
1167 AdditionalProperty: An additional property for a ProtoPayloadValue
1168 object.
1169
1170 Fields:
1171 additionalProperties: Properties of the object. Contains field @ype wi th
1172 type URL.
1173 """
1174
1175 class AdditionalProperty(_messages.Message):
1176 """An additional property for a ProtoPayloadValue object.
1177
1178 Fields:
1179 key: Name of the additional property.
1180 value: A extra_types.JsonValue attribute.
1181 """
1182
1183 key = _messages.StringField(1)
1184 value = _messages.MessageField('extra_types.JsonValue', 2)
1185
1186 additionalProperties = _messages.MessageField('AdditionalProperty', 1, r epeated=True)
1187
1188 @encoding.MapUnrecognizedFields('additionalProperties')
1189 class StructPayloadValue(_messages.Message):
1190 """The log entry payload, represented as a structure that is expressed a s
1191 a JSON object.
1192
1193 Messages:
1194 AdditionalProperty: An additional property for a StructPayloadValue
1195 object.
1196
1197 Fields:
1198 additionalProperties: Properties of the object.
1199 """
1200
1201 class AdditionalProperty(_messages.Message):
1202 """An additional property for a StructPayloadValue object.
1203
1204 Fields:
1205 key: Name of the additional property.
1206 value: A extra_types.JsonValue attribute.
1207 """
1208
1209 key = _messages.StringField(1)
1210 value = _messages.MessageField('extra_types.JsonValue', 2)
1211
1212 additionalProperties = _messages.MessageField('AdditionalProperty', 1, r epeated=True)
1213
1214 httpRequest = _messages.MessageField('HttpRequest', 1)
1215 insertId = _messages.StringField(2)
1216 labels = _messages.MessageField('LabelsValue', 3)
1217 log = _messages.StringField(4)
1218 metadata = _messages.MessageField('LogEntryMetadata', 5)
1219 name = _messages.StringField(6)
1220 operation = _messages.MessageField('LogEntryOperation', 7)
1221 protoPayload = _messages.MessageField('ProtoPayloadValue', 8)
1222 severity = _messages.EnumField('SeverityValueValuesEnum', 9)
1223 structPayload = _messages.MessageField('StructPayloadValue', 10)
1224 textPayload = _messages.StringField(11)
1225 timestamp = _messages.StringField(12)
1226
1227
1228 class LogEntryMetadata(_messages.Message):
1229 """Additional data that is associated with a log entry, set by the service
1230 creating the log entry.
1231
1232 Enums:
1233 SeverityValueValuesEnum: The severity of the log entry. If omitted,
1234 `LogSeverity.DEFAULT` is used.
1235
1236 Messages:
1237 LabelsValue: A set of (key, value) data that provides additional
1238 information about the log entry. If the log entry is from one of the
1239 Google Cloud Platform sources listed below, the indicated (key, value)
1240 information must be provided: Google App Engine, service_name
1241 `appengine.googleapis.com`: "appengine.googleapis.com/module_id",
1242 <module ID> "appengine.googleapis.com/version_id", <version ID>
1243 and one of: "appengine.googleapis.com/replica_index", <instance
1244 index> "appengine.googleapis.com/clone_id", <instance ID> or
1245 else provide the following Compute Engine labels: Google Compute
1246 Engine, service_name `compute.googleapis.com`:
1247 "compute.googleapis.com/resource_type", "instance"
1248 "compute.googleapis.com/resource_id", <instance ID>
1249
1250 Fields:
1251 labels: A set of (key, value) data that provides additional information
1252 about the log entry. If the log entry is from one of the Google Cloud
1253 Platform sources listed below, the indicated (key, value) information
1254 must be provided: Google App Engine, service_name
1255 `appengine.googleapis.com`: "appengine.googleapis.com/module_id",
1256 <module ID> "appengine.googleapis.com/version_id", <version ID>
1257 and one of: "appengine.googleapis.com/replica_index", <instance
1258 index> "appengine.googleapis.com/clone_id", <instance ID> or
1259 else provide the following Compute Engine labels: Google Compute
1260 Engine, service_name `compute.googleapis.com`:
1261 "compute.googleapis.com/resource_type", "instance"
1262 "compute.googleapis.com/resource_id", <instance ID>
1263 projectId: The project ID of the Google Cloud Platform service that
1264 created the log entry.
1265 region: The region name of the Google Cloud Platform service that created
1266 the log entry. For example, `"us-central1"`.
1267 serviceName: Required. The API name of the Google Cloud Platform service
1268 that created the log entry. For example, `"compute.googleapis.com"`.
1269 severity: The severity of the log entry. If omitted, `LogSeverity.DEFAULT`
1270 is used.
1271 timestamp: The time the event described by the log entry occurred.
1272 Timestamps must be later than January 1, 1970. If omitted, Stackdriver
1273 Logging will use the time the log entry is received.
1274 userId: The fully-qualified email address of the authenticated user that
1275 performed or requested the action represented by the log entry. If the
1276 log entry does not apply to an action taken by an authenticated user,
1277 then the field should be empty.
1278 zone: The zone of the Google Cloud Platform service that created the log
1279 entry. For example, `"us-central1-a"`.
1280 """
1281
1282 class SeverityValueValuesEnum(_messages.Enum):
1283 """The severity of the log entry. If omitted, `LogSeverity.DEFAULT` is
1284 used.
1285
1286 Values:
1287 DEFAULT: The log entry has no assigned severity level.
1288 DEBUG: Debug or trace information.
1289 INFO: Routine information, such as ongoing status or performance.
1290 NOTICE: Normal but significant events, such as start up, shut down, or
1291 configuration.
1292 WARNING: Warning events might cause problems.
1293 ERROR: Error events are likely to cause problems.
1294 CRITICAL: Critical events cause more severe problems or brief outages.
1295 ALERT: A person must take an action immediately.
1296 EMERGENCY: One or more systems are unusable.
1297 """
1298 DEFAULT = 0
1299 DEBUG = 1
1300 INFO = 2
1301 NOTICE = 3
1302 WARNING = 4
1303 ERROR = 5
1304 CRITICAL = 6
1305 ALERT = 7
1306 EMERGENCY = 8
1307
1308 @encoding.MapUnrecognizedFields('additionalProperties')
1309 class LabelsValue(_messages.Message):
1310 """A set of (key, value) data that provides additional information about
1311 the log entry. If the log entry is from one of the Google Cloud Platform
1312 sources listed below, the indicated (key, value) information must be
1313 provided: Google App Engine, service_name `appengine.googleapis.com`:
1314 "appengine.googleapis.com/module_id", <module ID>
1315 "appengine.googleapis.com/version_id", <version ID> and one of :
1316 "appengine.googleapis.com/replica_index", <instance index>
1317 "appengine.googleapis.com/clone_id", <instance ID> or else provide
1318 the following Compute Engine labels: Google Compute Engine, service_nam e
1319 `compute.googleapis.com`: "compute.googleapis.com/resource_type" ,
1320 "instance" "compute.googleapis.com/resource_id", <instance ID>
1321
1322 Messages:
1323 AdditionalProperty: An additional property for a LabelsValue object.
1324
1325 Fields:
1326 additionalProperties: Additional properties of type LabelsValue
1327 """
1328
1329 class AdditionalProperty(_messages.Message):
1330 """An additional property for a LabelsValue object.
1331
1332 Fields:
1333 key: Name of the additional property.
1334 value: A string attribute.
1335 """
1336
1337 key = _messages.StringField(1)
1338 value = _messages.StringField(2)
1339
1340 additionalProperties = _messages.MessageField('AdditionalProperty', 1, r epeated=True)
1341
1342 labels = _messages.MessageField('LabelsValue', 1)
1343 projectId = _messages.StringField(2)
1344 region = _messages.StringField(3)
1345 serviceName = _messages.StringField(4)
1346 severity = _messages.EnumField('SeverityValueValuesEnum', 5)
1347 timestamp = _messages.StringField(6)
1348 userId = _messages.StringField(7)
1349 zone = _messages.StringField(8)
1350
1351
1352 class LogEntryOperation(_messages.Message):
1353 """Additional information about a potentially long running operation with
1354 which a log entry is associated.
1355
1356 Fields:
1357 first: True for the first entry associated with `id`.
1358 id: An opaque identifier. A producer of log entries should ensure that
1359 `id` is only reused for entries related to one operation.
1360 last: True for the last entry associated with `id`.
1361 producer: Ensures the operation can be uniquely identified. The
1362 combination of `id` and `producer` should be made globally unique by
1363 filling `producer` with a value that disambiguates the service that
1364 created `id`.
1365 """
1366
1367 first = _messages.BooleanField(1)
1368 id = _messages.StringField(2)
1369 last = _messages.BooleanField(3)
1370 producer = _messages.StringField(4)
1371
1372
1373 class Logging(_messages.Message):
1374 """Logging configuration of the service. The following example shows how to
1375 configure logs to be sent to the producer and consumer projects. In the
1376 example, the `library.googleapis.com/activity_history` log is sent to both
1377 the producer and consumer projects, whereas the
1378 `library.googleapis.com/purchase_history` log is only sent to the producer
1379 project: monitored_resources: - type: library.googleapis.com/branch
1380 labels: - key: /city description: The city where the library
1381 branch is located in. - key: /name description: The name of
1382 the branch. logs: - name: library.googleapis.com/activity_history
1383 labels: - key: /customer_id - name:
1384 library.googleapis.com/purchase_history logging:
1385 producer_destinations: - monitored_resource:
1386 library.googleapis.com/branch logs: -
1387 library.googleapis.com/activity_history -
1388 library.googleapis.com/purchase_history consumer_destinations: -
1389 monitored_resource: library.googleapis.com/branch logs: -
1390 library.googleapis.com/activity_history
1391
1392 Fields:
1393 consumerDestinations: Logging configurations for sending logs to the
1394 consumer project. There can be multiple consumer destinations, each one
1395 must have a different monitored resource type. A log can be used in at
1396 most one consumer destination.
1397 producerDestinations: Logging configurations for sending logs to the
1398 producer project. There can be multiple producer destinations, each one
1399 must have a different monitored resource type. A log can be used in at
1400 most one producer destination.
1401 """
1402
1403 consumerDestinations = _messages.MessageField('LoggingDestination', 1, repea ted=True)
1404 producerDestinations = _messages.MessageField('LoggingDestination', 2, repea ted=True)
1405
1406
1407 class LoggingDestination(_messages.Message):
1408 """Configuration of a specific logging destination (the producer project or
1409 the consumer project).
1410
1411 Fields:
1412 logs: Names of the logs to be sent to this destination. Each name must be
1413 defined in the Service.logs section.
1414 monitoredResource: The monitored resource type. The type must be defined
1415 in Service.monitored_resources section.
1416 """
1417
1418 logs = _messages.StringField(1, repeated=True)
1419 monitoredResource = _messages.StringField(2)
1420
1421
1422 class MediaDownload(_messages.Message):
1423 """Do not use this. For media support, add instead
1424 [][google.bytestream.RestByteStream] as an API to your configuration.
1425
1426 Fields:
1427 enabled: Whether download is enabled.
1428 """
1429
1430 enabled = _messages.BooleanField(1)
1431
1432
1433 class MediaUpload(_messages.Message):
1434 """Do not use this. For media support, add instead
1435 [][google.bytestream.RestByteStream] as an API to your configuration.
1436
1437 Fields:
1438 enabled: Whether upload is enabled.
1439 """
1440
1441 enabled = _messages.BooleanField(1)
1442
1443
1444 class Method(_messages.Message):
1445 """Method represents a method of an api.
1446
1447 Enums:
1448 SyntaxValueValuesEnum: The source syntax of this method.
1449
1450 Fields:
1451 name: The simple name of this method.
1452 options: Any metadata attached to the method.
1453 requestStreaming: If true, the request is streamed.
1454 requestTypeUrl: A URL of the input message type.
1455 responseStreaming: If true, the response is streamed.
1456 responseTypeUrl: The URL of the output message type.
1457 syntax: The source syntax of this method.
1458 """
1459
1460 class SyntaxValueValuesEnum(_messages.Enum):
1461 """The source syntax of this method.
1462
1463 Values:
1464 SYNTAX_PROTO2: Syntax `proto2`.
1465 SYNTAX_PROTO3: Syntax `proto3`.
1466 """
1467 SYNTAX_PROTO2 = 0
1468 SYNTAX_PROTO3 = 1
1469
1470 name = _messages.StringField(1)
1471 options = _messages.MessageField('Option', 2, repeated=True)
1472 requestStreaming = _messages.BooleanField(3)
1473 requestTypeUrl = _messages.StringField(4)
1474 responseStreaming = _messages.BooleanField(5)
1475 responseTypeUrl = _messages.StringField(6)
1476 syntax = _messages.EnumField('SyntaxValueValuesEnum', 7)
1477
1478
1479 class MetricDescriptor(_messages.Message):
1480 """Defines a metric type and its schema.
1481
1482 Enums:
1483 MetricKindValueValuesEnum: Whether the metric records instantaneous
1484 values, changes to a value, etc.
1485 ValueTypeValueValuesEnum: Whether the measurement is an integer, a
1486 floating-point number, etc.
1487
1488 Fields:
1489 description: A detailed description of the metric, which can be used in
1490 documentation.
1491 displayName: A concise name for the metric, which can be displayed in user
1492 interfaces. Use sentence case without an ending period, for example
1493 "Request count".
1494 labels: The set of labels that can be used to describe a specific instance
1495 of this metric type. For example, the
1496 `compute.googleapis.com/instance/network/received_bytes_count` metric
1497 type has a label, `loadbalanced`, that specifies whether the traffic was
1498 received through a load balanced IP address.
1499 metricKind: Whether the metric records instantaneous values, changes to a
1500 value, etc.
1501 name: Resource name. The format of the name may vary between different
1502 implementations. For examples:
1503 projects/{project_id}/metricDescriptors/{type=**}
1504 metricDescriptors/{type=**}
1505 type: The metric type including a DNS name prefix, for example
1506 `"compute.googleapis.com/instance/cpu/utilization"`. Metric types should
1507 use a natural hierarchical grouping such as the following:
1508 compute.googleapis.com/instance/cpu/utilization
1509 compute.googleapis.com/instance/disk/read_ops_count
1510 compute.googleapis.com/instance/network/received_bytes_count Note that
1511 if the metric type changes, the monitoring data will be discontinued,
1512 and anything depends on it will break, such as monitoring dashboards,
1513 alerting rules and quota limits. Therefore, once a metric has been
1514 published, its type should be immutable.
1515 unit: The unit in which the metric value is reported. It is only
1516 applicable if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`.
1517 The supported units are a subset of [The Unified Code for Units of
1518 Measure](http://unitsofmeasure.org/ucum.html) standard: **Basic units
1519 (UNIT)** * `bit` bit * `By` byte * `s` second * `min` minute
1520 * `h` hour * `d` day **Prefixes (PREFIX)** * `k` kilo
1521 (10**3) * `M` mega (10**6) * `G` giga (10**9) * `T`
1522 tera (10**12) * `P` peta (10**15) * `E` exa (10**18) *
1523 `Z` zetta (10**21) * `Y` yotta (10**24) * `m` milli
1524 (10**-3) * `u` micro (10**-6) * `n` nano (10**-9) * `p`
1525 pico (10**-12) * `f` femto (10**-15) * `a` atto
1526 (10**-18) * `z` zepto (10**-21) * `y` yocto (10**-24) * `Ki`
1527 kibi (2**10) * `Mi` mebi (2**20) * `Gi` gibi (2**30) *
1528 `Ti` tebi (2**40) **Grammar** The grammar includes the
1529 dimensionless unit `1`, such as `1/s`. The grammar also includes these
1530 connectors: * `/` division (as an infix operator, e.g. `1/s`). * `.`
1531 multiplication (as an infix operator, e.g. `GBy.d`) The grammar for a
1532 unit is as follows: Expression = Component { "." Component } { "/"
1533 Component } ; Component = [ PREFIX ] UNIT [ Annotation ]
1534 | Annotation | "1" ; Annotation = "{"
1535 NAME "}" ; Notes: * `Annotation` is just a comment if it follows a
1536 `UNIT` and is equivalent to `1` if it is used alone. For examples,
1537 `{requests}/s == 1/s`, `By{transmitted}/s == By/s`. * `NAME` is a
1538 sequence of non-blank printable ASCII characters not containing '{'
1539 or '}'.
1540 valueType: Whether the measurement is an integer, a floating-point number,
1541 etc.
1542 """
1543
1544 class MetricKindValueValuesEnum(_messages.Enum):
1545 """Whether the metric records instantaneous values, changes to a value,
1546 etc.
1547
1548 Values:
1549 METRIC_KIND_UNSPECIFIED: Do not use this default value.
1550 GAUGE: Instantaneous measurements of a varying quantity.
1551 DELTA: Changes over non-overlapping time intervals.
1552 CUMULATIVE: Cumulative value over time intervals that can overlap. The
1553 overlapping intervals must have the same start time.
1554 """
1555 METRIC_KIND_UNSPECIFIED = 0
1556 GAUGE = 1
1557 DELTA = 2
1558 CUMULATIVE = 3
1559
1560 class ValueTypeValueValuesEnum(_messages.Enum):
1561 """Whether the measurement is an integer, a floating-point number, etc.
1562
1563 Values:
1564 VALUE_TYPE_UNSPECIFIED: Do not use this default value.
1565 BOOL: The value is a boolean. This value type can be used only if the
1566 metric kind is `GAUGE`.
1567 INT64: The value is a signed 64-bit integer.
1568 DOUBLE: The value is a double precision floating point number.
1569 STRING: The value is a text string. This value type can be used only if
1570 the metric kind is `GAUGE`.
1571 DISTRIBUTION: The value is a `Distribution`.
1572 MONEY: The value is money.
1573 """
1574 VALUE_TYPE_UNSPECIFIED = 0
1575 BOOL = 1
1576 INT64 = 2
1577 DOUBLE = 3
1578 STRING = 4
1579 DISTRIBUTION = 5
1580 MONEY = 6
1581
1582 description = _messages.StringField(1)
1583 displayName = _messages.StringField(2)
1584 labels = _messages.MessageField('LabelDescriptor', 3, repeated=True)
1585 metricKind = _messages.EnumField('MetricKindValueValuesEnum', 4)
1586 name = _messages.StringField(5)
1587 type = _messages.StringField(6)
1588 unit = _messages.StringField(7)
1589 valueType = _messages.EnumField('ValueTypeValueValuesEnum', 8)
1590
1591
1592 class MetricValue(_messages.Message):
1593 """Represents a single metric value.
1594
1595 Messages:
1596 LabelsValue: The labels describing the metric value. See comments on
1597 Operation.labels for the overriding relationship.
1598
1599 Fields:
1600 boolValue: A boolean value.
1601 distributionValue: A distribution value.
1602 doubleValue: A double precision floating point value.
1603 endTime: The end of the time period over which this metric value's
1604 measurement applies.
1605 int64Value: A signed 64-bit integer value.
1606 labels: The labels describing the metric value. See comments on
1607 Operation.labels for the overriding relationship.
1608 moneyValue: A money value.
1609 startTime: The start of the time period over which this metric value's
1610 measurement applies. The time period has different semantics for
1611 different metric types (cumulative, delta, and gauge). See the metric
1612 definition documentation in the service configuration for details.
1613 stringValue: A text string value.
1614 """
1615
1616 @encoding.MapUnrecognizedFields('additionalProperties')
1617 class LabelsValue(_messages.Message):
1618 """The labels describing the metric value. See comments on
1619 Operation.labels for the overriding relationship.
1620
1621 Messages:
1622 AdditionalProperty: An additional property for a LabelsValue object.
1623
1624 Fields:
1625 additionalProperties: Additional properties of type LabelsValue
1626 """
1627
1628 class AdditionalProperty(_messages.Message):
1629 """An additional property for a LabelsValue object.
1630
1631 Fields:
1632 key: Name of the additional property.
1633 value: A string attribute.
1634 """
1635
1636 key = _messages.StringField(1)
1637 value = _messages.StringField(2)
1638
1639 additionalProperties = _messages.MessageField('AdditionalProperty', 1, r epeated=True)
1640
1641 boolValue = _messages.BooleanField(1)
1642 distributionValue = _messages.MessageField('Distribution', 2)
1643 doubleValue = _messages.FloatField(3)
1644 endTime = _messages.StringField(4)
1645 int64Value = _messages.IntegerField(5)
1646 labels = _messages.MessageField('LabelsValue', 6)
1647 moneyValue = _messages.MessageField('Money', 7)
1648 startTime = _messages.StringField(8)
1649 stringValue = _messages.StringField(9)
1650
1651
1652 class MetricValueSet(_messages.Message):
1653 """Represents a set of metric values in the same metric. Each metric value
1654 in the set should have a unique combination of start time, end time, and
1655 label values.
1656
1657 Fields:
1658 metricName: The metric name defined in the service configuration.
1659 metricValues: The values in this metric.
1660 """
1661
1662 metricName = _messages.StringField(1)
1663 metricValues = _messages.MessageField('MetricValue', 2, repeated=True)
1664
1665
1666 class Mixin(_messages.Message):
1667 """Declares an API to be included in this API. The including API must
1668 redeclare all the methods from the included API, but documentation and
1669 options are inherited as follows: - If after comment and whitespace
1670 stripping, the documentation string of the redeclared method is empty, it
1671 will be inherited from the original method. - Each annotation belonging
1672 to the service config (http, visibility) which is not set in the
1673 redeclared method will be inherited. - If an http annotation is
1674 inherited, the path pattern will be modified as follows. Any version
1675 prefix will be replaced by the version of the including API plus the root
1676 path if specified. Example of a simple mixin: package google.acl.v1;
1677 service AccessControl { // Get the underlying ACL object. rpc
1678 GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get =
1679 "/v1/{resource=**}:getAcl"; } } package google.storage.v2;
1680 service Storage { // rpc GetAcl(GetAclRequest) returns (Acl);
1681 // Get a data record. rpc GetData(GetDataRequest) returns (Data) {
1682 option (google.api.http).get = "/v2/{resource=**}"; } } Example
1683 of a mixin configuration: apis: - name: google.storage.v2.Storage
1684 mixins: - name: google.acl.v1.AccessControl The mixin construct
1685 implies that all methods in `AccessControl` are also declared with same name
1686 and request/response types in `Storage`. A documentation generator or
1687 annotation processor will see the effective `Storage.GetAcl` method after
1688 inherting documentation and annotations as follows: service Storage {
1689 // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns
1690 (Acl) { option (google.api.http).get = "/v2/{resource=**}:getAcl";
1691 } ... } Note how the version in the path pattern changed from
1692 `v1` to `v2`. If the `root` field in the mixin is specified, it should be a
1693 relative path under which inherited HTTP paths are placed. Example:
1694 apis: - name: google.storage.v2.Storage mixins: - name:
1695 google.acl.v1.AccessControl root: acls This implies the following
1696 inherited HTTP annotation: service Storage { // Get the
1697 underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) {
1698 option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; }
1699 ... }
1700
1701 Fields:
1702 name: The fully qualified name of the API which is included.
1703 root: If non-empty specifies a path under which inherited HTTP paths are
1704 rooted.
1705 """
1706
1707 name = _messages.StringField(1)
1708 root = _messages.StringField(2)
1709
1710
1711 class Money(_messages.Message):
1712 """Represents an amount of money with its currency type.
1713
1714 Fields:
1715 currencyCode: The 3-letter currency code defined in ISO 4217.
1716 nanos: Number of nano (10^-9) units of the amount. The value must be
1717 between -999,999,999 and +999,999,999 inclusive. If `units` is positive,
1718 `nanos` must be positive or zero. If `units` is zero, `nanos` can be
1719 positive, zero, or negative. If `units` is negative, `nanos` must be
1720 negative or zero. For example $-1.75 is represented as `units`=-1 and
1721 `nanos`=-750,000,000.
1722 units: The whole units of the amount. For example if `currencyCode` is
1723 `"USD"`, then 1 unit is one US dollar.
1724 """
1725
1726 currencyCode = _messages.StringField(1)
1727 nanos = _messages.IntegerField(2, variant=_messages.Variant.INT32)
1728 units = _messages.IntegerField(3)
1729
1730
1731 class MonitoredResourceDescriptor(_messages.Message):
1732 """An object that describes the schema of a MonitoredResource object using a
1733 type name and a set of labels. For example, the monitored resource
1734 descriptor for Google Compute Engine VM instances has a type of
1735 `"gce_instance"` and specifies the use of the labels `"instance_id"` and
1736 `"zone"` to identify particular VM instances. Different APIs can support
1737 different monitored resource types. APIs generally provide a `list` method
1738 that returns the monitored resource descriptors used by the API.
1739
1740 Fields:
1741 description: Optional. A detailed description of the monitored resource
1742 type that might be used in documentation.
1743 displayName: Optional. A concise name for the monitored resource type that
1744 might be displayed in user interfaces. For example, `"Google Cloud SQL
1745 Database"`.
1746 labels: Required. A set of labels used to describe instances of this
1747 monitored resource type. For example, an individual Google Cloud SQL
1748 database is identified by values for the labels `"database_id"` and
1749 `"zone"`.
1750 name: Optional. The resource name of the monitored resource descriptor:
1751 `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where
1752 {type} is the value of the `type` field in this object and {project_id}
1753 is a project ID that provides API-specific context for accessing the
1754 type. APIs that do not use project information can use the resource
1755 name format `"monitoredResourceDescriptors/{type}"`.
1756 type: Required. The monitored resource type. For example, the type
1757 `"cloudsql_database"` represents databases in Google Cloud SQL.
1758 """
1759
1760 description = _messages.StringField(1)
1761 displayName = _messages.StringField(2)
1762 labels = _messages.MessageField('LabelDescriptor', 3, repeated=True)
1763 name = _messages.StringField(4)
1764 type = _messages.StringField(5)
1765
1766
1767 class Monitoring(_messages.Message):
1768 """Monitoring configuration of the service. The example below shows how to
1769 configure monitored resources and metrics for monitoring. In the example, a
1770 monitored resource and two metrics are defined. The
1771 `library.googleapis.com/book/returned_count` metric is sent to both producer
1772 and consumer projects, whereas the
1773 `library.googleapis.com/book/overdue_count` metric is only sent to the
1774 consumer project. monitored_resources: - type:
1775 library.googleapis.com/branch labels: - key: /city
1776 description: The city where the library branch is located in. - key:
1777 /name description: The name of the branch. metrics: - name:
1778 library.googleapis.com/book/returned_count metric_kind: DELTA
1779 value_type: INT64 labels: - key: /customer_id - name:
1780 library.googleapis.com/book/overdue_count metric_kind: GAUGE
1781 value_type: INT64 labels: - key: /customer_id monitoring:
1782 producer_destinations: - monitored_resource:
1783 library.googleapis.com/branch metrics: -
1784 library.googleapis.com/book/returned_count consumer_destinations:
1785 - monitored_resource: library.googleapis.com/branch metrics:
1786 - library.googleapis.com/book/returned_count -
1787 library.googleapis.com/book/overdue_count
1788
1789 Fields:
1790 consumerDestinations: Monitoring configurations for sending metrics to the
1791 consumer project. There can be multiple consumer destinations, each one
1792 must have a different monitored resource type. A metric can be used in
1793 at most one consumer destination.
1794 producerDestinations: Monitoring configurations for sending metrics to the
1795 producer project. There can be multiple producer destinations, each one
1796 must have a different monitored resource type. A metric can be used in
1797 at most one producer destination.
1798 """
1799
1800 consumerDestinations = _messages.MessageField('MonitoringDestination', 1, re peated=True)
1801 producerDestinations = _messages.MessageField('MonitoringDestination', 2, re peated=True)
1802
1803
1804 class MonitoringDestination(_messages.Message):
1805 """Configuration of a specific monitoring destination (the producer project
1806 or the consumer project).
1807
1808 Fields:
1809 metrics: Names of the metrics to report to this monitoring destination.
1810 Each name must be defined in Service.metrics section.
1811 monitoredResource: The monitored resource type. The type must be defined
1812 in Service.monitored_resources section.
1813 """
1814
1815 metrics = _messages.StringField(1, repeated=True)
1816 monitoredResource = _messages.StringField(2)
1817
1818
1819 class OAuthRequirements(_messages.Message):
1820 """OAuth scopes are a way to define data and permissions on data. For
1821 example, there are scopes defined for "Read-only access to Google Calendar"
1822 and "Access to Cloud Platform". Users can consent to a scope for an
1823 application, giving it permission to access that data on their behalf.
1824 OAuth scope specifications should be fairly coarse grained; a user will need
1825 to see and understand the text description of what your scope means. In
1826 most cases: use one or at most two OAuth scopes for an entire family of
1827 products. If your product has multiple APIs, you should probably be sharing
1828 the OAuth scope across all of those APIs. When you need finer grained OAuth
1829 consent screens: talk with your product management about how developers will
1830 use them in practice. Please note that even though each of the canonical
1831 scopes is enough for a request to be accepted and passed to the backend, a
1832 request can still fail due to the backend requiring additional scopes or
1833 permissions.
1834
1835 Fields:
1836 canonicalScopes: The list of publicly documented OAuth scopes that are
1837 allowed access. An OAuth token containing any of these scopes will be
1838 accepted. Example: canonical_scopes:
1839 https://www.googleapis.com/auth/calendar,
1840 https://www.googleapis.com/auth/calendar.read
1841 """
1842
1843 canonicalScopes = _messages.StringField(1)
1844
1845
1846 class Operation(_messages.Message):
1847 """Represents information regarding an operation.
1848
1849 Enums:
1850 ImportanceValueValuesEnum: The importance of the data contained in the
1851 operation.
1852
1853 Messages:
1854 LabelsValue: Labels describing the operation. Only the following labels
1855 are allowed: Labels describing the monitored resource. The labels must
1856 be defined in the service configuration. Default labels of the metric
1857 values. When specified, labels defined in the metric value overrule.
1858 Labels are defined and documented by Google Cloud Platform. For example:
1859 `cloud.googleapis.com/location: "us-east1"`.
1860
1861 Fields:
1862 consumerId: Identity of the consumer who is using the service. This field
1863 should be filled in for the operations initiated by a consumer, but not
1864 for service initiated operations that are not related to a specific
1865 consumer. The accepted format is dependent on the implementation. The
1866 Google Service Control implementation accepts four forms:
1867 "project:<project_id>", "project_number:<project_number>",
1868 "api_key:<api_key>" and "spatula_header:<spatula_header>".
1869 endTime: End time of the operation. Required when the operation is used in
1870 ControllerService.Report, but optional when the operation is used in
1871 ControllerService.Check.
1872 importance: The importance of the data contained in the operation.
1873 labels: Labels describing the operation. Only the following labels are
1874 allowed: Labels describing the monitored resource. The labels must be
1875 defined in the service configuration. Default labels of the metric
1876 values. When specified, labels defined in the metric value overrule.
1877 Labels are defined and documented by Google Cloud Platform. For example:
1878 `cloud.googleapis.com/location: "us-east1"`.
1879 logEntries: Represents information to be logged.
1880 metricValueSets: Represents information about this operation. Each
1881 MetricValueSet corresponds to a metric defined in the service
1882 configuration. The data type used in the MetricValueSet must agree with
1883 the data type specified in the metric definition. Within a single
1884 operation, it is not allowed to have more than one MetricValue instances
1885 that have the same metric names and identical label value combinations.
1886 The existence of such duplicated MetricValue instances in a request
1887 causes the entire request being rejected with an invalid argument error.
1888 operationId: Identity of the operation. It must be unique within the scope
1889 of the service that the operation is generated. If the service calls
1890 Check() and Report() on the same operation, the two calls should carry
1891 the same id. UUID version 4 is recommended, though not required. In the
1892 scenarios where an operation is computed from existing information and
1893 an idempotent id is desirable for deduplication purpose, UUID version 5
1894 is recommended. See RFC 4122 for details.
1895 operationName: Fully qualified name of the operation. Example of an RPC
1896 method name used as operation name:
1897 google.example.library.v1.LibraryService.CreateShelf Example of a
1898 service defined operation name:
1899 compute.googleapis.com/InstanceHeartbeat
1900 quotaProperties: Represents the properties needed for quota check.
1901 Applicable only if this operation is for a quota check request.
1902 startTime: Start time of the operation. Required.
1903 """
1904
1905 class ImportanceValueValuesEnum(_messages.Enum):
1906 """The importance of the data contained in the operation.
1907
1908 Values:
1909 LOW: The operation doesn't contain significant monetary value or audit
1910 trail. The API implementation may cache and aggregate the data. Ther e
1911 is no deduplication based on `operation_id`. The data may be lost wh en
1912 rare and unexpected system failures occur.
1913 HIGH: The operation contains significant monetary value or audit trail .
1914 The API implementation doesn't cache and aggregate the data.
1915 Deduplication based on `operation_id` is performed for monetary
1916 values. If the method returns successfully, it's guaranteed that the
1917 data are persisted in durable storage.
1918 """
1919 LOW = 0
1920 HIGH = 1
1921
1922 @encoding.MapUnrecognizedFields('additionalProperties')
1923 class LabelsValue(_messages.Message):
1924 """Labels describing the operation. Only the following labels are allowe d:
1925 Labels describing the monitored resource. The labels must be defined in
1926 the service configuration. Default labels of the metric values. When
1927 specified, labels defined in the metric value overrule. Labels are
1928 defined and documented by Google Cloud Platform. For example:
1929 `cloud.googleapis.com/location: "us-east1"`.
1930
1931 Messages:
1932 AdditionalProperty: An additional property for a LabelsValue object.
1933
1934 Fields:
1935 additionalProperties: Additional properties of type LabelsValue
1936 """
1937
1938 class AdditionalProperty(_messages.Message):
1939 """An additional property for a LabelsValue object.
1940
1941 Fields:
1942 key: Name of the additional property.
1943 value: A string attribute.
1944 """
1945
1946 key = _messages.StringField(1)
1947 value = _messages.StringField(2)
1948
1949 additionalProperties = _messages.MessageField('AdditionalProperty', 1, r epeated=True)
1950
1951 consumerId = _messages.StringField(1)
1952 endTime = _messages.StringField(2)
1953 importance = _messages.EnumField('ImportanceValueValuesEnum', 3)
1954 labels = _messages.MessageField('LabelsValue', 4)
1955 logEntries = _messages.MessageField('LogEntry', 5, repeated=True)
1956 metricValueSets = _messages.MessageField('MetricValueSet', 6, repeated=True)
1957 operationId = _messages.StringField(7)
1958 operationName = _messages.StringField(8)
1959 quotaProperties = _messages.MessageField('QuotaProperties', 9)
1960 startTime = _messages.StringField(10)
1961
1962
1963 class Option(_messages.Message):
1964 """A protocol buffer option, which can be attached to a message, field,
1965 enumeration, etc.
1966
1967 Messages:
1968 ValueValue: The option's value. For example, `"com.google.protobuf"`.
1969
1970 Fields:
1971 name: The option's name. For example, `"java_package"`.
1972 value: The option's value. For example, `"com.google.protobuf"`.
1973 """
1974
1975 @encoding.MapUnrecognizedFields('additionalProperties')
1976 class ValueValue(_messages.Message):
1977 """The option's value. For example, `"com.google.protobuf"`.
1978
1979 Messages:
1980 AdditionalProperty: An additional property for a ValueValue object.
1981
1982 Fields:
1983 additionalProperties: Properties of the object. Contains field @ype wi th
1984 type URL.
1985 """
1986
1987 class AdditionalProperty(_messages.Message):
1988 """An additional property for a ValueValue object.
1989
1990 Fields:
1991 key: Name of the additional property.
1992 value: A extra_types.JsonValue attribute.
1993 """
1994
1995 key = _messages.StringField(1)
1996 value = _messages.MessageField('extra_types.JsonValue', 2)
1997
1998 additionalProperties = _messages.MessageField('AdditionalProperty', 1, r epeated=True)
1999
2000 name = _messages.StringField(1)
2001 value = _messages.MessageField('ValueValue', 2)
2002
2003
2004 class Page(_messages.Message):
2005 """Represents a documentation page. A page can contain subpages to represent
2006 nested documentation set structure.
2007
2008 Fields:
2009 content: The Markdown content of the page. You can use <code>&#40;==
2010 include {path} ==&#41;</code> to include content from a Markdown file.
2011 name: The name of the page. It will be used as an identity of the page to
2012 generate URI of the page, text of the link to this page in navigation,
2013 etc. The full page name (start from the root page name to this page
2014 concatenated with `.`) can be used as reference to the page in your
2015 documentation. For example: <pre><code>pages: - name: Tutorial
2016 content: &#40;== include tutorial.md ==&#41; subpages: - name: Java
2017 content: &#40;== include tutorial_java.md ==&#41; </code></pre> You can
2018 reference `Java` page using Markdown reference link syntax: `Java`.
2019 subpages: Subpages of this page. The order of subpages specified here will
2020 be honored in the generated docset.
2021 """
2022
2023 content = _messages.StringField(1)
2024 name = _messages.StringField(2)
2025 subpages = _messages.MessageField('Page', 3, repeated=True)
2026
2027
2028 class ProjectProperties(_messages.Message):
2029 """A descriptor for defining project properties for a service. One service
2030 may have many consumer projects, and the service may want to behave
2031 differently depending on some properties on the project. For example, a
2032 project may be associated with a school, or a business, or a government
2033 agency, a business type property on the project may affect how a service
2034 responds to the client. This descriptor defines which properties are allowed
2035 to be set on a project. Example: project_properties: properties:
2036 - name: NO_WATERMARK type: BOOL description: Allows usage of
2037 the API without watermarks. - name: EXTENDED_TILE_CACHE_PERIOD
2038 type: INT64
2039
2040 Fields:
2041 properties: List of per consumer project-specific properties.
2042 """
2043
2044 properties = _messages.MessageField('Property', 1, repeated=True)
2045
2046
2047 class Property(_messages.Message):
2048 """Defines project properties. API services can define properties that can
2049 be assigned to consumer projects so that backends can perform response
2050 customization without having to make additional calls or maintain additional
2051 storage. For example, Maps API defines properties that controls map tile
2052 cache period, or whether to embed a watermark in a result. These values can
2053 be set via API producer console. Only API providers can define and set these
2054 properties.
2055
2056 Enums:
2057 TypeValueValuesEnum: The type of this property.
2058
2059 Fields:
2060 description: The description of the property
2061 name: The name of the property (a.k.a key).
2062 type: The type of this property.
2063 """
2064
2065 class TypeValueValuesEnum(_messages.Enum):
2066 """The type of this property.
2067
2068 Values:
2069 UNSPECIFIED: The type is unspecified, and will result in an error.
2070 INT64: The type is `int64`.
2071 BOOL: The type is `bool`.
2072 STRING: The type is `string`.
2073 DOUBLE: The type is 'double'.
2074 """
2075 UNSPECIFIED = 0
2076 INT64 = 1
2077 BOOL = 2
2078 STRING = 3
2079 DOUBLE = 4
2080
2081 description = _messages.StringField(1)
2082 name = _messages.StringField(2)
2083 type = _messages.EnumField('TypeValueValuesEnum', 3)
2084
2085
2086 class Quota(_messages.Message):
2087 """Quota configuration helps to achieve fairness and budgeting in service
2088 usage. - Fairness is achieved through the use of short-term quota limits
2089 that are usually defined over a time window of several seconds or minutes.
2090 When such a limit is applied, for example at the user level, it ensures
2091 that no single user will monopolize the service or a given customer's
2092 allocated portion of it. - Budgeting is achieved through the use of long-
2093 term quota limits that are usually defined over a time window of one or
2094 more days. These limits help client application developers predict the
2095 usage and help budgeting. Quota enforcement uses a simple token-based
2096 algorithm for resource sharing. The quota configuration structure is as
2097 follows: - `QuotaLimit` defines a single enforceable limit with a specified
2098 token amount that can be consumed over a specific duration and applies to
2099 a particular entity, like a project or an end user. If the limit applies
2100 to a user, each user making the request will get the specified number of
2101 tokens to consume. When the tokens run out, the requests from that user
2102 will be blocked until the duration elapses and the next duration window
2103 starts. - `QuotaGroup` groups a set of quota limits. - `QuotaRule` maps a
2104 method to a set of quota groups. This allows sharing of quota groups
2105 across methods as well as one method consuming tokens from more than one
2106 quota group. When a group contains multiple limits, requests to a method
2107 consuming tokens from that group must satisfy all the limits in that
2108 group. Example: quota: groups: - name: ReadGroup
2109 limits: - description: Daily Limit name: ProjectQpd
2110 default_limit: 10000 duration: 1d limit_by:
2111 CLIENT_PROJECT - description: Per-second Limit name:
2112 UserQps default_limit: 20000 duration: 100s
2113 limit_by: USER - name: WriteGroup limits: -
2114 description: Daily Limit name: ProjectQpd default_limit:
2115 1000 max_limit: 1000 duration: 1d limit_by:
2116 CLIENT_PROJECT - description: Per-second Limit name:
2117 UserQps default_limit: 2000 max_limit: 4000
2118 duration: 100s limit_by: USER rules: - selector: "*"
2119 groups: - group: ReadGroup - selector:
2120 google.calendar.Calendar.Update groups: - group: WriteGroup
2121 cost: 2 - selector: google.calendar.Calendar.Delete groups:
2122 - group: WriteGroup Here, the configuration defines two quota groups:
2123 ReadGroup and WriteGroup, each defining its own daily and per-second limits.
2124 Note that One Platform enforces per-second limits averaged over a duration
2125 of 100 seconds. The rules map ReadGroup for all methods, except for the
2126 Update and Delete methods. These two methods consume from WriteGroup, with
2127 Update method consuming at twice the rate as Delete method. Multiple quota
2128 groups can be specified for a method. The quota limits in all of those
2129 groups will be enforced. Example: quota: groups: - name:
2130 WriteGroup limits: - description: Daily Limit
2131 name: ProjectQpd default_limit: 1000 max_limit: 1000
2132 duration: 1d limit_by: CLIENT_PROJECT - description: Per-
2133 second Limit name: UserQps default_limit: 2000
2134 max_limit: 4000 duration: 100s limit_by: USER -
2135 name: StorageGroup limits: - description: Storage Quota
2136 name: StorageQuota default_limit: 1000 duration: 0
2137 limit_by: USER rules: - selector:
2138 google.calendar.Calendar.Create groups: - group:
2139 StorageGroup - group: WriteGroup - selector:
2140 google.calendar.Calendar.Delete groups: - group:
2141 StorageGroup In the above example, the Create and Delete methods manage the
2142 user's storage space. In addition, Create method uses WriteGroup to manage
2143 the requests. In this case, requests to Create method need to satisfy all
2144 quota limits defined in both quota groups. One can disable quota for
2145 selected method(s) identified by the selector by setting disable_quota to
2146 ture. For example, rules: - selector: "*" group:
2147 - group ReadGroup - selector: google.calendar.Calendar.Select
2148 disable_quota: true
2149
2150 Fields:
2151 groups: List of `QuotaGroup` definitions for the service.
2152 rules: List of `QuotaRule` definitions, each one mapping a selected method
2153 to one or more quota groups.
2154 """
2155
2156 groups = _messages.MessageField('QuotaGroup', 1, repeated=True)
2157 rules = _messages.MessageField('QuotaRule', 2, repeated=True)
2158
2159
2160 class QuotaGroup(_messages.Message):
2161 """`QuotaGroup` defines a set of quota limits to enforce.
2162
2163 Fields:
2164 billable: Indicates if the quota limits defined in this quota group apply
2165 to consumers who have active billing. Quota limits defined in billable
2166 groups will be applied only to consumers who have active billing. The
2167 amount of tokens consumed from billable quota group will also be
2168 reported for billing. Quota limits defined in non-billable groups will
2169 be applied only to consumers who have no active billing.
2170 description: User-visible description of this quota group.
2171 limits: Quota limits to be enforced when this quota group is used. A
2172 request must satisfy all the limits in a group for it to be permitted.
2173 name: Name of this quota group. Must be unique within the service. Quota
2174 group name is used as part of the id for quota limits. Once the quota
2175 group has been put into use, the name of the quota group should be
2176 immutable.
2177 """
2178
2179 billable = _messages.BooleanField(1)
2180 description = _messages.StringField(2)
2181 limits = _messages.MessageField('QuotaLimit', 3, repeated=True)
2182 name = _messages.StringField(4)
2183
2184
2185 class QuotaGroupMapping(_messages.Message):
2186 """A quota group mapping.
2187
2188 Fields:
2189 cost: Number of tokens to consume for each request. This allows different
2190 cost to be associated with different methods that consume from the same
2191 quota group. By default, each request will cost one token.
2192 group: The `QuotaGroup.name` of the group. Requests for the mapped methods
2193 will consume tokens from each of the limits defined in this group.
2194 """
2195
2196 cost = _messages.IntegerField(1, variant=_messages.Variant.INT32)
2197 group = _messages.StringField(2)
2198
2199
2200 class QuotaLimit(_messages.Message):
2201 """`QuotaLimit` defines a specific limit that applies over a specified
2202 duration for a limit type. There can be at most one limit for a duration and
2203 limit type combination defined within a `QuotaGroup`.
2204
2205 Enums:
2206 LimitByValueValuesEnum: Limit type to use for enforcing this quota limit.
2207 Each unique value gets the defined number of tokens to consume from. For
2208 a quota limit that uses user type, each user making requests through the
2209 same client application project will get his/her own pool of tokens to
2210 consume, whereas for a limit that uses client project type, all users
2211 making requests through the same client application project share a
2212 single pool of tokens.
2213
2214 Fields:
2215 defaultLimit: Default number of tokens that can be consumed during the
2216 specified duration. This is the number of tokens assigned when a client
2217 application developer activates the service for his/her project.
2218 Specifying a value of 0 will block all requests. This can be used if you
2219 are provisioning quota to selected consumers and blocking others.
2220 Similarly, a value of -1 will indicate an unlimited quota. No other
2221 negative values are allowed.
2222 description: Optional. User-visible, extended description for this quota
2223 limit. Should be used only when more context is needed to understand
2224 this limit than provided by the limit's display name (see:
2225 `display_name`).
2226 displayName: User-visible display name for this limit. Optional. If not
2227 set, the UI will provide a default display name based on the quota
2228 configuration. This field can be used to override the default display
2229 name generated from the configuration.
2230 duration: Duration of this limit in textual notation. Example: "100s",
2231 "24h", "1d". For duration longer than a day, only multiple of days is
2232 supported. We support only "100s" and "1d" for now. Additional support
2233 will be added in the future. "0" indicates indefinite duration.
2234 freeTier: Free tier value displayed in the Developers Console for this
2235 limit. The free tier is the number of tokens that will be subtracted
2236 from the billed amount when billing is enabled. This field can only be
2237 set on a limit with duration "1d", in a billable group; it is invalid on
2238 any other limit. If this field is not set, it defaults to 0, indicating
2239 that there is no free tier for this service.
2240 limitBy: Limit type to use for enforcing this quota limit. Each unique
2241 value gets the defined number of tokens to consume from. For a quota
2242 limit that uses user type, each user making requests through the same
2243 client application project will get his/her own pool of tokens to
2244 consume, whereas for a limit that uses client project type, all users
2245 making requests through the same client application project share a
2246 single pool of tokens.
2247 maxLimit: Maximum number of tokens that can be consumed during the
2248 specified duration. Client application developers can override the
2249 default limit up to this maximum. If specified, this value cannot be set
2250 to a value less than the default limit. If not specified, it is set to
2251 the default limit. To allow clients to apply overrides with no upper
2252 bound, set this to -1, indicating unlimited maximum quota.
2253 name: Name of the quota limit. Must be unique within the quota group.
2254 This name is used to refer to the limit when overriding the limit on a
2255 per-project basis. If a name is not provided, it will be generated from
2256 the limit_by and duration fields. The maximum length of the limit name
2257 is 64 characters. The name of a limit is used as a unique identifier
2258 for this limit. Therefore, once a limit has been put into use, its name
2259 should be immutable. You can use the display_name field to provide a
2260 user-friendly name for the limit. The display name can be evolved over
2261 time without affecting the identity of the limit.
2262 """
2263
2264 class LimitByValueValuesEnum(_messages.Enum):
2265 """Limit type to use for enforcing this quota limit. Each unique value
2266 gets the defined number of tokens to consume from. For a quota limit tha t
2267 uses user type, each user making requests through the same client
2268 application project will get his/her own pool of tokens to consume,
2269 whereas for a limit that uses client project type, all users making
2270 requests through the same client application project share a single pool
2271 of tokens.
2272
2273 Values:
2274 CLIENT_PROJECT: ID of the project owned by the client application
2275 developer making the request.
2276 USER: ID of the end user making the request using the client
2277 application.
2278 """
2279 CLIENT_PROJECT = 0
2280 USER = 1
2281
2282 defaultLimit = _messages.IntegerField(1)
2283 description = _messages.StringField(2)
2284 displayName = _messages.StringField(3)
2285 duration = _messages.StringField(4)
2286 freeTier = _messages.IntegerField(5)
2287 limitBy = _messages.EnumField('LimitByValueValuesEnum', 6)
2288 maxLimit = _messages.IntegerField(7)
2289 name = _messages.StringField(8)
2290
2291
2292 class QuotaProperties(_messages.Message):
2293 """Represents the properties needed for quota operations. Use the
2294 metric_value_sets field in Operation message to provide cost override with
2295 metric_name in <service_name>/quota/<quota_group_name>/cost format.
2296 Overrides for unmatched quota groups will be ignored. Costs are expected to
2297 be >= 0. Cost 0 will cause no quota check, but still traffic restrictions
2298 will be enforced.
2299
2300 Enums:
2301 QuotaModeValueValuesEnum: Quota mode for this operation.
2302
2303 Messages:
2304 LimitByIdsValue: LimitType IDs that should be used for checking quota. Key
2305 in this map should be a valid LimitType string, and the value is the ID
2306 to be used. For ex., an entry <USER, 123> will cause all user quota
2307 limits to use 123 as the user ID. See google/api/quota.proto for the
2308 definition of LimitType. CLIENT_PROJECT: Not supported. USER: Value of
2309 this entry will be used for enforcing user-level quota limits. If
2310 none specified, caller IP passed in the
2311 servicecontrol.googleapis.com/caller_ip label will be used instead.
2312 If the server cannot resolve a value for this LimitType, an error
2313 will be thrown. No validation will be performed on this ID.
2314
2315 Fields:
2316 limitByIds: LimitType IDs that should be used for checking quota. Key in
2317 this map should be a valid LimitType string, and the value is the ID to
2318 be used. For ex., an entry <USER, 123> will cause all user quota limits
2319 to use 123 as the user ID. See google/api/quota.proto for the definition
2320 of LimitType. CLIENT_PROJECT: Not supported. USER: Value of this entry
2321 will be used for enforcing user-level quota limits. If none
2322 specified, caller IP passed in the
2323 servicecontrol.googleapis.com/caller_ip label will be used instead.
2324 If the server cannot resolve a value for this LimitType, an error
2325 will be thrown. No validation will be performed on this ID.
2326 quotaMode: Quota mode for this operation.
2327 """
2328
2329 class QuotaModeValueValuesEnum(_messages.Enum):
2330 """Quota mode for this operation.
2331
2332 Values:
2333 ACQUIRE: Decreases available quota by the cost specified for the
2334 operation. If cost is higher than available quota, operation fails a nd
2335 returns error.
2336 ACQUIRE_BEST_EFFORT: Decreases available quota by the cost specified f or
2337 the operation. If cost is higher than available quota, operation doe s
2338 not fail and available quota goes down to zero but it returns error.
2339 CHECK: Does not change any available quota. Only checks if there is
2340 enough quota. No lock is placed on the checked tokens neither.
2341 RELEASE: Increases available quota by the operation cost specified for
2342 the operation.
2343 """
2344 ACQUIRE = 0
2345 ACQUIRE_BEST_EFFORT = 1
2346 CHECK = 2
2347 RELEASE = 3
2348
2349 @encoding.MapUnrecognizedFields('additionalProperties')
2350 class LimitByIdsValue(_messages.Message):
2351 """LimitType IDs that should be used for checking quota. Key in this map
2352 should be a valid LimitType string, and the value is the ID to be used.
2353 For ex., an entry <USER, 123> will cause all user quota limits to use 12 3
2354 as the user ID. See google/api/quota.proto for the definition of
2355 LimitType. CLIENT_PROJECT: Not supported. USER: Value of this entry will
2356 be used for enforcing user-level quota limits. If none specified,
2357 caller IP passed in the servicecontrol.googleapis.com/caller_ip
2358 label will be used instead. If the server cannot resolve a value f or
2359 this LimitType, an error will be thrown. No validation will be
2360 performed on this ID.
2361
2362 Messages:
2363 AdditionalProperty: An additional property for a LimitByIdsValue objec t.
2364
2365 Fields:
2366 additionalProperties: Additional properties of type LimitByIdsValue
2367 """
2368
2369 class AdditionalProperty(_messages.Message):
2370 """An additional property for a LimitByIdsValue object.
2371
2372 Fields:
2373 key: Name of the additional property.
2374 value: A string attribute.
2375 """
2376
2377 key = _messages.StringField(1)
2378 value = _messages.StringField(2)
2379
2380 additionalProperties = _messages.MessageField('AdditionalProperty', 1, r epeated=True)
2381
2382 limitByIds = _messages.MessageField('LimitByIdsValue', 1)
2383 quotaMode = _messages.EnumField('QuotaModeValueValuesEnum', 2)
2384
2385
2386 class QuotaRule(_messages.Message):
2387 """`QuotaRule` maps a method to a set of `QuotaGroup`s.
2388
2389 Fields:
2390 disableQuota: Indicates if quota checking should be enforced. Quota will
2391 be disabled for methods without quota rules or with quota rules having
2392 this field set to true. When this field is set to true, no quota group
2393 mapping is allowed.
2394 groups: Quota groups to be used for this method. This supports associating
2395 a cost with each quota group.
2396 selector: Selects methods to which this rule applies. Refer to selector
2397 for syntax details.
2398 """
2399
2400 disableQuota = _messages.BooleanField(1)
2401 groups = _messages.MessageField('QuotaGroupMapping', 2, repeated=True)
2402 selector = _messages.StringField(3)
2403
2404
2405 class ReportError(_messages.Message):
2406 """Represents the processing error of one `Operation` in the request.
2407
2408 Fields:
2409 operationId: The Operation.operation_id value from the request.
2410 status: Details of the error when processing the `Operation`.
2411 """
2412
2413 operationId = _messages.StringField(1)
2414 status = _messages.MessageField('Status', 2)
2415
2416
2417 class ReportRequest(_messages.Message):
2418 """The request message of the Report method.
2419
2420 Fields:
2421 operations: Operations to be reported. Typically the service should
2422 report one operation per request. Putting multiple operations into a
2423 single request is allowed, but should be used only when multiple
2424 operations are natually available at the time of the report. If
2425 multiple operations are in a single request, the total request size
2426 should be no larger than 1MB. See ReportResponse.report_errors for
2427 partial failure behavior.
2428 """
2429
2430 operations = _messages.MessageField('Operation', 1, repeated=True)
2431
2432
2433 class ReportResponse(_messages.Message):
2434 """The response message of the Report method.
2435
2436 Fields:
2437 reportErrors: The partial failures, one for each `Operation` in the
2438 request that failed processing. There are three possible combinations of
2439 the RPC status and this list: 1. The combination of a successful RPC
2440 status and an empty `report_errors` list indicates a complete success
2441 where all `Operation`s in the request are processed successfully. 2.
2442 The combination of a successful RPC status and a non-empty
2443 `report_errors` list indicates a partial success where some
2444 `Operation`s in the request are processed successfully. Each
2445 `Operation` that failed processing has a corresponding item in this
2446 list. 3. A failed RPC status indicates a complete failure where none of
2447 the `Operation`s in the request is processed successfully.
2448 """
2449
2450 reportErrors = _messages.MessageField('ReportError', 1, repeated=True)
2451
2452
2453 class Service(_messages.Message):
2454 """`Service` is the root object of the configuration schema. It describes
2455 basic information like the name of the service and the exposed API
2456 interfaces, and delegates other aspects to configuration sub-sections.
2457 Example: type: google.api.Service config_version: 1 name:
2458 calendar.googleapis.com title: Google Calendar API apis: - name:
2459 google.calendar.Calendar backend: rules: - selector: "*"
2460 address: calendar.example.com
2461
2462 Fields:
2463 apis: A list of API interfaces exported by this service. Only the `name`
2464 field of the google.protobuf.Api needs to be provided by the
2465 configuration author, as the remaining fields will be derived from the
2466 IDL during the normalization process. It is an error to specify an API
2467 interface here which cannot be resolved against the associated IDL
2468 files.
2469 authentication: Auth configuration.
2470 backend: API backend configuration.
2471 billing: Billing configuration of the service.
2472 configVersion: The version of the service configuration. The config
2473 version may influence interpretation of the configuration, for example,
2474 to determine defaults. This is documented together with applicable
2475 options. The current default for the config version itself is `3`.
2476 context: Context configuration.
2477 control: Configuration for the service control plane.
2478 customError: Custom error configuration.
2479 documentation: Additional API documentation.
2480 enums: A list of all enum types included in this API service. Enums
2481 referenced directly or indirectly by the `apis` are automatically
2482 included. Enums which are not referenced but shall be included should
2483 be listed here by name. Example: enums: - name:
2484 google.someapi.v1.SomeEnum
2485 http: HTTP configuration.
2486 id: A unique ID for a specific instance of this message, typically
2487 assigned by the client for tracking purpose. If empty, the server may
2488 choose to generate one instead.
2489 logging: Logging configuration of the service.
2490 logs: Defines the logs used by this service.
2491 metrics: Defines the metrics used by this service.
2492 monitoredResources: Defines the monitored resources used by this service.
2493 This is required by the Service.monitoring and Service.logging
2494 configurations.
2495 monitoring: Monitoring configuration of the service.
2496 name: The DNS address at which this service is available, e.g.
2497 `calendar.googleapis.com`.
2498 producerProjectId: The id of the Google developer project that owns the
2499 service. Members of this project can manage the service configuration,
2500 manage consumption of the service, etc.
2501 projectProperties: Configuration of per-consumer project properties.
2502 quota: Quota configuration.
2503 systemParameters: Configuration for system parameters.
2504 systemTypes: A list of all proto message types included in this API
2505 service. It serves similar purpose as [google.api.Service.types], except
2506 that these types are not needed by user-defined APIs. Therefore, they
2507 will not show up in the generated discovery doc. This field should only
2508 be used to define system APIs in ESF.
2509 title: The product title associated with this service.
2510 types: A list of all proto message types included in this API service.
2511 Types referenced directly or indirectly by the `apis` are automatically
2512 included. Messages which are not referenced but shall be included, such
2513 as types used by the `google.protobuf.Any` type, should be listed here
2514 by name. Example: types: - name: google.protobuf.Int32
2515 usage: Configuration controlling usage of this service.
2516 visibility: API visibility configuration.
2517 """
2518
2519 apis = _messages.MessageField('Api', 1, repeated=True)
2520 authentication = _messages.MessageField('Authentication', 2)
2521 backend = _messages.MessageField('Backend', 3)
2522 billing = _messages.MessageField('Billing', 4)
2523 configVersion = _messages.IntegerField(5, variant=_messages.Variant.UINT32)
2524 context = _messages.MessageField('Context', 6)
2525 control = _messages.MessageField('Control', 7)
2526 customError = _messages.MessageField('CustomError', 8)
2527 documentation = _messages.MessageField('Documentation', 9)
2528 enums = _messages.MessageField('Enum', 10, repeated=True)
2529 http = _messages.MessageField('Http', 11)
2530 id = _messages.StringField(12)
2531 logging = _messages.MessageField('Logging', 13)
2532 logs = _messages.MessageField('LogDescriptor', 14, repeated=True)
2533 metrics = _messages.MessageField('MetricDescriptor', 15, repeated=True)
2534 monitoredResources = _messages.MessageField('MonitoredResourceDescriptor', 1 6, repeated=True)
2535 monitoring = _messages.MessageField('Monitoring', 17)
2536 name = _messages.StringField(18)
2537 producerProjectId = _messages.StringField(19)
2538 projectProperties = _messages.MessageField('ProjectProperties', 20)
2539 quota = _messages.MessageField('Quota', 21)
2540 systemParameters = _messages.MessageField('SystemParameters', 22)
2541 systemTypes = _messages.MessageField('Type', 23, repeated=True)
2542 title = _messages.StringField(24)
2543 types = _messages.MessageField('Type', 25, repeated=True)
2544 usage = _messages.MessageField('Usage', 26)
2545 visibility = _messages.MessageField('Visibility', 27)
2546
2547
2548 class ServicecontrolServicesCheckRequest(_messages.Message):
2549 """A ServicecontrolServicesCheckRequest object.
2550
2551 Fields:
2552 checkRequest: A CheckRequest resource to be passed as the request body.
2553 serviceName: The service name. The DNS address at which this service is
2554 available, such as `"pubsub.googleapis.com"`. Please see
2555 `google.api.Service` for the definition of service name.
2556 """
2557
2558 checkRequest = _messages.MessageField('CheckRequest', 1)
2559 serviceName = _messages.StringField(2, required=True)
2560
2561
2562 class ServicecontrolServicesReportRequest(_messages.Message):
2563 """A ServicecontrolServicesReportRequest object.
2564
2565 Fields:
2566 reportRequest: A ReportRequest resource to be passed as the request body.
2567 serviceName: The service name. The DNS address at which this service is
2568 available, such as `"pubsub.googleapis.com"`. Please see
2569 `google.api.Service` for the definition of service name.
2570 """
2571
2572 reportRequest = _messages.MessageField('ReportRequest', 1)
2573 serviceName = _messages.StringField(2, required=True)
2574
2575
2576 class SourceContext(_messages.Message):
2577 """`SourceContext` represents information about the source of a protobuf
2578 element, like the file in which it is defined.
2579
2580 Fields:
2581 fileName: The path-qualified name of the .proto file that contained the
2582 associated protobuf element. For example:
2583 `"google/protobuf/source.proto"`.
2584 """
2585
2586 fileName = _messages.StringField(1)
2587
2588
2589 class StandardQueryParameters(_messages.Message):
2590 """Query parameters accepted by all methods.
2591
2592 Enums:
2593 FXgafvValueValuesEnum: V1 error format.
2594 AltValueValuesEnum: Data format for response.
2595
2596 Fields:
2597 f__xgafv: V1 error format.
2598 access_token: OAuth access token.
2599 alt: Data format for response.
2600 bearer_token: OAuth bearer token.
2601 callback: JSONP
2602 fields: Selector specifying which fields to include in a partial response.
2603 key: API key. Your API key identifies your project and provides you with
2604 API access, quota, and reports. Required unless you provide an OAuth 2.0
2605 token.
2606 oauth_token: OAuth 2.0 token for the current user.
2607 pp: Pretty-print response.
2608 prettyPrint: Returns response with indentations and line breaks.
2609 quotaUser: Available to use for quota purposes for server-side
2610 applications. Can be any arbitrary string assigned to a user, but should
2611 not exceed 40 characters.
2612 trace: A tracing token of the form "token:<tokenid>" to include in api
2613 requests.
2614 uploadType: Legacy upload protocol for media (e.g. "media", "multipart").
2615 upload_protocol: Upload protocol for media (e.g. "raw", "multipart").
2616 """
2617
2618 class AltValueValuesEnum(_messages.Enum):
2619 """Data format for response.
2620
2621 Values:
2622 json: Responses with Content-Type of application/json
2623 media: Media download with context-dependent Content-Type
2624 proto: Responses with Content-Type of application/x-protobuf
2625 """
2626 json = 0
2627 media = 1
2628 proto = 2
2629
2630 class FXgafvValueValuesEnum(_messages.Enum):
2631 """V1 error format.
2632
2633 Values:
2634 _1: v1 error format
2635 _2: v2 error format
2636 """
2637 _1 = 0
2638 _2 = 1
2639
2640 f__xgafv = _messages.EnumField('FXgafvValueValuesEnum', 1)
2641 access_token = _messages.StringField(2)
2642 alt = _messages.EnumField('AltValueValuesEnum', 3, default=u'json')
2643 bearer_token = _messages.StringField(4)
2644 callback = _messages.StringField(5)
2645 fields = _messages.StringField(6)
2646 key = _messages.StringField(7)
2647 oauth_token = _messages.StringField(8)
2648 pp = _messages.BooleanField(9, default=True)
2649 prettyPrint = _messages.BooleanField(10, default=True)
2650 quotaUser = _messages.StringField(11)
2651 trace = _messages.StringField(12)
2652 uploadType = _messages.StringField(13)
2653 upload_protocol = _messages.StringField(14)
2654
2655
2656 class Status(_messages.Message):
2657 """The `Status` type defines a logical error model that is suitable for
2658 different programming environments, including REST APIs and RPC APIs. It is
2659 used by [gRPC](https://github.com/grpc). The error model is designed to be:
2660 - Simple to use and understand for most users - Flexible enough to meet
2661 unexpected needs # Overview The `Status` message contains three pieces of
2662 data: error code, error message, and error details. The error code should be
2663 an enum value of google.rpc.Code, but it may accept additional error codes
2664 if needed. The error message should be a developer-facing English message
2665 that helps developers *understand* and *resolve* the error. If a localized
2666 user-facing error message is needed, put the localized message in the error
2667 details or localize it in the client. The optional error details may contain
2668 arbitrary information about the error. There is a predefined set of error
2669 detail types in the package `google.rpc` which can be used for common error
2670 conditions. # Language mapping The `Status` message is the logical
2671 representation of the error model, but it is not necessarily the actual wire
2672 format. When the `Status` message is exposed in different client libraries
2673 and different wire protocols, it can be mapped differently. For example, it
2674 will likely be mapped to some exceptions in Java, but more likely mapped to
2675 some error codes in C. # Other uses The error model and the `Status`
2676 message can be used in a variety of environments, either with or without
2677 APIs, to provide a consistent developer experience across different
2678 environments. Example uses of this error model include: - Partial errors.
2679 If a service needs to return partial errors to the client, it may embed
2680 the `Status` in the normal response to indicate the partial errors. -
2681 Workflow errors. A typical workflow has multiple steps. Each step may
2682 have a `Status` message for error reporting purpose. - Batch operations. If
2683 a client uses batch request and batch response, the `Status` message
2684 should be used directly inside batch response, one for each error sub-
2685 response. - Asynchronous operations. If an API call embeds asynchronous
2686 operation results in its response, the status of those operations should
2687 be represented directly using the `Status` message. - Logging. If some
2688 API errors are stored in logs, the message `Status` could be used
2689 directly after any stripping needed for security/privacy reasons.
2690
2691 Messages:
2692 DetailsValueListEntry: A DetailsValueListEntry object.
2693
2694 Fields:
2695 code: The status code, which should be an enum value of google.rpc.Code.
2696 details: A list of messages that carry the error details. There will be a
2697 common set of message types for APIs to use.
2698 message: A developer-facing error message, which should be in English. Any
2699 user-facing error message should be localized and sent in the
2700 google.rpc.Status.details field, or localized by the client.
2701 """
2702
2703 @encoding.MapUnrecognizedFields('additionalProperties')
2704 class DetailsValueListEntry(_messages.Message):
2705 """A DetailsValueListEntry object.
2706
2707 Messages:
2708 AdditionalProperty: An additional property for a DetailsValueListEntry
2709 object.
2710
2711 Fields:
2712 additionalProperties: Properties of the object. Contains field @ype w ith
2713 type URL.
2714 """
2715
2716 class AdditionalProperty(_messages.Message):
2717 """An additional property for a DetailsValueListEntry object.
2718
2719 Fields:
2720 key: Name of the additional property.
2721 value: A extra_types.JsonValue attribute.
2722 """
2723
2724 key = _messages.StringField(1)
2725 value = _messages.MessageField('extra_types.JsonValue', 2)
2726
2727 additionalProperties = _messages.MessageField('AdditionalProperty', 1, r epeated=True)
2728
2729 code = _messages.IntegerField(1, variant=_messages.Variant.INT32)
2730 details = _messages.MessageField('DetailsValueListEntry', 2, repeated=True)
2731 message = _messages.StringField(3)
2732
2733
2734 class SystemParameter(_messages.Message):
2735 """Define a parameter's name and location. The parameter may be passed as
2736 either an HTTP header or a URL query parameter, and if both are passed the
2737 behavior is implementation-dependent.
2738
2739 Fields:
2740 httpHeader: Define the HTTP header name to use for the parameter. It is
2741 case insensitive.
2742 name: Define the name of the parameter, such as "api_key", "alt",
2743 "callback", and etc. It is case sensitive.
2744 urlQueryParameter: Define the URL query parameter name to use for the
2745 parameter. It is case sensitive.
2746 """
2747
2748 httpHeader = _messages.StringField(1)
2749 name = _messages.StringField(2)
2750 urlQueryParameter = _messages.StringField(3)
2751
2752
2753 class SystemParameterRule(_messages.Message):
2754 """Define a system parameter rule mapping system parameter definitions to
2755 methods.
2756
2757 Fields:
2758 parameters: Define parameters. Multiple names may be defined for a
2759 parameter. For a given method call, only one of them should be used. If
2760 multiple names are used the behavior is implementation-dependent. If
2761 none of the specified names are present the behavior is parameter-
2762 dependent.
2763 selector: Selects the methods to which this rule applies. Use '*' to
2764 indicate all methods in all APIs. Refer to selector for syntax details.
2765 """
2766
2767 parameters = _messages.MessageField('SystemParameter', 1, repeated=True)
2768 selector = _messages.StringField(2)
2769
2770
2771 class SystemParameters(_messages.Message):
2772 """### System parameter configuration A system parameter is a special kind
2773 of parameter defined by the API system, not by an individual API. It is
2774 typically mapped to an HTTP header and/or a URL query parameter. This
2775 configuration specifies which methods change the names of the system
2776 parameters.
2777
2778 Fields:
2779 rules: Define system parameters. The parameters defined here will
2780 override the default parameters implemented by the system. If this field
2781 is missing from the service config, default system parameters will be
2782 used. Default system parameters and names is implementation-dependent.
2783 Example: define api key and alt name for all methods SystemParameters
2784 rules: - selector: "*" parameters: - name: api_key
2785 url_query_parameter: api_key - name: alt http_header:
2786 Response-Content-Type Example: define 2 api key names for a specific
2787 method. SystemParameters rules: - selector: "/ListShelves"
2788 parameters: - name: api_key http_header: Api-Key1
2789 - name: api_key http_header: Api-Key2
2790 """
2791
2792 rules = _messages.MessageField('SystemParameterRule', 1, repeated=True)
2793
2794
2795 class Type(_messages.Message):
2796 """A protocol buffer message type.
2797
2798 Enums:
2799 SyntaxValueValuesEnum: The source syntax.
2800
2801 Fields:
2802 fields: The list of fields.
2803 name: The fully qualified message name.
2804 oneofs: The list of types appearing in `oneof` definitions in this type.
2805 options: The protocol buffer options.
2806 sourceContext: The source context.
2807 syntax: The source syntax.
2808 """
2809
2810 class SyntaxValueValuesEnum(_messages.Enum):
2811 """The source syntax.
2812
2813 Values:
2814 SYNTAX_PROTO2: Syntax `proto2`.
2815 SYNTAX_PROTO3: Syntax `proto3`.
2816 """
2817 SYNTAX_PROTO2 = 0
2818 SYNTAX_PROTO3 = 1
2819
2820 fields = _messages.MessageField('Field', 1, repeated=True)
2821 name = _messages.StringField(2)
2822 oneofs = _messages.StringField(3, repeated=True)
2823 options = _messages.MessageField('Option', 4, repeated=True)
2824 sourceContext = _messages.MessageField('SourceContext', 5)
2825 syntax = _messages.EnumField('SyntaxValueValuesEnum', 6)
2826
2827
2828 class Usage(_messages.Message):
2829 """Configuration controlling usage of a service.
2830
2831 Enums:
2832 ServiceAccessValueValuesEnum: Controls which users can see or activate the
2833 service.
2834
2835 Fields:
2836 activationHooks: Services that must be contacted before a consumer can
2837 begin using the service. Each service will be contacted in sequence,
2838 and, if any activation call fails, the entire activation will fail. Each
2839 hook is of the form <service.name>/<hook-id>, where <hook-id> is
2840 optional; for example: 'robotservice.googleapis.com/default'.
2841 deactivationHooks: Services that must be contacted before a consumer can
2842 deactivate a service. Each service will be contacted in sequence, and,
2843 if any deactivation call fails, the entire deactivation will fail. Each
2844 hook is of the form <service.name>/<hook-id>, where <hook-id> is
2845 optional; for example: 'compute.googleapis.com/'.
2846 dependsOnServices: Services that must be activated in order for this
2847 service to be used. The set of services activated as a result of these
2848 relations are all activated in parallel with no guaranteed order of
2849 activation. Each string is a service name, e.g.
2850 `calendar.googleapis.com`.
2851 requirements: Requirements that must be satisfied before a consumer
2852 project can use the service. Each requirement is of the form
2853 <service.name>/<requirement-id>; for example
2854 'serviceusage.googleapis.com/billing-enabled'.
2855 rules: Individual rules for configuring usage on selected methods.
2856 serviceAccess: Controls which users can see or activate the service.
2857 """
2858
2859 class ServiceAccessValueValuesEnum(_messages.Enum):
2860 """Controls which users can see or activate the service.
2861
2862 Values:
2863 RESTRICTED: The service can only be seen/used by users identified in t he
2864 service's access control policy. If the service has not been
2865 whitelisted by your domain administrator for out-of-org publishing,
2866 then this mode will be treated like ORG_RESTRICTED.
2867 PUBLIC: The service can be seen/used by anyone. If the service has no t
2868 been whitelisted by your domain administrator for out-of-org
2869 publishing, then this mode will be treated like ORG_PUBLIC. The
2870 discovery document for the service will also be public and allow
2871 unregistered access.
2872 ORG_RESTRICTED: The service can be seen/used by users identified in th e
2873 service's access control policy and they are within the organization
2874 that owns the service. Access is further constrained to the group
2875 controlled by the administrator of the project/org that owns the
2876 service.
2877 ORG_PUBLIC: The service can be seen/used by the group of users
2878 controlled by the administrator of the project/org that owns the
2879 service.
2880 """
2881 RESTRICTED = 0
2882 PUBLIC = 1
2883 ORG_RESTRICTED = 2
2884 ORG_PUBLIC = 3
2885
2886 activationHooks = _messages.StringField(1, repeated=True)
2887 deactivationHooks = _messages.StringField(2, repeated=True)
2888 dependsOnServices = _messages.StringField(3, repeated=True)
2889 requirements = _messages.StringField(4, repeated=True)
2890 rules = _messages.MessageField('UsageRule', 5, repeated=True)
2891 serviceAccess = _messages.EnumField('ServiceAccessValueValuesEnum', 6)
2892
2893
2894 class UsageRule(_messages.Message):
2895 """Usage configuration rules for the service. NOTE: Under development.
2896 Use this rule to configure unregistered calls for the service. Unregistered
2897 calls are calls that do not contain consumer project identity. (Example:
2898 calls that do not contain an API key). By default, API methods do not allow
2899 unregistered calls, and each method call must be identified by a consumer
2900 project identity. Use this rule to allow/disallow unregistered calls.
2901 Example of an API that wants to allow unregistered calls for entire service.
2902 usage: rules: - selector: "*" allow_unregistered_calls:
2903 true Example of a method that wants to allow unregistered calls.
2904 usage: rules: - selector:
2905 "google.example.library.v1.LibraryService.CreateBook"
2906 allow_unregistered_calls: true
2907
2908 Fields:
2909 allowUnregisteredCalls: True, if the method allows unregistered calls;
2910 false otherwise.
2911 selector: Selects the methods to which this rule applies. Use '*' to
2912 indicate all methods in all APIs. Refer to selector for syntax details.
2913 """
2914
2915 allowUnregisteredCalls = _messages.BooleanField(1)
2916 selector = _messages.StringField(2)
2917
2918
2919 class Visibility(_messages.Message):
2920 """`Visibility` defines restrictions for the visibility of service elements.
2921 Restrictions are specified using visibility labels (e.g., TRUSTED_TESTER)
2922 that are elsewhere linked to users and projects. Users and projects can
2923 have access to more than one visibility label. The effective visibility for
2924 multiple labels is the union of each label's elements, plus any unrestricted
2925 elements. If an element and its parents have no restrictions, visibility is
2926 unconditionally granted. Example: visibility: rules: -
2927 selector: google.calendar.Calendar.EnhancedSearch restriction:
2928 TRUSTED_TESTER - selector: google.calendar.Calendar.Delegate
2929 restriction: GOOGLE_INTERNAL Here, all methods are publicly visible except
2930 for the restricted methods EnhancedSearch and Delegate.
2931
2932 Fields:
2933 enforceRuntimeVisibility: Controls whether visibility rules are enforced
2934 at runtime for requests to all APIs and methods. If true, requests
2935 without method visibility will receive a NOT_FOUND error, and any non-
2936 visible fields will be scrubbed from the response messages. In service
2937 config version 0, the default is false. In later config versions, it's
2938 true. Note, the `enforce_runtime_visibility` specified in a visibility
2939 rule overrides this setting for the APIs or methods asscoiated with the
2940 rule.
2941 rules: A list of visibility rules providing visibility configuration for
2942 individual API elements.
2943 """
2944
2945 enforceRuntimeVisibility = _messages.BooleanField(1)
2946 rules = _messages.MessageField('VisibilityRule', 2, repeated=True)
2947
2948
2949 class VisibilityRule(_messages.Message):
2950 """A visibility rule provides visibility configuration for an individual API
2951 element.
2952
2953 Fields:
2954 enforceRuntimeVisibility: Controls whether visibility is enforced at
2955 runtime for requests to an API method. This setting has meaning only
2956 when the selector applies to a method or an API. If true, requests
2957 without method visibility will receive a NOT_FOUND error, and any non-
2958 visible fields will be scrubbed from the response messages. The default
2959 is determined by the value of
2960 google.api.Visibility.enforce_runtime_visibility.
2961 restriction: Lists the visibility labels for this rule. Any of the listed
2962 labels grants visibility to the element. If a rule has multiple labels,
2963 removing one of the labels but not all of them can break clients.
2964 Example: visibility: rules: - selector:
2965 google.calendar.Calendar.EnhancedSearch restriction:
2966 GOOGLE_INTERNAL, TRUSTED_TESTER Removing GOOGLE_INTERNAL from this
2967 restriction will break clients that rely on this method and only had
2968 access to it through GOOGLE_INTERNAL.
2969 selector: Selects methods, messages, fields, enums, etc. to which this
2970 rule applies. Refer to selector for syntax details.
2971 """
2972
2973 enforceRuntimeVisibility = _messages.BooleanField(1)
2974 restriction = _messages.StringField(2)
2975 selector = _messages.StringField(3)
2976
2977
2978 encoding.AddCustomJsonFieldMapping(
2979 StandardQueryParameters, 'f__xgafv', '$.xgafv',
2980 package=u'servicecontrol')
2981 encoding.AddCustomJsonEnumMapping(
2982 StandardQueryParameters.FXgafvValueValuesEnum, '_1', '1',
2983 package=u'servicecontrol')
2984 encoding.AddCustomJsonEnumMapping(
2985 StandardQueryParameters.FXgafvValueValuesEnum, '_2', '2',
2986 package=u'servicecontrol')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698