1"""Generated message classes for serviceconsumermanagement version v1beta1. 2 3Manages the service consumers of a Service Infrastructure service. 4""" 5# NOTE: This file is autogenerated and should not be edited by hand. 6 7from __future__ import absolute_import 8 9from apitools.base.protorpclite import messages as _messages 10from apitools.base.py import encoding 11from apitools.base.py import extra_types 12 13 14package = 'serviceconsumermanagement' 15 16 17class Api(_messages.Message): 18 r"""Api is a light-weight descriptor for an API Interface. Interfaces are 19 also described as "protocol buffer services" in some contexts, such as by 20 the "service" keyword in a .proto file, but they are different from API 21 Services, which represent a concrete implementation of an interface as 22 opposed to simply a description of methods and bindings. They are also 23 sometimes simply referred to as "APIs" in other contexts, such as the name 24 of this message itself. See https://cloud.google.com/apis/design/glossary 25 for detailed terminology. 26 27 Enums: 28 SyntaxValueValuesEnum: The source syntax of the service. 29 30 Fields: 31 methods: The methods of this interface, in unspecified order. 32 mixins: Included interfaces. See Mixin. 33 name: The fully qualified name of this interface, including package name 34 followed by the interface's simple name. 35 options: Any metadata attached to the interface. 36 sourceContext: Source context for the protocol buffer service represented 37 by this message. 38 syntax: The source syntax of the service. 39 version: A version string for this interface. If specified, must have the 40 form `major-version.minor-version`, as in `1.10`. If the minor version 41 is omitted, it defaults to zero. If the entire version field is empty, 42 the major version is derived from the package name, as outlined below. 43 If the field is not empty, the version in the package name will be 44 verified to be consistent with what is provided here. The versioning 45 schema uses [semantic versioning](http://semver.org) where the major 46 version number indicates a breaking change and the minor version an 47 additive, non-breaking change. Both version numbers are signals to users 48 what to expect from different versions, and should be carefully chosen 49 based on the product plan. The major version is also reflected in the 50 package name of the interface, which must end in `v<major-version>`, as 51 in `google.feature.v1`. For major versions 0 and 1, the suffix can be 52 omitted. Zero major versions must only be used for experimental, non-GA 53 interfaces. 54 """ 55 56 class SyntaxValueValuesEnum(_messages.Enum): 57 r"""The source syntax of the service. 58 59 Values: 60 SYNTAX_PROTO2: Syntax `proto2`. 61 SYNTAX_PROTO3: Syntax `proto3`. 62 """ 63 SYNTAX_PROTO2 = 0 64 SYNTAX_PROTO3 = 1 65 66 methods = _messages.MessageField('Method', 1, repeated=True) 67 mixins = _messages.MessageField('Mixin', 2, repeated=True) 68 name = _messages.StringField(3) 69 options = _messages.MessageField('Option', 4, repeated=True) 70 sourceContext = _messages.MessageField('SourceContext', 5) 71 syntax = _messages.EnumField('SyntaxValueValuesEnum', 6) 72 version = _messages.StringField(7) 73 74 75class AuthProvider(_messages.Message): 76 r"""Configuration for an authentication provider, including support for 77 [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json- 78 web-token-32). 79 80 Fields: 81 audiences: The list of JWT [audiences](https://tools.ietf.org/html/draft- 82 ietf-oauth-json-web-token-32#section-4.1.3). that are allowed to access. 83 A JWT containing any of these audiences will be accepted. When this 84 setting is absent, JWTs with audiences: - 85 "https://[service.name]/[google.protobuf.Api.name]" - 86 "https://[service.name]/" will be accepted. For example, if no audiences 87 are in the setting, LibraryService API will accept JWTs with the 88 following audiences: - https://library- 89 example.googleapis.com/google.example.library.v1.LibraryService - 90 https://library-example.googleapis.com/ Example: audiences: 91 bookstore_android.apps.googleusercontent.com, 92 bookstore_web.apps.googleusercontent.com 93 authorizationUrl: Redirect URL if JWT token is required but not present or 94 is expired. Implement authorizationUrl of securityDefinitions in OpenAPI 95 spec. 96 id: The unique identifier of the auth provider. It will be referred to by 97 `AuthRequirement.provider_id`. Example: "bookstore_auth". 98 issuer: Identifies the principal that issued the JWT. See 99 https://tools.ietf.org/html/draft-ietf-oauth-json-web- 100 token-32#section-4.1.1 Usually a URL or an email address. Example: 101 https://securetoken.google.com Example: 102 1234567-compute@developer.gserviceaccount.com 103 jwksUri: URL of the provider's public key set to validate signature of the 104 JWT. See [OpenID Discovery](https://openid.net/specs/openid-connect- 105 discovery-1_0.html#ProviderMetadata). Optional if the key set document: 106 - can be retrieved from [OpenID 107 Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html of 108 the issuer. - can be inferred from the email domain of the issuer (e.g. 109 a Google service account). Example: 110 https://www.googleapis.com/oauth2/v1/certs 111 jwtLocations: Defines the locations to extract the JWT. JWT locations can 112 be either from HTTP headers or URL query parameters. The rule is that 113 the first match wins. The checking order is: checking all headers first, 114 then URL query parameters. If not specified, default to use following 115 3 locations: 1) Authorization: Bearer 2) x-goog-iap-jwt-assertion 116 3) access_token query parameter Default locations can be specified as 117 followings: jwt_locations: - header: Authorization 118 value_prefix: "Bearer " - header: x-goog-iap-jwt-assertion - 119 query: access_token 120 """ 121 122 audiences = _messages.StringField(1) 123 authorizationUrl = _messages.StringField(2) 124 id = _messages.StringField(3) 125 issuer = _messages.StringField(4) 126 jwksUri = _messages.StringField(5) 127 jwtLocations = _messages.MessageField('JwtLocation', 6, repeated=True) 128 129 130class AuthRequirement(_messages.Message): 131 r"""User-defined authentication requirements, including support for [JSON 132 Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web- 133 token-32). 134 135 Fields: 136 audiences: NOTE: This will be deprecated soon, once AuthProvider.audiences 137 is implemented and accepted in all the runtime components. The list of 138 JWT [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web- 139 token-32#section-4.1.3). that are allowed to access. A JWT containing 140 any of these audiences will be accepted. When this setting is absent, 141 only JWTs with audience "https://Service_name/API_name" will be 142 accepted. For example, if no audiences are in the setting, 143 LibraryService API will only accept JWTs with the following audience 144 "https://library- 145 example.googleapis.com/google.example.library.v1.LibraryService". 146 Example: audiences: bookstore_android.apps.googleusercontent.com, 147 bookstore_web.apps.googleusercontent.com 148 providerId: id from authentication provider. Example: provider_id: 149 bookstore_auth 150 """ 151 152 audiences = _messages.StringField(1) 153 providerId = _messages.StringField(2) 154 155 156class Authentication(_messages.Message): 157 r"""`Authentication` defines the authentication configuration for an API. 158 Example for an API targeted for external use: name: 159 calendar.googleapis.com authentication: providers: - id: 160 google_calendar_auth jwks_uri: 161 https://www.googleapis.com/oauth2/v1/certs issuer: 162 https://securetoken.google.com rules: - selector: "*" 163 requirements: provider_id: google_calendar_auth 164 165 Fields: 166 providers: Defines a set of authentication providers that a service 167 supports. 168 rules: A list of authentication rules that apply to individual API 169 methods. **NOTE:** All service configuration rules follow "last one 170 wins" order. 171 """ 172 173 providers = _messages.MessageField('AuthProvider', 1, repeated=True) 174 rules = _messages.MessageField('AuthenticationRule', 2, repeated=True) 175 176 177class AuthenticationRule(_messages.Message): 178 r"""Authentication rules for the service. By default, if a method has any 179 authentication requirements, every request must include a valid credential 180 matching one of the requirements. It's an error to include more than one 181 kind of credential in a single request. If a method doesn't have any auth 182 requirements, request credentials will be ignored. 183 184 Fields: 185 allowWithoutCredential: If true, the service accepts API keys without any 186 other credential. 187 oauth: The requirements for OAuth credentials. 188 requirements: Requirements for additional authentication providers. 189 selector: Selects the methods to which this rule applies. Refer to 190 selector for syntax details. 191 """ 192 193 allowWithoutCredential = _messages.BooleanField(1) 194 oauth = _messages.MessageField('OAuthRequirements', 2) 195 requirements = _messages.MessageField('AuthRequirement', 3, repeated=True) 196 selector = _messages.StringField(4) 197 198 199class Backend(_messages.Message): 200 r"""`Backend` defines the backend configuration for a service. 201 202 Fields: 203 rules: A list of API backend rules that apply to individual API methods. 204 **NOTE:** All service configuration rules follow "last one wins" order. 205 """ 206 207 rules = _messages.MessageField('BackendRule', 1, repeated=True) 208 209 210class BackendRule(_messages.Message): 211 r"""A backend rule provides configuration for an individual API element. 212 213 Enums: 214 PathTranslationValueValuesEnum: 215 216 Fields: 217 address: The address of the API backend. The scheme is used to determine 218 the backend protocol and security. The following schemes are accepted: 219 SCHEME PROTOCOL SECURITY http:// HTTP None 220 https:// HTTP TLS grpc:// gRPC None 221 grpcs:// gRPC TLS It is recommended to explicitly include a 222 scheme. Leaving out the scheme may cause constrasting behaviors across 223 platforms. If the port is unspecified, the default is: - 80 for schemes 224 without TLS - 443 for schemes with TLS For HTTP backends, use protocol 225 to specify the protocol version. 226 deadline: The number of seconds to wait for a response from a request. The 227 default varies based on the request protocol and deployment environment. 228 disableAuth: When disable_auth is true, a JWT ID token won't be generated 229 and the original "Authorization" HTTP header will be preserved. If the 230 header is used to carry the original token and is expected by the 231 backend, this field must be set to true to preserve the header. 232 jwtAudience: The JWT audience is used when generating a JWT ID token for 233 the backend. This ID token will be added in the HTTP "authorization" 234 header, and sent to the backend. 235 minDeadline: Minimum deadline in seconds needed for this method. Calls 236 having deadline value lower than this will be rejected. 237 operationDeadline: The number of seconds to wait for the completion of a 238 long running operation. The default is no deadline. 239 pathTranslation: A PathTranslationValueValuesEnum attribute. 240 protocol: The protocol used for sending a request to the backend. The 241 supported values are "http/1.1" and "h2". The default value is inferred 242 from the scheme in the address field: SCHEME PROTOCOL 243 http:// http/1.1 https:// http/1.1 grpc:// h2 244 grpcs:// h2 For secure HTTP backends (https://) that support 245 HTTP/2, set this field to "h2" for improved performance. Configuring 246 this field to non-default values is only supported for secure HTTP 247 backends. This field will be ignored for all other backends. See 248 https://www.iana.org/assignments/tls-extensiontype-values/tls- 249 extensiontype-values.xhtml#alpn-protocol-ids for more details on the 250 supported values. 251 selector: Selects the methods to which this rule applies. Refer to 252 selector for syntax details. 253 """ 254 255 class PathTranslationValueValuesEnum(_messages.Enum): 256 r"""PathTranslationValueValuesEnum enum type. 257 258 Values: 259 PATH_TRANSLATION_UNSPECIFIED: <no description> 260 CONSTANT_ADDRESS: Use the backend address as-is, with no modification to 261 the path. If the URL pattern contains variables, the variable names 262 and values will be appended to the query string. If a query string 263 parameter and a URL pattern variable have the same name, this may 264 result in duplicate keys in the query string. # Examples Given the 265 following operation config: Method path: 266 /api/company/{cid}/user/{uid} Backend address: 267 https://example.cloudfunctions.net/getUser Requests to the following 268 request paths will call the backend at the translated path: 269 Request path: /api/company/widgetworks/user/johndoe Translated: 270 https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe 271 Request path: /api/company/widgetworks/user/johndoe?timezone=EST 272 Translated: https://example.cloudfunctions.net/getUser?timezone=ES 273 T&cid=widgetworks&uid=johndoe 274 APPEND_PATH_TO_ADDRESS: The request path will be appended to the backend 275 address. # Examples Given the following operation config: 276 Method path: /api/company/{cid}/user/{uid} Backend address: 277 https://example.appspot.com Requests to the following request paths 278 will call the backend at the translated path: Request path: 279 /api/company/widgetworks/user/johndoe Translated: 280 https://example.appspot.com/api/company/widgetworks/user/johndoe 281 Request path: /api/company/widgetworks/user/johndoe?timezone=EST 282 Translated: https://example.appspot.com/api/company/widgetworks/us 283 er/johndoe?timezone=EST 284 """ 285 PATH_TRANSLATION_UNSPECIFIED = 0 286 CONSTANT_ADDRESS = 1 287 APPEND_PATH_TO_ADDRESS = 2 288 289 address = _messages.StringField(1) 290 deadline = _messages.FloatField(2) 291 disableAuth = _messages.BooleanField(3) 292 jwtAudience = _messages.StringField(4) 293 minDeadline = _messages.FloatField(5) 294 operationDeadline = _messages.FloatField(6) 295 pathTranslation = _messages.EnumField('PathTranslationValueValuesEnum', 7) 296 protocol = _messages.StringField(8) 297 selector = _messages.StringField(9) 298 299 300class Billing(_messages.Message): 301 r"""Billing related configuration of the service. The following example 302 shows how to configure monitored resources and metrics for billing, 303 `consumer_destinations` is the only supported destination and the monitored 304 resources need at least one label key `cloud.googleapis.com/location` to 305 indicate the location of the billing usage, using different monitored 306 resources between monitoring and billing is recommended so they can be 307 evolved independently: monitored_resources: - type: 308 library.googleapis.com/billing_branch labels: - key: 309 cloud.googleapis.com/location description: | Predefined 310 label to support billing location restriction. - key: city 311 description: | Custom label to define the city where the library 312 branch is located in. - key: name description: 313 Custom label to define the name of the library branch. metrics: - 314 name: library.googleapis.com/book/borrowed_count metric_kind: DELTA 315 value_type: INT64 unit: "1" billing: consumer_destinations: 316 - monitored_resource: library.googleapis.com/billing_branch metrics: 317 - library.googleapis.com/book/borrowed_count 318 319 Fields: 320 consumerDestinations: Billing configurations for sending metrics to the 321 consumer project. There can be multiple consumer destinations per 322 service, each one must have a different monitored resource type. A 323 metric can be used in at most one consumer destination. 324 """ 325 326 consumerDestinations = _messages.MessageField('BillingDestination', 1, repeated=True) 327 328 329class BillingDestination(_messages.Message): 330 r"""Configuration of a specific billing destination (Currently only support 331 bill against consumer project). 332 333 Fields: 334 metrics: Names of the metrics to report to this billing destination. Each 335 name must be defined in Service.metrics section. 336 monitoredResource: The monitored resource type. The type must be defined 337 in Service.monitored_resources section. 338 """ 339 340 metrics = _messages.StringField(1, repeated=True) 341 monitoredResource = _messages.StringField(2) 342 343 344class Context(_messages.Message): 345 r"""`Context` defines which contexts an API requests. Example: 346 context: rules: - selector: "*" requested: - 347 google.rpc.context.ProjectContext - google.rpc.context.OriginContext 348 The above specifies that all methods in the API request 349 `google.rpc.context.ProjectContext` and `google.rpc.context.OriginContext`. 350 Available context types are defined in package `google.rpc.context`. This 351 also provides mechanism to whitelist any protobuf message extension that can 352 be sent in grpc metadata using "x-goog-ext-<extension_id>-bin" and "x-goog- 353 ext-<extension_id>-jspb" format. For example, list any service specific 354 protobuf types that can appear in grpc metadata as follows in your yaml 355 file: Example: context: rules: - selector: 356 "google.example.library.v1.LibraryService.CreateBook" 357 allowed_request_extensions: - google.foo.v1.NewExtension 358 allowed_response_extensions: - google.foo.v1.NewExtension You can 359 also specify extension ID instead of fully qualified extension name here. 360 361 Fields: 362 rules: A list of RPC context rules that apply to individual API methods. 363 **NOTE:** All service configuration rules follow "last one wins" order. 364 """ 365 366 rules = _messages.MessageField('ContextRule', 1, repeated=True) 367 368 369class ContextRule(_messages.Message): 370 r"""A context rule provides information about the context for an individual 371 API element. 372 373 Fields: 374 allowedRequestExtensions: A list of full type names or extension IDs of 375 extensions allowed in grpc side channel from client to backend. 376 allowedResponseExtensions: A list of full type names or extension IDs of 377 extensions allowed in grpc side channel from backend to client. 378 provided: A list of full type names of provided contexts. 379 requested: A list of full type names of requested contexts. 380 selector: Selects the methods to which this rule applies. Refer to 381 selector for syntax details. 382 """ 383 384 allowedRequestExtensions = _messages.StringField(1, repeated=True) 385 allowedResponseExtensions = _messages.StringField(2, repeated=True) 386 provided = _messages.StringField(3, repeated=True) 387 requested = _messages.StringField(4, repeated=True) 388 selector = _messages.StringField(5) 389 390 391class Control(_messages.Message): 392 r"""Selects and configures the service controller used by the service. The 393 service controller handles features like abuse, quota, billing, logging, 394 monitoring, etc. 395 396 Fields: 397 environment: The service control environment to use. If empty, no control 398 plane feature (like quota and billing) will be enabled. 399 """ 400 401 environment = _messages.StringField(1) 402 403 404class CustomError(_messages.Message): 405 r"""Customize service error responses. For example, list any service 406 specific protobuf types that can appear in error detail lists of error 407 responses. Example: custom_error: types: - 408 google.foo.v1.CustomError - google.foo.v1.AnotherError 409 410 Fields: 411 rules: The list of custom error rules that apply to individual API 412 messages. **NOTE:** All service configuration rules follow "last one 413 wins" order. 414 types: The list of custom error detail types, e.g. 415 'google.foo.v1.CustomError'. 416 """ 417 418 rules = _messages.MessageField('CustomErrorRule', 1, repeated=True) 419 types = _messages.StringField(2, repeated=True) 420 421 422class CustomErrorRule(_messages.Message): 423 r"""A custom error rule. 424 425 Fields: 426 isErrorType: Mark this message as possible payload in error response. 427 Otherwise, objects of this type will be filtered when they appear in 428 error payload. 429 selector: Selects messages to which this rule applies. Refer to selector 430 for syntax details. 431 """ 432 433 isErrorType = _messages.BooleanField(1) 434 selector = _messages.StringField(2) 435 436 437class CustomHttpPattern(_messages.Message): 438 r"""A custom pattern is used for defining custom HTTP verb. 439 440 Fields: 441 kind: The name of this custom HTTP verb. 442 path: The path matched by this custom verb. 443 """ 444 445 kind = _messages.StringField(1) 446 path = _messages.StringField(2) 447 448 449class Documentation(_messages.Message): 450 r"""`Documentation` provides the information for describing a service. 451 Example: <pre><code>documentation: summary: > The Google Calendar API 452 gives access to most calendar features. pages: - name: Overview 453 content: (== include google/foo/overview.md ==) - name: Tutorial 454 content: (== include google/foo/tutorial.md ==) subpages; - 455 name: Java content: (== include google/foo/tutorial_java.md 456 ==) rules: - selector: google.calendar.Calendar.Get description: 457 > ... - selector: google.calendar.Calendar.Put description: > 458 ... </code></pre> Documentation is provided in markdown syntax. In addition 459 to standard markdown features, definition lists, tables and fenced code 460 blocks are supported. Section headers can be provided and are interpreted 461 relative to the section nesting of the context where a documentation 462 fragment is embedded. Documentation from the IDL is merged with 463 documentation defined via the config at normalization time, where 464 documentation provided by config rules overrides IDL provided. A number of 465 constructs specific to the API platform are supported in documentation text. 466 In order to reference a proto element, the following notation can be used: 467 <pre><code>[fully.qualified.proto.name][]</code></pre> To override 468 the display text used for the link, this can be used: 469 <pre><code>[display text][fully.qualified.proto.name]</code></pre> 470 Text can be excluded from doc using the following notation: 471 <pre><code>(-- internal comment --)</code></pre> A few directives 472 are available in documentation. Note that directives must appear on a single 473 line to be properly identified. The `include` directive includes a markdown 474 file from an external source: <pre><code>(== include path/to/file 475 ==)</code></pre> The `resource_for` directive marks a message to be the 476 resource of a collection in REST view. If it is not specified, tools attempt 477 to infer the resource from the operations in a collection: 478 <pre><code>(== resource_for v1.shelves.books ==)</code></pre> The 479 directive `suppress_warning` does not directly affect documentation and is 480 documented together with service config validation. 481 482 Fields: 483 documentationRootUrl: The URL to the root of documentation. 484 overview: Declares a single overview page. For example: 485 <pre><code>documentation: summary: ... overview: (== include 486 overview.md ==) </code></pre> This is a shortcut for the following 487 declaration (using pages style): <pre><code>documentation: summary: 488 ... pages: - name: Overview content: (== include overview.md 489 ==) </code></pre> Note: you cannot specify both `overview` field and 490 `pages` field. 491 pages: The top level pages for the documentation set. 492 rules: A list of documentation rules that apply to individual API 493 elements. **NOTE:** All service configuration rules follow "last one 494 wins" order. 495 serviceRootUrl: Specifies the service root url if the default one (the 496 service name from the yaml file) is not suitable. This can be seen in 497 any fully specified service urls as well as sections that show a base 498 that other urls are relative to. 499 summary: A short summary of what the service does. Can only be provided by 500 plain text. 501 """ 502 503 documentationRootUrl = _messages.StringField(1) 504 overview = _messages.StringField(2) 505 pages = _messages.MessageField('Page', 3, repeated=True) 506 rules = _messages.MessageField('DocumentationRule', 4, repeated=True) 507 serviceRootUrl = _messages.StringField(5) 508 summary = _messages.StringField(6) 509 510 511class DocumentationRule(_messages.Message): 512 r"""A documentation rule provides information about individual API elements. 513 514 Fields: 515 deprecationDescription: Deprecation description of the selected 516 element(s). It can be provided if an element is marked as `deprecated`. 517 description: Description of the selected API(s). 518 selector: The selector is a comma-separated list of patterns. Each pattern 519 is a qualified name of the element which may end in "*", indicating a 520 wildcard. Wildcards are only allowed at the end and for a whole 521 component of the qualified name, i.e. "foo.*" is ok, but not "foo.b*" or 522 "foo.*.bar". A wildcard will match one or more components. To specify a 523 default for all applicable elements, the whole pattern "*" is used. 524 """ 525 526 deprecationDescription = _messages.StringField(1) 527 description = _messages.StringField(2) 528 selector = _messages.StringField(3) 529 530 531class Empty(_messages.Message): 532 r"""A generic empty message that you can re-use to avoid defining duplicated 533 empty messages in your APIs. A typical example is to use it as the request 534 or the response type of an API method. For instance: service Foo { 535 rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The 536 JSON representation for `Empty` is empty JSON object `{}`. 537 """ 538 539 540 541class Endpoint(_messages.Message): 542 r"""`Endpoint` describes a network endpoint that serves a set of APIs. A 543 service may expose any number of endpoints, and all endpoints share the same 544 service configuration, such as quota configuration and monitoring 545 configuration. Example service configuration: name: library- 546 example.googleapis.com endpoints: # Below entry makes 547 'google.example.library.v1.Library' # API be served from endpoint 548 address library-example.googleapis.com. # It also allows HTTP OPTIONS 549 calls to be passed to the backend, for # it to decide whether the 550 subsequent cross-origin request is # allowed to proceed. - name: 551 library-example.googleapis.com allow_cors: true 552 553 Fields: 554 aliases: DEPRECATED: This field is no longer supported. Instead of using 555 aliases, please specify multiple google.api.Endpoint for each of the 556 intended aliases. Additional names that this endpoint will be hosted 557 on. 558 allowCors: Allowing [CORS](https://en.wikipedia.org/wiki/Cross- 559 origin_resource_sharing), aka cross-domain traffic, would allow the 560 backends served from this endpoint to receive and respond to HTTP 561 OPTIONS requests. The response will be used by the browser to determine 562 whether the subsequent cross-origin request is allowed to proceed. 563 name: The canonical name of this endpoint. 564 target: The specification of an Internet routable address of API frontend 565 that will handle requests to this [API 566 Endpoint](https://cloud.google.com/apis/design/glossary). It should be 567 either a valid IPv4 address or a fully-qualified domain name. For 568 example, "8.8.8.8" or "myservice.appspot.com". 569 """ 570 571 aliases = _messages.StringField(1, repeated=True) 572 allowCors = _messages.BooleanField(2) 573 name = _messages.StringField(3) 574 target = _messages.StringField(4) 575 576 577class Enum(_messages.Message): 578 r"""Enum type definition. 579 580 Enums: 581 SyntaxValueValuesEnum: The source syntax. 582 583 Fields: 584 enumvalue: Enum value definitions. 585 name: Enum type name. 586 options: Protocol buffer options. 587 sourceContext: The source context. 588 syntax: The source syntax. 589 """ 590 591 class SyntaxValueValuesEnum(_messages.Enum): 592 r"""The source syntax. 593 594 Values: 595 SYNTAX_PROTO2: Syntax `proto2`. 596 SYNTAX_PROTO3: Syntax `proto3`. 597 """ 598 SYNTAX_PROTO2 = 0 599 SYNTAX_PROTO3 = 1 600 601 enumvalue = _messages.MessageField('EnumValue', 1, repeated=True) 602 name = _messages.StringField(2) 603 options = _messages.MessageField('Option', 3, repeated=True) 604 sourceContext = _messages.MessageField('SourceContext', 4) 605 syntax = _messages.EnumField('SyntaxValueValuesEnum', 5) 606 607 608class EnumValue(_messages.Message): 609 r"""Enum value definition. 610 611 Fields: 612 name: Enum value name. 613 number: Enum value number. 614 options: Protocol buffer options. 615 """ 616 617 name = _messages.StringField(1) 618 number = _messages.IntegerField(2, variant=_messages.Variant.INT32) 619 options = _messages.MessageField('Option', 3, repeated=True) 620 621 622class Field(_messages.Message): 623 r"""A single field of a message type. 624 625 Enums: 626 CardinalityValueValuesEnum: The field cardinality. 627 KindValueValuesEnum: The field type. 628 629 Fields: 630 cardinality: The field cardinality. 631 defaultValue: The string value of the default value of this field. Proto2 632 syntax only. 633 jsonName: The field JSON name. 634 kind: The field type. 635 name: The field name. 636 number: The field number. 637 oneofIndex: The index of the field type in `Type.oneofs`, for message or 638 enumeration types. The first type has index 1; zero means the type is 639 not in the list. 640 options: The protocol buffer options. 641 packed: Whether to use alternative packed wire representation. 642 typeUrl: The field type URL, without the scheme, for message or 643 enumeration types. Example: 644 `"type.googleapis.com/google.protobuf.Timestamp"`. 645 """ 646 647 class CardinalityValueValuesEnum(_messages.Enum): 648 r"""The field cardinality. 649 650 Values: 651 CARDINALITY_UNKNOWN: For fields with unknown cardinality. 652 CARDINALITY_OPTIONAL: For optional fields. 653 CARDINALITY_REQUIRED: For required fields. Proto2 syntax only. 654 CARDINALITY_REPEATED: For repeated fields. 655 """ 656 CARDINALITY_UNKNOWN = 0 657 CARDINALITY_OPTIONAL = 1 658 CARDINALITY_REQUIRED = 2 659 CARDINALITY_REPEATED = 3 660 661 class KindValueValuesEnum(_messages.Enum): 662 r"""The field type. 663 664 Values: 665 TYPE_UNKNOWN: Field type unknown. 666 TYPE_DOUBLE: Field type double. 667 TYPE_FLOAT: Field type float. 668 TYPE_INT64: Field type int64. 669 TYPE_UINT64: Field type uint64. 670 TYPE_INT32: Field type int32. 671 TYPE_FIXED64: Field type fixed64. 672 TYPE_FIXED32: Field type fixed32. 673 TYPE_BOOL: Field type bool. 674 TYPE_STRING: Field type string. 675 TYPE_GROUP: Field type group. Proto2 syntax only, and deprecated. 676 TYPE_MESSAGE: Field type message. 677 TYPE_BYTES: Field type bytes. 678 TYPE_UINT32: Field type uint32. 679 TYPE_ENUM: Field type enum. 680 TYPE_SFIXED32: Field type sfixed32. 681 TYPE_SFIXED64: Field type sfixed64. 682 TYPE_SINT32: Field type sint32. 683 TYPE_SINT64: Field type sint64. 684 """ 685 TYPE_UNKNOWN = 0 686 TYPE_DOUBLE = 1 687 TYPE_FLOAT = 2 688 TYPE_INT64 = 3 689 TYPE_UINT64 = 4 690 TYPE_INT32 = 5 691 TYPE_FIXED64 = 6 692 TYPE_FIXED32 = 7 693 TYPE_BOOL = 8 694 TYPE_STRING = 9 695 TYPE_GROUP = 10 696 TYPE_MESSAGE = 11 697 TYPE_BYTES = 12 698 TYPE_UINT32 = 13 699 TYPE_ENUM = 14 700 TYPE_SFIXED32 = 15 701 TYPE_SFIXED64 = 16 702 TYPE_SINT32 = 17 703 TYPE_SINT64 = 18 704 705 cardinality = _messages.EnumField('CardinalityValueValuesEnum', 1) 706 defaultValue = _messages.StringField(2) 707 jsonName = _messages.StringField(3) 708 kind = _messages.EnumField('KindValueValuesEnum', 4) 709 name = _messages.StringField(5) 710 number = _messages.IntegerField(6, variant=_messages.Variant.INT32) 711 oneofIndex = _messages.IntegerField(7, variant=_messages.Variant.INT32) 712 options = _messages.MessageField('Option', 8, repeated=True) 713 packed = _messages.BooleanField(9) 714 typeUrl = _messages.StringField(10) 715 716 717class Http(_messages.Message): 718 r"""Defines the HTTP configuration for an API service. It contains a list of 719 HttpRule, each specifying the mapping of an RPC method to one or more HTTP 720 REST API methods. 721 722 Fields: 723 fullyDecodeReservedExpansion: When set to true, URL path parameters will 724 be fully URI-decoded except in cases of single segment matches in 725 reserved expansion, where "%2F" will be left encoded. The default 726 behavior is to not decode RFC 6570 reserved characters in multi segment 727 matches. 728 rules: A list of HTTP configuration rules that apply to individual API 729 methods. **NOTE:** All service configuration rules follow "last one 730 wins" order. 731 """ 732 733 fullyDecodeReservedExpansion = _messages.BooleanField(1) 734 rules = _messages.MessageField('HttpRule', 2, repeated=True) 735 736 737class HttpRule(_messages.Message): 738 r"""# gRPC Transcoding gRPC Transcoding is a feature for mapping between a 739 gRPC method and one or more HTTP REST endpoints. It allows developers to 740 build a single API service that supports both gRPC APIs and REST APIs. Many 741 systems, including [Google APIs](https://github.com/googleapis/googleapis), 742 [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC 743 Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and 744 [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and 745 use it for large scale production services. `HttpRule` defines the schema 746 of the gRPC/REST mapping. The mapping specifies how different portions of 747 the gRPC request message are mapped to the URL path, URL query parameters, 748 and HTTP request body. It also controls how the gRPC response message is 749 mapped to the HTTP response body. `HttpRule` is typically specified as an 750 `google.api.http` annotation on the gRPC method. Each mapping specifies a 751 URL path template and an HTTP method. The path template may refer to one or 752 more fields in the gRPC request message, as long as each field is a non- 753 repeated field with a primitive (non-message) type. The path template 754 controls how fields of the request message are mapped to the URL path. 755 Example: service Messaging { rpc GetMessage(GetMessageRequest) 756 returns (Message) { option (google.api.http) = { get: 757 "/v1/{name=messages/*}" }; } } message 758 GetMessageRequest { string name = 1; // Mapped to URL path. } 759 message Message { string text = 1; // The resource content. } 760 This enables an HTTP REST to gRPC mapping as below: HTTP | gRPC -----|----- 761 `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` Any 762 fields in the request message which are not bound by the path template 763 automatically become HTTP query parameters if there is no HTTP request body. 764 For example: service Messaging { rpc 765 GetMessage(GetMessageRequest) returns (Message) { option 766 (google.api.http) = { get:"/v1/messages/{message_id}" }; 767 } } message GetMessageRequest { message SubMessage { 768 string subfield = 1; } string message_id = 1; // Mapped to URL 769 path. int64 revision = 2; // Mapped to URL query parameter 770 `revision`. SubMessage sub = 3; // Mapped to URL query parameter 771 `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: 772 HTTP | gRPC -----|----- `GET 773 /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: 774 "123456" revision: 2 sub: SubMessage(subfield: "foo"))` Note that fields 775 which are mapped to URL query parameters must have a primitive type or a 776 repeated primitive type or a non-repeated message type. In the case of a 777 repeated type, the parameter can be repeated in the URL as 778 `...?param=A¶m=B`. In the case of a message type, each field of the 779 message is mapped to a separate parameter, such as 780 `...?foo.a=A&foo.b=B&foo.c=C`. For HTTP methods that allow a request body, 781 the `body` field specifies the mapping. Consider a REST update method on the 782 message resource collection: service Messaging { rpc 783 UpdateMessage(UpdateMessageRequest) returns (Message) { option 784 (google.api.http) = { patch: "/v1/messages/{message_id}" 785 body: "message" }; } } message UpdateMessageRequest { 786 string message_id = 1; // mapped to the URL Message message = 2; // 787 mapped to the body } The following HTTP JSON to RPC mapping is enabled, 788 where the representation of the JSON in the request body is determined by 789 protos JSON encoding: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { 790 "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" 791 })` The special name `*` can be used in the body mapping to define that 792 every field not bound by the path template should be mapped to the request 793 body. This enables the following alternative definition of the update 794 method: service Messaging { rpc UpdateMessage(Message) returns 795 (Message) { option (google.api.http) = { patch: 796 "/v1/messages/{message_id}" body: "*" }; } } 797 message Message { string message_id = 1; string text = 2; } 798 The following HTTP JSON to RPC mapping is enabled: HTTP | gRPC -----|----- 799 `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: 800 "123456" text: "Hi!")` Note that when using `*` in the body mapping, it is 801 not possible to have HTTP parameters, as all fields not bound by the path 802 end in the body. This makes this option more rarely used in practice when 803 defining REST APIs. The common usage of `*` is in custom methods which don't 804 use the URL at all for transferring data. It is possible to define multiple 805 HTTP methods for one RPC by using the `additional_bindings` option. Example: 806 service Messaging { rpc GetMessage(GetMessageRequest) returns 807 (Message) { option (google.api.http) = { get: 808 "/v1/messages/{message_id}" additional_bindings { get: 809 "/v1/users/{user_id}/messages/{message_id}" } }; } 810 } message GetMessageRequest { string message_id = 1; string 811 user_id = 2; } This enables the following two alternative HTTP JSON to 812 RPC mappings: HTTP | gRPC -----|----- `GET /v1/messages/123456` | 813 `GetMessage(message_id: "123456")` `GET /v1/users/me/messages/123456` | 814 `GetMessage(user_id: "me" message_id: "123456")` ## Rules for HTTP mapping 815 1. Leaf request fields (recursive expansion nested messages in the request 816 message) are classified into three categories: - Fields referred by the 817 path template. They are passed via the URL path. - Fields referred by the 818 HttpRule.body. They are passed via the HTTP request body. - All 819 other fields are passed via the URL query parameters, and the parameter 820 name is the field path in the request message. A repeated field can be 821 represented as multiple query parameters under the same name. 2. If 822 HttpRule.body is "*", there is no URL query parameter, all fields are 823 passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, 824 there is no HTTP request body, all fields are passed via URL path and 825 URL query parameters. ### Path template syntax Template = "/" Segments 826 [ Verb ] ; Segments = Segment { "/" Segment } ; Segment = "*" | 827 "**" | LITERAL | Variable ; Variable = "{" FieldPath [ "=" Segments ] 828 "}" ; FieldPath = IDENT { "." IDENT } ; Verb = ":" LITERAL ; 829 The syntax `*` matches a single URL path segment. The syntax `**` matches 830 zero or more URL path segments, which must be the last part of the URL path 831 except the `Verb`. The syntax `Variable` matches part of the URL path as 832 specified by its template. A variable template must not contain other 833 variables. If a variable matches a single path segment, its template may be 834 omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` 835 matches literal text in the URL path. If the `LITERAL` contains any reserved 836 character, such characters should be percent-encoded before the matching. 837 If a variable contains exactly one path segment, such as `"{var}"` or 838 `"{var=*}"`, when such a variable is expanded into a URL path on the client 839 side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The 840 server side does the reverse decoding. Such variables show up in the 841 [Discovery 842 Document](https://developers.google.com/discovery/v1/reference/apis) as 843 `{var}`. If a variable contains multiple path segments, such as 844 `"{var=foo/*}"` or `"{var=**}"`, when such a variable is expanded into a URL 845 path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are 846 percent-encoded. The server side does the reverse decoding, except "%2F" and 847 "%2f" are left unchanged. Such variables show up in the [Discovery 848 Document](https://developers.google.com/discovery/v1/reference/apis) as 849 `{+var}`. ## Using gRPC API Service Configuration gRPC API Service 850 Configuration (service config) is a configuration language for configuring a 851 gRPC service to become a user-facing product. The service config is simply 852 the YAML representation of the `google.api.Service` proto message. As an 853 alternative to annotating your proto file, you can configure gRPC 854 transcoding in your service config YAML files. You do this by specifying a 855 `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same 856 effect as the proto annotation. This can be particularly useful if you have 857 a proto that is reused in multiple services. Note that any transcoding 858 specified in the service config will override any matching transcoding 859 configuration in the proto. Example: http: rules: # 860 Selects a gRPC method and applies HttpRule to it. - selector: 861 example.v1.Messaging.GetMessage get: 862 /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC 863 Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON 864 conversion must follow the [proto3 865 specification](https://developers.google.com/protocol- 866 buffers/docs/proto3#json). While the single segment variable follows the 867 semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 868 Simple String Expansion, the multi segment variable **does not** follow RFC 869 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved 870 Expansion does not expand special characters like `?` and `#`, which would 871 lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding 872 for multi segment variables. The path variables **must not** refer to any 873 repeated or mapped field, because client libraries are not capable of 874 handling such variable expansion. The path variables **must not** capture 875 the leading "/" character. The reason is that the most common use case 876 "{var}" does not capture the leading "/" character. For consistency, all 877 path variables must share the same behavior. Repeated message fields must 878 not be mapped to URL query parameters, because no client library can support 879 such complicated mapping. If an API needs to use a JSON array for request 880 or response body, it can map the request or response body to a repeated 881 field. However, some gRPC Transcoding implementations may not support this 882 feature. 883 884 Fields: 885 additionalBindings: Additional HTTP bindings for the selector. Nested 886 bindings must not contain an `additional_bindings` field themselves 887 (that is, the nesting may only be one level deep). 888 allowHalfDuplex: When this flag is set to true, HTTP requests will be 889 allowed to invoke a half-duplex streaming method. 890 body: The name of the request field whose value is mapped to the HTTP 891 request body, or `*` for mapping all request fields not captured by the 892 path pattern to the HTTP body, or omitted for not having any HTTP 893 request body. NOTE: the referred field must be present at the top-level 894 of the request message type. 895 custom: The custom pattern is used for specifying an HTTP method that is 896 not included in the `pattern` field, such as HEAD, or "*" to leave the 897 HTTP method unspecified for this rule. The wild-card rule is useful for 898 services that provide content to Web (HTML) clients. 899 delete: Maps to HTTP DELETE. Used for deleting a resource. 900 get: Maps to HTTP GET. Used for listing and getting information about 901 resources. 902 patch: Maps to HTTP PATCH. Used for updating a resource. 903 post: Maps to HTTP POST. Used for creating a resource or performing an 904 action. 905 put: Maps to HTTP PUT. Used for replacing a resource. 906 responseBody: Optional. The name of the response field whose value is 907 mapped to the HTTP response body. When omitted, the entire response 908 message will be used as the HTTP response body. NOTE: The referred 909 field must be present at the top-level of the response message type. 910 selector: Selects a method to which this rule applies. Refer to selector 911 for syntax details. 912 """ 913 914 additionalBindings = _messages.MessageField('HttpRule', 1, repeated=True) 915 allowHalfDuplex = _messages.BooleanField(2) 916 body = _messages.StringField(3) 917 custom = _messages.MessageField('CustomHttpPattern', 4) 918 delete = _messages.StringField(5) 919 get = _messages.StringField(6) 920 patch = _messages.StringField(7) 921 post = _messages.StringField(8) 922 put = _messages.StringField(9) 923 responseBody = _messages.StringField(10) 924 selector = _messages.StringField(11) 925 926 927class JwtLocation(_messages.Message): 928 r"""Specifies a location to extract JWT from an API request. 929 930 Fields: 931 header: Specifies HTTP header name to extract JWT token. 932 query: Specifies URL query parameter name to extract JWT token. 933 valuePrefix: The value prefix. The value format is "value_prefix{token}" 934 Only applies to "in" header type. Must be empty for "in" query type. If 935 not empty, the header value has to match (case sensitive) this prefix. 936 If not matched, JWT will not be extracted. If matched, JWT will be 937 extracted after the prefix is removed. For example, for "Authorization: 938 Bearer {JWT}", value_prefix="Bearer " with a space at the end. 939 """ 940 941 header = _messages.StringField(1) 942 query = _messages.StringField(2) 943 valuePrefix = _messages.StringField(3) 944 945 946class LabelDescriptor(_messages.Message): 947 r"""A description of a label. 948 949 Enums: 950 ValueTypeValueValuesEnum: The type of data that can be assigned to the 951 label. 952 953 Fields: 954 description: A human-readable description for the label. 955 key: The label key. 956 valueType: The type of data that can be assigned to the label. 957 """ 958 959 class ValueTypeValueValuesEnum(_messages.Enum): 960 r"""The type of data that can be assigned to the label. 961 962 Values: 963 STRING: A variable-length string. This is the default. 964 BOOL: Boolean; true or false. 965 INT64: A 64-bit signed integer. 966 """ 967 STRING = 0 968 BOOL = 1 969 INT64 = 2 970 971 description = _messages.StringField(1) 972 key = _messages.StringField(2) 973 valueType = _messages.EnumField('ValueTypeValueValuesEnum', 3) 974 975 976class LogDescriptor(_messages.Message): 977 r"""A description of a log type. Example in YAML format: - name: 978 library.googleapis.com/activity_history description: The history of 979 borrowing and returning library items. display_name: Activity 980 labels: - key: /customer_id description: Identifier of a 981 library customer 982 983 Fields: 984 description: A human-readable description of this log. This information 985 appears in the documentation and can contain details. 986 displayName: The human-readable name for this log. This information 987 appears on the user interface and should be concise. 988 labels: The set of labels that are available to describe a specific log 989 entry. Runtime requests that contain labels not specified here are 990 considered invalid. 991 name: The name of the log. It must be less than 512 characters long and 992 can include the following characters: upper- and lower-case alphanumeric 993 characters [A-Za-z0-9], and punctuation characters including slash, 994 underscore, hyphen, period [/_-.]. 995 """ 996 997 description = _messages.StringField(1) 998 displayName = _messages.StringField(2) 999 labels = _messages.MessageField('LabelDescriptor', 3, repeated=True) 1000 name = _messages.StringField(4) 1001 1002 1003class Logging(_messages.Message): 1004 r"""Logging configuration of the service. The following example shows how 1005 to configure logs to be sent to the producer and consumer projects. In the 1006 example, the `activity_history` log is sent to both the producer and 1007 consumer projects, whereas the `purchase_history` log is only sent to the 1008 producer project. monitored_resources: - type: 1009 library.googleapis.com/branch labels: - key: /city 1010 description: The city where the library branch is located in. - key: 1011 /name description: The name of the branch. logs: - name: 1012 activity_history labels: - key: /customer_id - name: 1013 purchase_history logging: producer_destinations: - 1014 monitored_resource: library.googleapis.com/branch logs: - 1015 activity_history - purchase_history consumer_destinations: 1016 - monitored_resource: library.googleapis.com/branch logs: - 1017 activity_history 1018 1019 Fields: 1020 consumerDestinations: Logging configurations for sending logs to the 1021 consumer project. There can be multiple consumer destinations, each one 1022 must have a different monitored resource type. A log can be used in at 1023 most one consumer destination. 1024 producerDestinations: Logging configurations for sending logs to the 1025 producer project. There can be multiple producer destinations, each one 1026 must have a different monitored resource type. A log can be used in at 1027 most one producer destination. 1028 """ 1029 1030 consumerDestinations = _messages.MessageField('LoggingDestination', 1, repeated=True) 1031 producerDestinations = _messages.MessageField('LoggingDestination', 2, repeated=True) 1032 1033 1034class LoggingDestination(_messages.Message): 1035 r"""Configuration of a specific logging destination (the producer project or 1036 the consumer project). 1037 1038 Fields: 1039 logs: Names of the logs to be sent to this destination. Each name must be 1040 defined in the Service.logs section. If the log name is not a domain 1041 scoped name, it will be automatically prefixed with the service name 1042 followed by "/". 1043 monitoredResource: The monitored resource type. The type must be defined 1044 in the Service.monitored_resources section. 1045 """ 1046 1047 logs = _messages.StringField(1, repeated=True) 1048 monitoredResource = _messages.StringField(2) 1049 1050 1051class Method(_messages.Message): 1052 r"""Method represents a method of an API interface. 1053 1054 Enums: 1055 SyntaxValueValuesEnum: The source syntax of this method. 1056 1057 Fields: 1058 name: The simple name of this method. 1059 options: Any metadata attached to the method. 1060 requestStreaming: If true, the request is streamed. 1061 requestTypeUrl: A URL of the input message type. 1062 responseStreaming: If true, the response is streamed. 1063 responseTypeUrl: The URL of the output message type. 1064 syntax: The source syntax of this method. 1065 """ 1066 1067 class SyntaxValueValuesEnum(_messages.Enum): 1068 r"""The source syntax of this method. 1069 1070 Values: 1071 SYNTAX_PROTO2: Syntax `proto2`. 1072 SYNTAX_PROTO3: Syntax `proto3`. 1073 """ 1074 SYNTAX_PROTO2 = 0 1075 SYNTAX_PROTO3 = 1 1076 1077 name = _messages.StringField(1) 1078 options = _messages.MessageField('Option', 2, repeated=True) 1079 requestStreaming = _messages.BooleanField(3) 1080 requestTypeUrl = _messages.StringField(4) 1081 responseStreaming = _messages.BooleanField(5) 1082 responseTypeUrl = _messages.StringField(6) 1083 syntax = _messages.EnumField('SyntaxValueValuesEnum', 7) 1084 1085 1086class MetricDescriptor(_messages.Message): 1087 r"""Defines a metric type and its schema. Once a metric descriptor is 1088 created, deleting or altering it stops data collection and makes the metric 1089 type's existing data unusable. The following are specific rules for service 1090 defined Monitoring metric descriptors: * `type`, `metric_kind`, 1091 `value_type`, `description`, `display_name`, `launch_stage` fields are all 1092 required. The `unit` field must be specified if the `value_type` is any of 1093 DOUBLE, INT64, DISTRIBUTION. * Maximum of default 500 metric descriptors per 1094 service is allowed. * Maximum of default 10 labels per metric descriptor is 1095 allowed. The default maximum limit can be overridden. Please follow 1096 https://cloud.google.com/monitoring/quotas 1097 1098 Enums: 1099 LaunchStageValueValuesEnum: Optional. The launch stage of the metric 1100 definition. 1101 MetricKindValueValuesEnum: Whether the metric records instantaneous 1102 values, changes to a value, etc. Some combinations of `metric_kind` and 1103 `value_type` might not be supported. 1104 ValueTypeValueValuesEnum: Whether the measurement is an integer, a 1105 floating-point number, etc. Some combinations of `metric_kind` and 1106 `value_type` might not be supported. 1107 1108 Fields: 1109 description: A detailed description of the metric, which can be used in 1110 documentation. 1111 displayName: A concise name for the metric, which can be displayed in user 1112 interfaces. Use sentence case without an ending period, for example 1113 "Request count". This field is optional but it is recommended to be set 1114 for any metrics associated with user-visible concepts, such as Quota. 1115 labels: The set of labels that can be used to describe a specific instance 1116 of this metric type. The label key name must follow: * Only upper and 1117 lower-case letters, digits and underscores (_) are allowed. * Label 1118 name must start with a letter or digit. * The maximum length of a label 1119 name is 100 characters. For example, the 1120 `appengine.googleapis.com/http/server/response_latencies` metric type 1121 has a label for the HTTP response code, `response_code`, so you can look 1122 at latencies for successful responses or just for responses that failed. 1123 launchStage: Optional. The launch stage of the metric definition. 1124 metadata: Optional. Metadata which can be used to guide usage of the 1125 metric. 1126 metricKind: Whether the metric records instantaneous values, changes to a 1127 value, etc. Some combinations of `metric_kind` and `value_type` might 1128 not be supported. 1129 monitoredResourceTypes: Read-only. If present, then a time series, which 1130 is identified partially by a metric type and a 1131 MonitoredResourceDescriptor, that is associated with this metric type 1132 can only be associated with one of the monitored resource types listed 1133 here. 1134 name: The resource name of the metric descriptor. 1135 type: The metric type, including its DNS name prefix. The type is not URL- 1136 encoded. All service defined metrics must be prefixed with the service 1137 name, in the format of `{service name}/{relative metric name}`, such as 1138 `cloudsql.googleapis.com/database/cpu/utilization`. The relative metric 1139 name must follow: * Only upper and lower-case letters, digits, '/' and 1140 underscores '_' are allowed. * The maximum number of characters 1141 allowed for the relative_metric_name is 100. All user-defined metric 1142 types have the DNS name `custom.googleapis.com`, 1143 `external.googleapis.com`, or `logging.googleapis.com/user/`. Metric 1144 types should use a natural hierarchical grouping. For example: 1145 "custom.googleapis.com/invoice/paid/amount" 1146 "external.googleapis.com/prometheus/up" 1147 "appengine.googleapis.com/http/server/response_latencies" 1148 unit: The units in which the metric value is reported. It is only 1149 applicable if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. 1150 The `unit` defines the representation of the stored metric values. 1151 Different systems may scale the values to be more easily displayed (so a 1152 value of `0.02KBy` _might_ be displayed as `20By`, and a value of 1153 `3523KBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is 1154 `KBy`, then the value of the metric is always in thousands of bytes, no 1155 matter how it may be displayed.. If you want a custom metric to record 1156 the exact number of CPU-seconds used by a job, you can create an `INT64 1157 CUMULATIVE` metric whose `unit` is `s{CPU}` (or equivalently `1s{CPU}` 1158 or just `s`). If the job uses 12,005 CPU-seconds, then the value is 1159 written as `12005`. Alternatively, if you want a custom metric to 1160 record data in a more granular way, you can create a `DOUBLE CUMULATIVE` 1161 metric whose `unit` is `ks{CPU}`, and then write the value `12.005` 1162 (which is `12005/1000`), or use `Kis{CPU}` and write `11.723` (which is 1163 `12005/1024`). The supported units are a subset of [The Unified Code 1164 for Units of Measure](http://unitsofmeasure.org/ucum.html) standard: 1165 **Basic units (UNIT)** * `bit` bit * `By` byte * `s` second * 1166 `min` minute * `h` hour * `d` day **Prefixes (PREFIX)** * 1167 `k` kilo (10^3) * `M` mega (10^6) * `G` giga (10^9) 1168 * `T` tera (10^12) * `P` peta (10^15) * `E` exa 1169 (10^18) * `Z` zetta (10^21) * `Y` yotta (10^24) * `m` 1170 milli (10^-3) * `u` micro (10^-6) * `n` nano (10^-9) * 1171 `p` pico (10^-12) * `f` femto (10^-15) * `a` atto 1172 (10^-18) * `z` zepto (10^-21) * `y` yocto (10^-24) * `Ki` 1173 kibi (2^10) * `Mi` mebi (2^20) * `Gi` gibi (2^30) * `Ti` 1174 tebi (2^40) * `Pi` pebi (2^50) **Grammar** The grammar also 1175 includes these connectors: * `/` division or ratio (as an infix 1176 operator). For examples, `kBy/{email}` or `MiBy/10ms` (although 1177 you should almost never have `/s` in a metric `unit`; rates 1178 should always be computed at query time from the underlying 1179 cumulative or delta value). * `.` multiplication or composition (as 1180 an infix operator). For examples, `GBy.d` or `k{watt}.h`. The 1181 grammar for a unit is as follows: Expression = Component { "." 1182 Component } { "/" Component } ; Component = ( [ PREFIX ] UNIT | "%" 1183 ) [ Annotation ] | Annotation | "1" 1184 ; Annotation = "{" NAME "}" ; Notes: * `Annotation` is just a 1185 comment if it follows a `UNIT`. If the annotation is used alone, then 1186 the unit is equivalent to `1`. For examples, `{request}/s == 1/s`, 1187 `By{transmitted}/s == By/s`. * `NAME` is a sequence of non-blank 1188 printable ASCII characters not containing `{` or `}`. * `1` 1189 represents a unitary [dimensionless 1190 unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such 1191 as in `1/s`. It is typically used when none of the basic units are 1192 appropriate. For example, "new users per day" can be represented as 1193 `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new 1194 users). Alternatively, "thousands of page views per day" would be 1195 represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric 1196 value of `5.3` would mean "5300 page views per day"). * `%` represents 1197 dimensionless value of 1/100, and annotates values giving a 1198 percentage (so the metric values are typically in the range of 0..100, 1199 and a metric value `3` means "3 percent"). * `10^2.%` indicates a metric 1200 contains a ratio, typically in the range 0..1, that will be 1201 multiplied by 100 and displayed as a percentage (so a metric value 1202 `0.03` means "3 percent"). 1203 valueType: Whether the measurement is an integer, a floating-point number, 1204 etc. Some combinations of `metric_kind` and `value_type` might not be 1205 supported. 1206 """ 1207 1208 class LaunchStageValueValuesEnum(_messages.Enum): 1209 r"""Optional. The launch stage of the metric definition. 1210 1211 Values: 1212 LAUNCH_STAGE_UNSPECIFIED: Do not use this default value. 1213 UNIMPLEMENTED: The feature is not yet implemented. Users can not use it. 1214 PRELAUNCH: Prelaunch features are hidden from users and are only visible 1215 internally. 1216 EARLY_ACCESS: Early Access features are limited to a closed group of 1217 testers. To use these features, you must sign up in advance and sign a 1218 Trusted Tester agreement (which includes confidentiality provisions). 1219 These features may be unstable, changed in backward-incompatible ways, 1220 and are not guaranteed to be released. 1221 ALPHA: Alpha is a limited availability test for releases before they are 1222 cleared for widespread use. By Alpha, all significant design issues 1223 are resolved and we are in the process of verifying functionality. 1224 Alpha customers need to apply for access, agree to applicable terms, 1225 and have their projects whitelisted. Alpha releases don't have to be 1226 feature complete, no SLAs are provided, and there are no technical 1227 support obligations, but they will be far enough along that customers 1228 can actually use them in test environments or for limited-use tests -- 1229 just like they would in normal production cases. 1230 BETA: Beta is the point at which we are ready to open a release for any 1231 customer to use. There are no SLA or technical support obligations in 1232 a Beta release. Products will be complete from a feature perspective, 1233 but may have some open outstanding issues. Beta releases are suitable 1234 for limited production use cases. 1235 GA: GA features are open to all developers and are considered stable and 1236 fully qualified for production use. 1237 DEPRECATED: Deprecated features are scheduled to be shut down and 1238 removed. For more information, see the "Deprecation Policy" section of 1239 our [Terms of Service](https://cloud.google.com/terms/) and the 1240 [Google Cloud Platform Subject to the Deprecation 1241 Policy](https://cloud.google.com/terms/deprecation) documentation. 1242 """ 1243 LAUNCH_STAGE_UNSPECIFIED = 0 1244 UNIMPLEMENTED = 1 1245 PRELAUNCH = 2 1246 EARLY_ACCESS = 3 1247 ALPHA = 4 1248 BETA = 5 1249 GA = 6 1250 DEPRECATED = 7 1251 1252 class MetricKindValueValuesEnum(_messages.Enum): 1253 r"""Whether the metric records instantaneous values, changes to a value, 1254 etc. Some combinations of `metric_kind` and `value_type` might not be 1255 supported. 1256 1257 Values: 1258 METRIC_KIND_UNSPECIFIED: Do not use this default value. 1259 GAUGE: An instantaneous measurement of a value. 1260 DELTA: The change in a value during a time interval. 1261 CUMULATIVE: A value accumulated over a time interval. Cumulative 1262 measurements in a time series should have the same start time and 1263 increasing end times, until an event resets the cumulative value to 1264 zero and sets a new start time for the following points. 1265 """ 1266 METRIC_KIND_UNSPECIFIED = 0 1267 GAUGE = 1 1268 DELTA = 2 1269 CUMULATIVE = 3 1270 1271 class ValueTypeValueValuesEnum(_messages.Enum): 1272 r"""Whether the measurement is an integer, a floating-point number, etc. 1273 Some combinations of `metric_kind` and `value_type` might not be 1274 supported. 1275 1276 Values: 1277 VALUE_TYPE_UNSPECIFIED: Do not use this default value. 1278 BOOL: The value is a boolean. This value type can be used only if the 1279 metric kind is `GAUGE`. 1280 INT64: The value is a signed 64-bit integer. 1281 DOUBLE: The value is a double precision floating point number. 1282 STRING: The value is a text string. This value type can be used only if 1283 the metric kind is `GAUGE`. 1284 DISTRIBUTION: The value is a `Distribution`. 1285 MONEY: The value is money. 1286 """ 1287 VALUE_TYPE_UNSPECIFIED = 0 1288 BOOL = 1 1289 INT64 = 2 1290 DOUBLE = 3 1291 STRING = 4 1292 DISTRIBUTION = 5 1293 MONEY = 6 1294 1295 description = _messages.StringField(1) 1296 displayName = _messages.StringField(2) 1297 labels = _messages.MessageField('LabelDescriptor', 3, repeated=True) 1298 launchStage = _messages.EnumField('LaunchStageValueValuesEnum', 4) 1299 metadata = _messages.MessageField('MetricDescriptorMetadata', 5) 1300 metricKind = _messages.EnumField('MetricKindValueValuesEnum', 6) 1301 monitoredResourceTypes = _messages.StringField(7, repeated=True) 1302 name = _messages.StringField(8) 1303 type = _messages.StringField(9) 1304 unit = _messages.StringField(10) 1305 valueType = _messages.EnumField('ValueTypeValueValuesEnum', 11) 1306 1307 1308class MetricDescriptorMetadata(_messages.Message): 1309 r"""Additional annotations that can be used to guide the usage of a metric. 1310 1311 Enums: 1312 LaunchStageValueValuesEnum: Deprecated. Must use the 1313 MetricDescriptor.launch_stage instead. 1314 1315 Fields: 1316 ingestDelay: The delay of data points caused by ingestion. Data points 1317 older than this age are guaranteed to be ingested and available to be 1318 read, excluding data loss due to errors. 1319 launchStage: Deprecated. Must use the MetricDescriptor.launch_stage 1320 instead. 1321 samplePeriod: The sampling period of metric data points. For metrics which 1322 are written periodically, consecutive data points are stored at this 1323 time interval, excluding data loss due to errors. Metrics with a higher 1324 granularity have a smaller sampling period. 1325 """ 1326 1327 class LaunchStageValueValuesEnum(_messages.Enum): 1328 r"""Deprecated. Must use the MetricDescriptor.launch_stage instead. 1329 1330 Values: 1331 LAUNCH_STAGE_UNSPECIFIED: Do not use this default value. 1332 UNIMPLEMENTED: The feature is not yet implemented. Users can not use it. 1333 PRELAUNCH: Prelaunch features are hidden from users and are only visible 1334 internally. 1335 EARLY_ACCESS: Early Access features are limited to a closed group of 1336 testers. To use these features, you must sign up in advance and sign a 1337 Trusted Tester agreement (which includes confidentiality provisions). 1338 These features may be unstable, changed in backward-incompatible ways, 1339 and are not guaranteed to be released. 1340 ALPHA: Alpha is a limited availability test for releases before they are 1341 cleared for widespread use. By Alpha, all significant design issues 1342 are resolved and we are in the process of verifying functionality. 1343 Alpha customers need to apply for access, agree to applicable terms, 1344 and have their projects whitelisted. Alpha releases don't have to be 1345 feature complete, no SLAs are provided, and there are no technical 1346 support obligations, but they will be far enough along that customers 1347 can actually use them in test environments or for limited-use tests -- 1348 just like they would in normal production cases. 1349 BETA: Beta is the point at which we are ready to open a release for any 1350 customer to use. There are no SLA or technical support obligations in 1351 a Beta release. Products will be complete from a feature perspective, 1352 but may have some open outstanding issues. Beta releases are suitable 1353 for limited production use cases. 1354 GA: GA features are open to all developers and are considered stable and 1355 fully qualified for production use. 1356 DEPRECATED: Deprecated features are scheduled to be shut down and 1357 removed. For more information, see the "Deprecation Policy" section of 1358 our [Terms of Service](https://cloud.google.com/terms/) and the 1359 [Google Cloud Platform Subject to the Deprecation 1360 Policy](https://cloud.google.com/terms/deprecation) documentation. 1361 """ 1362 LAUNCH_STAGE_UNSPECIFIED = 0 1363 UNIMPLEMENTED = 1 1364 PRELAUNCH = 2 1365 EARLY_ACCESS = 3 1366 ALPHA = 4 1367 BETA = 5 1368 GA = 6 1369 DEPRECATED = 7 1370 1371 ingestDelay = _messages.StringField(1) 1372 launchStage = _messages.EnumField('LaunchStageValueValuesEnum', 2) 1373 samplePeriod = _messages.StringField(3) 1374 1375 1376class MetricRule(_messages.Message): 1377 r"""Bind API methods to metrics. Binding a method to a metric causes that 1378 metric's configured quota behaviors to apply to the method call. 1379 1380 Messages: 1381 MetricCostsValue: Metrics to update when the selected methods are called, 1382 and the associated cost applied to each metric. The key of the map is 1383 the metric name, and the values are the amount increased for the metric 1384 against which the quota limits are defined. The value must not be 1385 negative. 1386 1387 Fields: 1388 metricCosts: Metrics to update when the selected methods are called, and 1389 the associated cost applied to each metric. The key of the map is the 1390 metric name, and the values are the amount increased for the metric 1391 against which the quota limits are defined. The value must not be 1392 negative. 1393 selector: Selects the methods to which this rule applies. Refer to 1394 selector for syntax details. 1395 """ 1396 1397 @encoding.MapUnrecognizedFields('additionalProperties') 1398 class MetricCostsValue(_messages.Message): 1399 r"""Metrics to update when the selected methods are called, and the 1400 associated cost applied to each metric. The key of the map is the metric 1401 name, and the values are the amount increased for the metric against which 1402 the quota limits are defined. The value must not be negative. 1403 1404 Messages: 1405 AdditionalProperty: An additional property for a MetricCostsValue 1406 object. 1407 1408 Fields: 1409 additionalProperties: Additional properties of type MetricCostsValue 1410 """ 1411 1412 class AdditionalProperty(_messages.Message): 1413 r"""An additional property for a MetricCostsValue object. 1414 1415 Fields: 1416 key: Name of the additional property. 1417 value: A string attribute. 1418 """ 1419 1420 key = _messages.StringField(1) 1421 value = _messages.IntegerField(2) 1422 1423 additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True) 1424 1425 metricCosts = _messages.MessageField('MetricCostsValue', 1) 1426 selector = _messages.StringField(2) 1427 1428 1429class Mixin(_messages.Message): 1430 r"""Declares an API Interface to be included in this interface. The 1431 including interface must redeclare all the methods from the included 1432 interface, but documentation and options are inherited as follows: - If 1433 after comment and whitespace stripping, the documentation string of the 1434 redeclared method is empty, it will be inherited from the original method. 1435 - Each annotation belonging to the service config (http, visibility) which 1436 is not set in the redeclared method will be inherited. - If an http 1437 annotation is inherited, the path pattern will be modified as follows. Any 1438 version prefix will be replaced by the version of the including interface 1439 plus the root path if specified. Example of a simple mixin: package 1440 google.acl.v1; service AccessControl { // Get the underlying ACL 1441 object. rpc GetAcl(GetAclRequest) returns (Acl) { option 1442 (google.api.http).get = "/v1/{resource=**}:getAcl"; } } 1443 package google.storage.v2; service Storage { // rpc 1444 GetAcl(GetAclRequest) returns (Acl); // Get a data record. rpc 1445 GetData(GetDataRequest) returns (Data) { option 1446 (google.api.http).get = "/v2/{resource=**}"; } } Example of a 1447 mixin configuration: apis: - name: google.storage.v2.Storage 1448 mixins: - name: google.acl.v1.AccessControl The mixin construct 1449 implies that all methods in `AccessControl` are also declared with same name 1450 and request/response types in `Storage`. A documentation generator or 1451 annotation processor will see the effective `Storage.GetAcl` method after 1452 inherting documentation and annotations as follows: service Storage { 1453 // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns 1454 (Acl) { option (google.api.http).get = "/v2/{resource=**}:getAcl"; 1455 } ... } Note how the version in the path pattern changed from 1456 `v1` to `v2`. If the `root` field in the mixin is specified, it should be a 1457 relative path under which inherited HTTP paths are placed. Example: 1458 apis: - name: google.storage.v2.Storage mixins: - name: 1459 google.acl.v1.AccessControl root: acls This implies the following 1460 inherited HTTP annotation: service Storage { // Get the 1461 underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { 1462 option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; } 1463 ... } 1464 1465 Fields: 1466 name: The fully qualified name of the interface which is included. 1467 root: If non-empty specifies a path under which inherited HTTP paths are 1468 rooted. 1469 """ 1470 1471 name = _messages.StringField(1) 1472 root = _messages.StringField(2) 1473 1474 1475class MonitoredResourceDescriptor(_messages.Message): 1476 r"""An object that describes the schema of a MonitoredResource object using 1477 a type name and a set of labels. For example, the monitored resource 1478 descriptor for Google Compute Engine VM instances has a type of 1479 `"gce_instance"` and specifies the use of the labels `"instance_id"` and 1480 `"zone"` to identify particular VM instances. Different services can 1481 support different monitored resource types. The following are specific 1482 rules to service defined monitored resources for Monitoring and Logging: * 1483 The `type`, `display_name`, `description`, `labels` and `launch_stage` 1484 fields are all required. * The first label of the monitored resource 1485 descriptor must be `resource_container`. There are legacy monitored 1486 resource descritptors start with `project_id`. * It must include a 1487 `location` label. * Maximum of default 5 service defined monitored resource 1488 descriptors is allowed per service. * Maximum of default 10 labels per 1489 monitored resource is allowed. The default maximum limit can be overridden. 1490 Please follow https://cloud.google.com/monitoring/quotas 1491 1492 Enums: 1493 LaunchStageValueValuesEnum: Optional. The launch stage of the monitored 1494 resource definition. 1495 1496 Fields: 1497 description: Optional. A detailed description of the monitored resource 1498 type that might be used in documentation. 1499 displayName: Optional. A concise name for the monitored resource type that 1500 might be displayed in user interfaces. It should be a Title Cased Noun 1501 Phrase, without any article or other determiners. For example, `"Google 1502 Cloud SQL Database"`. 1503 labels: Required. A set of labels used to describe instances of this 1504 monitored resource type. The label key name must follow: * Only upper 1505 and lower-case letters, digits and underscores (_) are allowed. * 1506 Label name must start with a letter or digit. * The maximum length of a 1507 label name is 100 characters. For example, an individual Google Cloud 1508 SQL database is identified by values for the labels `database_id` and 1509 `location`. 1510 launchStage: Optional. The launch stage of the monitored resource 1511 definition. 1512 name: Optional. The resource name of the monitored resource descriptor: 1513 `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where 1514 {type} is the value of the `type` field in this object and {project_id} 1515 is a project ID that provides API-specific context for accessing the 1516 type. APIs that do not use project information can use the resource 1517 name format `"monitoredResourceDescriptors/{type}"`. 1518 type: Note there are legacy service monitored resources not following this 1519 rule. 1520 """ 1521 1522 class LaunchStageValueValuesEnum(_messages.Enum): 1523 r"""Optional. The launch stage of the monitored resource definition. 1524 1525 Values: 1526 LAUNCH_STAGE_UNSPECIFIED: Do not use this default value. 1527 UNIMPLEMENTED: The feature is not yet implemented. Users can not use it. 1528 PRELAUNCH: Prelaunch features are hidden from users and are only visible 1529 internally. 1530 EARLY_ACCESS: Early Access features are limited to a closed group of 1531 testers. To use these features, you must sign up in advance and sign a 1532 Trusted Tester agreement (which includes confidentiality provisions). 1533 These features may be unstable, changed in backward-incompatible ways, 1534 and are not guaranteed to be released. 1535 ALPHA: Alpha is a limited availability test for releases before they are 1536 cleared for widespread use. By Alpha, all significant design issues 1537 are resolved and we are in the process of verifying functionality. 1538 Alpha customers need to apply for access, agree to applicable terms, 1539 and have their projects whitelisted. Alpha releases don't have to be 1540 feature complete, no SLAs are provided, and there are no technical 1541 support obligations, but they will be far enough along that customers 1542 can actually use them in test environments or for limited-use tests -- 1543 just like they would in normal production cases. 1544 BETA: Beta is the point at which we are ready to open a release for any 1545 customer to use. There are no SLA or technical support obligations in 1546 a Beta release. Products will be complete from a feature perspective, 1547 but may have some open outstanding issues. Beta releases are suitable 1548 for limited production use cases. 1549 GA: GA features are open to all developers and are considered stable and 1550 fully qualified for production use. 1551 DEPRECATED: Deprecated features are scheduled to be shut down and 1552 removed. For more information, see the "Deprecation Policy" section of 1553 our [Terms of Service](https://cloud.google.com/terms/) and the 1554 [Google Cloud Platform Subject to the Deprecation 1555 Policy](https://cloud.google.com/terms/deprecation) documentation. 1556 """ 1557 LAUNCH_STAGE_UNSPECIFIED = 0 1558 UNIMPLEMENTED = 1 1559 PRELAUNCH = 2 1560 EARLY_ACCESS = 3 1561 ALPHA = 4 1562 BETA = 5 1563 GA = 6 1564 DEPRECATED = 7 1565 1566 description = _messages.StringField(1) 1567 displayName = _messages.StringField(2) 1568 labels = _messages.MessageField('LabelDescriptor', 3, repeated=True) 1569 launchStage = _messages.EnumField('LaunchStageValueValuesEnum', 4) 1570 name = _messages.StringField(5) 1571 type = _messages.StringField(6) 1572 1573 1574class Monitoring(_messages.Message): 1575 r"""Monitoring configuration of the service. The example below shows how to 1576 configure monitored resources and metrics for monitoring. In the example, a 1577 monitored resource and two metrics are defined. The 1578 `library.googleapis.com/book/returned_count` metric is sent to both producer 1579 and consumer projects, whereas the 1580 `library.googleapis.com/book/overdue_count` metric is only sent to the 1581 consumer project. monitored_resources: - type: 1582 library.googleapis.com/branch labels: - key: /city 1583 description: The city where the library branch is located in. - key: 1584 /name description: The name of the branch. metrics: - name: 1585 library.googleapis.com/book/returned_count metric_kind: DELTA 1586 value_type: INT64 labels: - key: /customer_id - name: 1587 library.googleapis.com/book/overdue_count metric_kind: GAUGE 1588 value_type: INT64 labels: - key: /customer_id monitoring: 1589 producer_destinations: - monitored_resource: 1590 library.googleapis.com/branch metrics: - 1591 library.googleapis.com/book/returned_count consumer_destinations: 1592 - monitored_resource: library.googleapis.com/branch metrics: 1593 - library.googleapis.com/book/returned_count - 1594 library.googleapis.com/book/overdue_count 1595 1596 Fields: 1597 consumerDestinations: Monitoring configurations for sending metrics to the 1598 consumer project. There can be multiple consumer destinations. A 1599 monitored resouce type may appear in multiple monitoring destinations if 1600 different aggregations are needed for different sets of metrics 1601 associated with that monitored resource type. A monitored resource and 1602 metric pair may only be used once in the Monitoring configuration. 1603 producerDestinations: Monitoring configurations for sending metrics to the 1604 producer project. There can be multiple producer destinations. A 1605 monitored resouce type may appear in multiple monitoring destinations if 1606 different aggregations are needed for different sets of metrics 1607 associated with that monitored resource type. A monitored resource and 1608 metric pair may only be used once in the Monitoring configuration. 1609 """ 1610 1611 consumerDestinations = _messages.MessageField('MonitoringDestination', 1, repeated=True) 1612 producerDestinations = _messages.MessageField('MonitoringDestination', 2, repeated=True) 1613 1614 1615class MonitoringDestination(_messages.Message): 1616 r"""Configuration of a specific monitoring destination (the producer project 1617 or the consumer project). 1618 1619 Fields: 1620 metrics: Types of the metrics to report to this monitoring destination. 1621 Each type must be defined in Service.metrics section. 1622 monitoredResource: The monitored resource type. The type must be defined 1623 in Service.monitored_resources section. 1624 """ 1625 1626 metrics = _messages.StringField(1, repeated=True) 1627 monitoredResource = _messages.StringField(2) 1628 1629 1630class OAuthRequirements(_messages.Message): 1631 r"""OAuth scopes are a way to define data and permissions on data. For 1632 example, there are scopes defined for "Read-only access to Google Calendar" 1633 and "Access to Cloud Platform". Users can consent to a scope for an 1634 application, giving it permission to access that data on their behalf. 1635 OAuth scope specifications should be fairly coarse grained; a user will need 1636 to see and understand the text description of what your scope means. In 1637 most cases: use one or at most two OAuth scopes for an entire family of 1638 products. If your product has multiple APIs, you should probably be sharing 1639 the OAuth scope across all of those APIs. When you need finer grained OAuth 1640 consent screens: talk with your product management about how developers will 1641 use them in practice. Please note that even though each of the canonical 1642 scopes is enough for a request to be accepted and passed to the backend, a 1643 request can still fail due to the backend requiring additional scopes or 1644 permissions. 1645 1646 Fields: 1647 canonicalScopes: The list of publicly documented OAuth scopes that are 1648 allowed access. An OAuth token containing any of these scopes will be 1649 accepted. Example: canonical_scopes: 1650 https://www.googleapis.com/auth/calendar, 1651 https://www.googleapis.com/auth/calendar.read 1652 """ 1653 1654 canonicalScopes = _messages.StringField(1) 1655 1656 1657class Operation(_messages.Message): 1658 r"""This resource represents a long-running operation that is the result of 1659 a network API call. 1660 1661 Messages: 1662 MetadataValue: Service-specific metadata associated with the operation. 1663 It typically contains progress information and common metadata such as 1664 create time. Some services might not provide such metadata. Any method 1665 that returns a long-running operation should document the metadata type, 1666 if any. 1667 ResponseValue: The normal response of the operation in case of success. 1668 If the original method returns no data on success, such as `Delete`, the 1669 response is `google.protobuf.Empty`. If the original method is standard 1670 `Get`/`Create`/`Update`, the response should be the resource. For other 1671 methods, the response should have the type `XxxResponse`, where `Xxx` is 1672 the original method name. For example, if the original method name is 1673 `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. 1674 1675 Fields: 1676 done: If the value is `false`, it means the operation is still in 1677 progress. If `true`, the operation is completed, and either `error` or 1678 `response` is available. 1679 error: The error result of the operation in case of failure or 1680 cancellation. 1681 metadata: Service-specific metadata associated with the operation. It 1682 typically contains progress information and common metadata such as 1683 create time. Some services might not provide such metadata. Any method 1684 that returns a long-running operation should document the metadata type, 1685 if any. 1686 name: The server-assigned name, which is only unique within the same 1687 service that originally returns it. If you use the default HTTP mapping, 1688 the `name` should be a resource name ending with 1689 `operations/{unique_id}`. 1690 response: The normal response of the operation in case of success. If the 1691 original method returns no data on success, such as `Delete`, the 1692 response is `google.protobuf.Empty`. If the original method is standard 1693 `Get`/`Create`/`Update`, the response should be the resource. For other 1694 methods, the response should have the type `XxxResponse`, where `Xxx` is 1695 the original method name. For example, if the original method name is 1696 `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. 1697 """ 1698 1699 @encoding.MapUnrecognizedFields('additionalProperties') 1700 class MetadataValue(_messages.Message): 1701 r"""Service-specific metadata associated with the operation. It typically 1702 contains progress information and common metadata such as create time. 1703 Some services might not provide such metadata. Any method that returns a 1704 long-running operation should document the metadata type, if any. 1705 1706 Messages: 1707 AdditionalProperty: An additional property for a MetadataValue object. 1708 1709 Fields: 1710 additionalProperties: Properties of the object. Contains field @type 1711 with type URL. 1712 """ 1713 1714 class AdditionalProperty(_messages.Message): 1715 r"""An additional property for a MetadataValue object. 1716 1717 Fields: 1718 key: Name of the additional property. 1719 value: A extra_types.JsonValue attribute. 1720 """ 1721 1722 key = _messages.StringField(1) 1723 value = _messages.MessageField('extra_types.JsonValue', 2) 1724 1725 additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True) 1726 1727 @encoding.MapUnrecognizedFields('additionalProperties') 1728 class ResponseValue(_messages.Message): 1729 r"""The normal response of the operation in case of success. If the 1730 original method returns no data on success, such as `Delete`, the response 1731 is `google.protobuf.Empty`. If the original method is standard 1732 `Get`/`Create`/`Update`, the response should be the resource. For other 1733 methods, the response should have the type `XxxResponse`, where `Xxx` is 1734 the original method name. For example, if the original method name is 1735 `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. 1736 1737 Messages: 1738 AdditionalProperty: An additional property for a ResponseValue object. 1739 1740 Fields: 1741 additionalProperties: Properties of the object. Contains field @type 1742 with type URL. 1743 """ 1744 1745 class AdditionalProperty(_messages.Message): 1746 r"""An additional property for a ResponseValue object. 1747 1748 Fields: 1749 key: Name of the additional property. 1750 value: A extra_types.JsonValue attribute. 1751 """ 1752 1753 key = _messages.StringField(1) 1754 value = _messages.MessageField('extra_types.JsonValue', 2) 1755 1756 additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True) 1757 1758 done = _messages.BooleanField(1) 1759 error = _messages.MessageField('Status', 2) 1760 metadata = _messages.MessageField('MetadataValue', 3) 1761 name = _messages.StringField(4) 1762 response = _messages.MessageField('ResponseValue', 5) 1763 1764 1765class Option(_messages.Message): 1766 r"""A protocol buffer option, which can be attached to a message, field, 1767 enumeration, etc. 1768 1769 Messages: 1770 ValueValue: The option's value packed in an Any message. If the value is a 1771 primitive, the corresponding wrapper type defined in 1772 google/protobuf/wrappers.proto should be used. If the value is an enum, 1773 it should be stored as an int32 value using the 1774 google.protobuf.Int32Value type. 1775 1776 Fields: 1777 name: The option's name. For protobuf built-in options (options defined in 1778 descriptor.proto), this is the short name. For example, `"map_entry"`. 1779 For custom options, it should be the fully-qualified name. For example, 1780 `"google.api.http"`. 1781 value: The option's value packed in an Any message. If the value is a 1782 primitive, the corresponding wrapper type defined in 1783 google/protobuf/wrappers.proto should be used. If the value is an enum, 1784 it should be stored as an int32 value using the 1785 google.protobuf.Int32Value type. 1786 """ 1787 1788 @encoding.MapUnrecognizedFields('additionalProperties') 1789 class ValueValue(_messages.Message): 1790 r"""The option's value packed in an Any message. If the value is a 1791 primitive, the corresponding wrapper type defined in 1792 google/protobuf/wrappers.proto should be used. If the value is an enum, it 1793 should be stored as an int32 value using the google.protobuf.Int32Value 1794 type. 1795 1796 Messages: 1797 AdditionalProperty: An additional property for a ValueValue object. 1798 1799 Fields: 1800 additionalProperties: Properties of the object. Contains field @type 1801 with type URL. 1802 """ 1803 1804 class AdditionalProperty(_messages.Message): 1805 r"""An additional property for a ValueValue object. 1806 1807 Fields: 1808 key: Name of the additional property. 1809 value: A extra_types.JsonValue attribute. 1810 """ 1811 1812 key = _messages.StringField(1) 1813 value = _messages.MessageField('extra_types.JsonValue', 2) 1814 1815 additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True) 1816 1817 name = _messages.StringField(1) 1818 value = _messages.MessageField('ValueValue', 2) 1819 1820 1821class Page(_messages.Message): 1822 r"""Represents a documentation page. A page can contain subpages to 1823 represent nested documentation set structure. 1824 1825 Fields: 1826 content: The Markdown content of the page. You can use <code>(== 1827 include {path} ==)</code> to include content from a Markdown file. 1828 name: The name of the page. It will be used as an identity of the page to 1829 generate URI of the page, text of the link to this page in navigation, 1830 etc. The full page name (start from the root page name to this page 1831 concatenated with `.`) can be used as reference to the page in your 1832 documentation. For example: <pre><code>pages: - name: Tutorial 1833 content: (== include tutorial.md ==) subpages: - name: Java 1834 content: (== include tutorial_java.md ==) </code></pre> You can 1835 reference `Java` page using Markdown reference link syntax: `Java`. 1836 subpages: Subpages of this page. The order of subpages specified here will 1837 be honored in the generated docset. 1838 """ 1839 1840 content = _messages.StringField(1) 1841 name = _messages.StringField(2) 1842 subpages = _messages.MessageField('Page', 3, repeated=True) 1843 1844 1845class Quota(_messages.Message): 1846 r"""Quota configuration helps to achieve fairness and budgeting in service 1847 usage. The metric based quota configuration works this way: - The service 1848 configuration defines a set of metrics. - For API calls, the 1849 quota.metric_rules maps methods to metrics with corresponding costs. - The 1850 quota.limits defines limits on the metrics, which will be used for quota 1851 checks at runtime. An example quota configuration in yaml format: 1852 quota: limits: - name: apiWriteQpsPerProject metric: 1853 library.googleapis.com/write_calls unit: "1/min/{project}" # rate 1854 limit for consumer projects values: STANDARD: 10000 # 1855 The metric rules bind all methods to the read_calls metric, # except 1856 for the UpdateBook and DeleteBook methods. These two methods # are 1857 mapped to the write_calls metric, with the UpdateBook method # 1858 consuming at twice rate as the DeleteBook method. metric_rules: - 1859 selector: "*" metric_costs: 1860 library.googleapis.com/read_calls: 1 - selector: 1861 google.example.library.v1.LibraryService.UpdateBook metric_costs: 1862 library.googleapis.com/write_calls: 2 - selector: 1863 google.example.library.v1.LibraryService.DeleteBook metric_costs: 1864 library.googleapis.com/write_calls: 1 Corresponding Metric definition: 1865 metrics: - name: library.googleapis.com/read_calls display_name: 1866 Read requests metric_kind: DELTA value_type: INT64 - 1867 name: library.googleapis.com/write_calls display_name: Write requests 1868 metric_kind: DELTA value_type: INT64 1869 1870 Fields: 1871 limits: List of `QuotaLimit` definitions for the service. 1872 metricRules: List of `MetricRule` definitions, each one mapping a selected 1873 method to one or more metrics. 1874 """ 1875 1876 limits = _messages.MessageField('QuotaLimit', 1, repeated=True) 1877 metricRules = _messages.MessageField('MetricRule', 2, repeated=True) 1878 1879 1880class QuotaLimit(_messages.Message): 1881 r"""`QuotaLimit` defines a specific limit that applies over a specified 1882 duration for a limit type. There can be at most one limit for a duration and 1883 limit type combination defined within a `QuotaGroup`. 1884 1885 Messages: 1886 ValuesValue: Tiered limit values. You must specify this as a key:value 1887 pair, with an integer value that is the maximum number of requests 1888 allowed for the specified unit. Currently only STANDARD is supported. 1889 1890 Fields: 1891 defaultLimit: Default number of tokens that can be consumed during the 1892 specified duration. This is the number of tokens assigned when a client 1893 application developer activates the service for his/her project. 1894 Specifying a value of 0 will block all requests. This can be used if you 1895 are provisioning quota to selected consumers and blocking others. 1896 Similarly, a value of -1 will indicate an unlimited quota. No other 1897 negative values are allowed. Used by group-based quotas only. 1898 description: Optional. User-visible, extended description for this quota 1899 limit. Should be used only when more context is needed to understand 1900 this limit than provided by the limit's display name (see: 1901 `display_name`). 1902 displayName: User-visible display name for this limit. Optional. If not 1903 set, the UI will provide a default display name based on the quota 1904 configuration. This field can be used to override the default display 1905 name generated from the configuration. 1906 duration: Duration of this limit in textual notation. Must be "100s" or 1907 "1d". Used by group-based quotas only. 1908 freeTier: Free tier value displayed in the Developers Console for this 1909 limit. The free tier is the number of tokens that will be subtracted 1910 from the billed amount when billing is enabled. This field can only be 1911 set on a limit with duration "1d", in a billable group; it is invalid on 1912 any other limit. If this field is not set, it defaults to 0, indicating 1913 that there is no free tier for this service. Used by group-based quotas 1914 only. 1915 maxLimit: Maximum number of tokens that can be consumed during the 1916 specified duration. Client application developers can override the 1917 default limit up to this maximum. If specified, this value cannot be set 1918 to a value less than the default limit. If not specified, it is set to 1919 the default limit. To allow clients to apply overrides with no upper 1920 bound, set this to -1, indicating unlimited maximum quota. Used by 1921 group-based quotas only. 1922 metric: The name of the metric this quota limit applies to. The quota 1923 limits with the same metric will be checked together during runtime. The 1924 metric must be defined within the service config. 1925 name: Name of the quota limit. The name must be provided, and it must be 1926 unique within the service. The name can only include alphanumeric 1927 characters as well as '-'. The maximum length of the limit name is 64 1928 characters. 1929 unit: Specify the unit of the quota limit. It uses the same syntax as 1930 Metric.unit. The supported unit kinds are determined by the quota 1931 backend system. Here are some examples: * "1/min/{project}" for quota 1932 per minute per project. Note: the order of unit components is 1933 insignificant. The "1" at the beginning is required to follow the metric 1934 unit syntax. 1935 values: Tiered limit values. You must specify this as a key:value pair, 1936 with an integer value that is the maximum number of requests allowed for 1937 the specified unit. Currently only STANDARD is supported. 1938 """ 1939 1940 @encoding.MapUnrecognizedFields('additionalProperties') 1941 class ValuesValue(_messages.Message): 1942 r"""Tiered limit values. You must specify this as a key:value pair, with 1943 an integer value that is the maximum number of requests allowed for the 1944 specified unit. Currently only STANDARD is supported. 1945 1946 Messages: 1947 AdditionalProperty: An additional property for a ValuesValue object. 1948 1949 Fields: 1950 additionalProperties: Additional properties of type ValuesValue 1951 """ 1952 1953 class AdditionalProperty(_messages.Message): 1954 r"""An additional property for a ValuesValue object. 1955 1956 Fields: 1957 key: Name of the additional property. 1958 value: A string attribute. 1959 """ 1960 1961 key = _messages.StringField(1) 1962 value = _messages.IntegerField(2) 1963 1964 additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True) 1965 1966 defaultLimit = _messages.IntegerField(1) 1967 description = _messages.StringField(2) 1968 displayName = _messages.StringField(3) 1969 duration = _messages.StringField(4) 1970 freeTier = _messages.IntegerField(5) 1971 maxLimit = _messages.IntegerField(6) 1972 metric = _messages.StringField(7) 1973 name = _messages.StringField(8) 1974 unit = _messages.StringField(9) 1975 values = _messages.MessageField('ValuesValue', 10) 1976 1977 1978class Service(_messages.Message): 1979 r"""`Service` is the root object of Google service configuration schema. It 1980 describes basic information about a service, such as the name and the title, 1981 and delegates other aspects to sub-sections. Each sub-section is either a 1982 proto message or a repeated proto message that configures a specific aspect, 1983 such as auth. See each proto message definition for details. Example: 1984 type: google.api.Service config_version: 3 name: 1985 calendar.googleapis.com title: Google Calendar API apis: - name: 1986 google.calendar.v3.Calendar authentication: providers: - id: 1987 google_calendar_auth jwks_uri: 1988 https://www.googleapis.com/oauth2/v1/certs issuer: 1989 https://securetoken.google.com rules: - selector: "*" 1990 requirements: provider_id: google_calendar_auth 1991 1992 Fields: 1993 apis: A list of API interfaces exported by this service. Only the `name` 1994 field of the google.protobuf.Api needs to be provided by the 1995 configuration author, as the remaining fields will be derived from the 1996 IDL during the normalization process. It is an error to specify an API 1997 interface here which cannot be resolved against the associated IDL 1998 files. 1999 authentication: Auth configuration. 2000 backend: API backend configuration. 2001 billing: Billing configuration. 2002 configVersion: The semantic version of the service configuration. The 2003 config version affects the interpretation of the service configuration. 2004 For example, certain features are enabled by default for certain config 2005 versions. The latest config version is `3`. 2006 context: Context configuration. 2007 control: Configuration for the service control plane. 2008 customError: Custom error configuration. 2009 documentation: Additional API documentation. 2010 endpoints: Configuration for network endpoints. If this is empty, then an 2011 endpoint with the same name as the service is automatically generated to 2012 service all defined APIs. 2013 enums: A list of all enum types included in this API service. Enums 2014 referenced directly or indirectly by the `apis` are automatically 2015 included. Enums which are not referenced but shall be included should 2016 be listed here by name. Example: enums: - name: 2017 google.someapi.v1.SomeEnum 2018 http: HTTP configuration. 2019 id: A unique ID for a specific instance of this message, typically 2020 assigned by the client for tracking purpose. Must be no longer than 63 2021 characters and only lower case letters, digits, '.', '_' and '-' are 2022 allowed. If empty, the server may choose to generate one instead. 2023 logging: Logging configuration. 2024 logs: Defines the logs used by this service. 2025 metrics: Defines the metrics used by this service. 2026 monitoredResources: Defines the monitored resources used by this service. 2027 This is required by the Service.monitoring and Service.logging 2028 configurations. 2029 monitoring: Monitoring configuration. 2030 name: The service name, which is a DNS-like logical identifier for the 2031 service, such as `calendar.googleapis.com`. The service name typically 2032 goes through DNS verification to make sure the owner of the service also 2033 owns the DNS name. 2034 producerProjectId: The Google project that owns this service. 2035 quota: Quota configuration. 2036 sourceInfo: Output only. The source information for this configuration if 2037 available. 2038 systemParameters: System parameter configuration. 2039 systemTypes: A list of all proto message types included in this API 2040 service. It serves similar purpose as [google.api.Service.types], except 2041 that these types are not needed by user-defined APIs. Therefore, they 2042 will not show up in the generated discovery doc. This field should only 2043 be used to define system APIs in ESF. 2044 title: The product title for this service. 2045 types: A list of all proto message types included in this API service. 2046 Types referenced directly or indirectly by the `apis` are automatically 2047 included. Messages which are not referenced but shall be included, such 2048 as types used by the `google.protobuf.Any` type, should be listed here 2049 by name. Example: types: - name: google.protobuf.Int32 2050 usage: Configuration controlling usage of this service. 2051 """ 2052 2053 apis = _messages.MessageField('Api', 1, repeated=True) 2054 authentication = _messages.MessageField('Authentication', 2) 2055 backend = _messages.MessageField('Backend', 3) 2056 billing = _messages.MessageField('Billing', 4) 2057 configVersion = _messages.IntegerField(5, variant=_messages.Variant.UINT32) 2058 context = _messages.MessageField('Context', 6) 2059 control = _messages.MessageField('Control', 7) 2060 customError = _messages.MessageField('CustomError', 8) 2061 documentation = _messages.MessageField('Documentation', 9) 2062 endpoints = _messages.MessageField('Endpoint', 10, repeated=True) 2063 enums = _messages.MessageField('Enum', 11, repeated=True) 2064 http = _messages.MessageField('Http', 12) 2065 id = _messages.StringField(13) 2066 logging = _messages.MessageField('Logging', 14) 2067 logs = _messages.MessageField('LogDescriptor', 15, repeated=True) 2068 metrics = _messages.MessageField('MetricDescriptor', 16, repeated=True) 2069 monitoredResources = _messages.MessageField('MonitoredResourceDescriptor', 17, repeated=True) 2070 monitoring = _messages.MessageField('Monitoring', 18) 2071 name = _messages.StringField(19) 2072 producerProjectId = _messages.StringField(20) 2073 quota = _messages.MessageField('Quota', 21) 2074 sourceInfo = _messages.MessageField('SourceInfo', 22) 2075 systemParameters = _messages.MessageField('SystemParameters', 23) 2076 systemTypes = _messages.MessageField('Type', 24, repeated=True) 2077 title = _messages.StringField(25) 2078 types = _messages.MessageField('Type', 26, repeated=True) 2079 usage = _messages.MessageField('Usage', 27) 2080 2081 2082class ServiceIdentity(_messages.Message): 2083 r"""The per-product per-project service identity for a service. Use this 2084 field to configure per-product per-project service identity. Example of a 2085 service identity configuration. usage: service_identity: - 2086 service_account_parent: "projects/123456789" display_name: "Cloud 2087 XXX Service Agent" description: "Used as the identity of Cloud XXX 2088 to access resources" 2089 2090 Fields: 2091 description: Optional. A user-specified opaque description of the service 2092 account. Must be less than or equal to 256 UTF-8 bytes. 2093 displayName: Optional. A user-specified name for the service account. Must 2094 be less than or equal to 100 UTF-8 bytes. 2095 serviceAccountParent: A service account project that hosts the service 2096 accounts. An example name would be: `projects/123456789` 2097 """ 2098 2099 description = _messages.StringField(1) 2100 displayName = _messages.StringField(2) 2101 serviceAccountParent = _messages.StringField(3) 2102 2103 2104class ServiceconsumermanagementOperationsGetRequest(_messages.Message): 2105 r"""A ServiceconsumermanagementOperationsGetRequest object. 2106 2107 Fields: 2108 name: The name of the operation resource. 2109 """ 2110 2111 name = _messages.StringField(1, required=True) 2112 2113 2114class ServiceconsumermanagementServicesConsumerQuotaMetricsGetRequest(_messages.Message): 2115 r"""A ServiceconsumermanagementServicesConsumerQuotaMetricsGetRequest 2116 object. 2117 2118 Enums: 2119 ViewValueValuesEnum: Specifies the level of detail for quota information 2120 in the response. 2121 2122 Fields: 2123 name: The resource name of the quota metric, returned by a 2124 ListConsumerQuotaMetrics call. An example name would be: `services/comp 2125 ute.googleapis.com/projects/123/consumerQuotaMetrics/compute.googleapis. 2126 com%2Fcpus` 2127 view: Specifies the level of detail for quota information in the response. 2128 """ 2129 2130 class ViewValueValuesEnum(_messages.Enum): 2131 r"""Specifies the level of detail for quota information in the response. 2132 2133 Values: 2134 QUOTA_VIEW_UNSPECIFIED: <no description> 2135 BASIC: <no description> 2136 FULL: <no description> 2137 """ 2138 QUOTA_VIEW_UNSPECIFIED = 0 2139 BASIC = 1 2140 FULL = 2 2141 2142 name = _messages.StringField(1, required=True) 2143 view = _messages.EnumField('ViewValueValuesEnum', 2) 2144 2145 2146class ServiceconsumermanagementServicesConsumerQuotaMetricsImportProducerOverridesRequest(_messages.Message): 2147 r"""A ServiceconsumermanagementServicesConsumerQuotaMetricsImportProducerOve 2148 rridesRequest object. 2149 2150 Fields: 2151 parent: The resource name of the consumer. An example name would be: 2152 `services/compute.googleapis.com/projects/123` 2153 v1Beta1ImportProducerOverridesRequest: A 2154 V1Beta1ImportProducerOverridesRequest resource to be passed as the 2155 request body. 2156 """ 2157 2158 parent = _messages.StringField(1, required=True) 2159 v1Beta1ImportProducerOverridesRequest = _messages.MessageField('V1Beta1ImportProducerOverridesRequest', 2) 2160 2161 2162class ServiceconsumermanagementServicesConsumerQuotaMetricsLimitsGetRequest(_messages.Message): 2163 r"""A ServiceconsumermanagementServicesConsumerQuotaMetricsLimitsGetRequest 2164 object. 2165 2166 Enums: 2167 ViewValueValuesEnum: Specifies the level of detail for quota information 2168 in the response. 2169 2170 Fields: 2171 name: The resource name of the quota limit, returned by a 2172 ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. An example 2173 name would be: `services/compute.googleapis.com/projects/123/consumerQuo 2174 taMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion` 2175 view: Specifies the level of detail for quota information in the response. 2176 """ 2177 2178 class ViewValueValuesEnum(_messages.Enum): 2179 r"""Specifies the level of detail for quota information in the response. 2180 2181 Values: 2182 QUOTA_VIEW_UNSPECIFIED: <no description> 2183 BASIC: <no description> 2184 FULL: <no description> 2185 """ 2186 QUOTA_VIEW_UNSPECIFIED = 0 2187 BASIC = 1 2188 FULL = 2 2189 2190 name = _messages.StringField(1, required=True) 2191 view = _messages.EnumField('ViewValueValuesEnum', 2) 2192 2193 2194class ServiceconsumermanagementServicesConsumerQuotaMetricsLimitsProducerOverridesCreateRequest(_messages.Message): 2195 r"""A ServiceconsumermanagementServicesConsumerQuotaMetricsLimitsProducerOve 2196 rridesCreateRequest object. 2197 2198 Fields: 2199 force: Whether to force the creation of the quota override. If creating an 2200 override would cause the effective quota for the consumer to decrease by 2201 more than 10 percent, the call is rejected, as a safety measure to avoid 2202 accidentally decreasing quota too quickly. Setting the force parameter 2203 to true ignores this restriction. 2204 parent: The resource name of the parent quota limit, returned by a 2205 ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. An example 2206 name would be: `services/compute.googleapis.com/projects/123/consumerQuo 2207 taMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion` 2208 v1Beta1QuotaOverride: A V1Beta1QuotaOverride resource to be passed as the 2209 request body. 2210 """ 2211 2212 force = _messages.BooleanField(1) 2213 parent = _messages.StringField(2, required=True) 2214 v1Beta1QuotaOverride = _messages.MessageField('V1Beta1QuotaOverride', 3) 2215 2216 2217class ServiceconsumermanagementServicesConsumerQuotaMetricsLimitsProducerOverridesDeleteRequest(_messages.Message): 2218 r"""A ServiceconsumermanagementServicesConsumerQuotaMetricsLimitsProducerOve 2219 rridesDeleteRequest object. 2220 2221 Fields: 2222 force: Whether to force the deletion of the quota override. If deleting an 2223 override would cause the effective quota for the consumer to decrease by 2224 more than 10 percent, the call is rejected, as a safety measure to avoid 2225 accidentally decreasing quota too quickly. Setting the force parameter 2226 to true ignores this restriction. 2227 name: The resource name of the override to delete. An example name would 2228 be: `services/compute.googleapis.com/projects/123/consumerQuotaMetrics/c 2229 ompute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerOverride 2230 s/4a3f2c1d` 2231 """ 2232 2233 force = _messages.BooleanField(1) 2234 name = _messages.StringField(2, required=True) 2235 2236 2237class ServiceconsumermanagementServicesConsumerQuotaMetricsLimitsProducerOverridesListRequest(_messages.Message): 2238 r"""A ServiceconsumermanagementServicesConsumerQuotaMetricsLimitsProducerOve 2239 rridesListRequest object. 2240 2241 Fields: 2242 pageSize: Requested size of the next page of data. 2243 pageToken: Token identifying which result to start with; returned by a 2244 previous list call. 2245 parent: The resource name of the parent quota limit, returned by a 2246 ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. An example 2247 name would be: `services/compute.googleapis.com/projects/123/consumerQuo 2248 taMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion` 2249 """ 2250 2251 pageSize = _messages.IntegerField(1, variant=_messages.Variant.INT32) 2252 pageToken = _messages.StringField(2) 2253 parent = _messages.StringField(3, required=True) 2254 2255 2256class ServiceconsumermanagementServicesConsumerQuotaMetricsLimitsProducerOverridesPatchRequest(_messages.Message): 2257 r"""A ServiceconsumermanagementServicesConsumerQuotaMetricsLimitsProducerOve 2258 rridesPatchRequest object. 2259 2260 Fields: 2261 force: Whether to force the update of the quota override. If updating an 2262 override would cause the effective quota for the consumer to decrease by 2263 more than 10 percent, the call is rejected, as a safety measure to avoid 2264 accidentally decreasing quota too quickly. Setting the force parameter 2265 to true ignores this restriction. 2266 name: The resource name of the override to update. An example name would 2267 be: `services/compute.googleapis.com/projects/123/consumerQuotaMetrics/c 2268 ompute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerOverride 2269 s/4a3f2c1d` 2270 updateMask: Update only the specified fields. If unset, all modifiable 2271 fields will be updated. 2272 v1Beta1QuotaOverride: A V1Beta1QuotaOverride resource to be passed as the 2273 request body. 2274 """ 2275 2276 force = _messages.BooleanField(1) 2277 name = _messages.StringField(2, required=True) 2278 updateMask = _messages.StringField(3) 2279 v1Beta1QuotaOverride = _messages.MessageField('V1Beta1QuotaOverride', 4) 2280 2281 2282class ServiceconsumermanagementServicesConsumerQuotaMetricsListRequest(_messages.Message): 2283 r"""A ServiceconsumermanagementServicesConsumerQuotaMetricsListRequest 2284 object. 2285 2286 Enums: 2287 ViewValueValuesEnum: Specifies the level of detail for quota information 2288 in the response. 2289 2290 Fields: 2291 pageSize: Requested size of the next page of data. 2292 pageToken: Token identifying which result to start with; returned by a 2293 previous list call. 2294 parent: Parent of the quotas resource. An example parent would be: 2295 `services/serviceconsumermanagement.googleapis.com/projects/123` 2296 view: Specifies the level of detail for quota information in the response. 2297 """ 2298 2299 class ViewValueValuesEnum(_messages.Enum): 2300 r"""Specifies the level of detail for quota information in the response. 2301 2302 Values: 2303 QUOTA_VIEW_UNSPECIFIED: <no description> 2304 BASIC: <no description> 2305 FULL: <no description> 2306 """ 2307 QUOTA_VIEW_UNSPECIFIED = 0 2308 BASIC = 1 2309 FULL = 2 2310 2311 pageSize = _messages.IntegerField(1, variant=_messages.Variant.INT32) 2312 pageToken = _messages.StringField(2) 2313 parent = _messages.StringField(3, required=True) 2314 view = _messages.EnumField('ViewValueValuesEnum', 4) 2315 2316 2317class SourceContext(_messages.Message): 2318 r"""`SourceContext` represents information about the source of a protobuf 2319 element, like the file in which it is defined. 2320 2321 Fields: 2322 fileName: The path-qualified name of the .proto file that contained the 2323 associated protobuf element. For example: 2324 `"google/protobuf/source_context.proto"`. 2325 """ 2326 2327 fileName = _messages.StringField(1) 2328 2329 2330class SourceInfo(_messages.Message): 2331 r"""Source information used to create a Service Config 2332 2333 Messages: 2334 SourceFilesValueListEntry: A SourceFilesValueListEntry object. 2335 2336 Fields: 2337 sourceFiles: All files used during config generation. 2338 """ 2339 2340 @encoding.MapUnrecognizedFields('additionalProperties') 2341 class SourceFilesValueListEntry(_messages.Message): 2342 r"""A SourceFilesValueListEntry object. 2343 2344 Messages: 2345 AdditionalProperty: An additional property for a 2346 SourceFilesValueListEntry object. 2347 2348 Fields: 2349 additionalProperties: Properties of the object. Contains field @type 2350 with type URL. 2351 """ 2352 2353 class AdditionalProperty(_messages.Message): 2354 r"""An additional property for a SourceFilesValueListEntry object. 2355 2356 Fields: 2357 key: Name of the additional property. 2358 value: A extra_types.JsonValue attribute. 2359 """ 2360 2361 key = _messages.StringField(1) 2362 value = _messages.MessageField('extra_types.JsonValue', 2) 2363 2364 additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True) 2365 2366 sourceFiles = _messages.MessageField('SourceFilesValueListEntry', 1, repeated=True) 2367 2368 2369class StandardQueryParameters(_messages.Message): 2370 r"""Query parameters accepted by all methods. 2371 2372 Enums: 2373 FXgafvValueValuesEnum: V1 error format. 2374 AltValueValuesEnum: Data format for response. 2375 2376 Fields: 2377 f__xgafv: V1 error format. 2378 access_token: OAuth access token. 2379 alt: Data format for response. 2380 callback: JSONP 2381 fields: Selector specifying which fields to include in a partial response. 2382 key: API key. Your API key identifies your project and provides you with 2383 API access, quota, and reports. Required unless you provide an OAuth 2.0 2384 token. 2385 oauth_token: OAuth 2.0 token for the current user. 2386 prettyPrint: Returns response with indentations and line breaks. 2387 quotaUser: Available to use for quota purposes for server-side 2388 applications. Can be any arbitrary string assigned to a user, but should 2389 not exceed 40 characters. 2390 trace: A tracing token of the form "token:<tokenid>" to include in api 2391 requests. 2392 uploadType: Legacy upload protocol for media (e.g. "media", "multipart"). 2393 upload_protocol: Upload protocol for media (e.g. "raw", "multipart"). 2394 """ 2395 2396 class AltValueValuesEnum(_messages.Enum): 2397 r"""Data format for response. 2398 2399 Values: 2400 json: Responses with Content-Type of application/json 2401 media: Media download with context-dependent Content-Type 2402 proto: Responses with Content-Type of application/x-protobuf 2403 """ 2404 json = 0 2405 media = 1 2406 proto = 2 2407 2408 class FXgafvValueValuesEnum(_messages.Enum): 2409 r"""V1 error format. 2410 2411 Values: 2412 _1: v1 error format 2413 _2: v2 error format 2414 """ 2415 _1 = 0 2416 _2 = 1 2417 2418 f__xgafv = _messages.EnumField('FXgafvValueValuesEnum', 1) 2419 access_token = _messages.StringField(2) 2420 alt = _messages.EnumField('AltValueValuesEnum', 3, default='json') 2421 callback = _messages.StringField(4) 2422 fields = _messages.StringField(5) 2423 key = _messages.StringField(6) 2424 oauth_token = _messages.StringField(7) 2425 prettyPrint = _messages.BooleanField(8, default=True) 2426 quotaUser = _messages.StringField(9) 2427 trace = _messages.StringField(10) 2428 uploadType = _messages.StringField(11) 2429 upload_protocol = _messages.StringField(12) 2430 2431 2432class Status(_messages.Message): 2433 r"""The `Status` type defines a logical error model that is suitable for 2434 different programming environments, including REST APIs and RPC APIs. It is 2435 used by [gRPC](https://github.com/grpc). Each `Status` message contains 2436 three pieces of data: error code, error message, and error details. You can 2437 find out more about this error model and how to work with it in the [API 2438 Design Guide](https://cloud.google.com/apis/design/errors). 2439 2440 Messages: 2441 DetailsValueListEntry: A DetailsValueListEntry object. 2442 2443 Fields: 2444 code: The status code, which should be an enum value of google.rpc.Code. 2445 details: A list of messages that carry the error details. There is a 2446 common set of message types for APIs to use. 2447 message: A developer-facing error message, which should be in English. Any 2448 user-facing error message should be localized and sent in the 2449 google.rpc.Status.details field, or localized by the client. 2450 """ 2451 2452 @encoding.MapUnrecognizedFields('additionalProperties') 2453 class DetailsValueListEntry(_messages.Message): 2454 r"""A DetailsValueListEntry object. 2455 2456 Messages: 2457 AdditionalProperty: An additional property for a DetailsValueListEntry 2458 object. 2459 2460 Fields: 2461 additionalProperties: Properties of the object. Contains field @type 2462 with type URL. 2463 """ 2464 2465 class AdditionalProperty(_messages.Message): 2466 r"""An additional property for a DetailsValueListEntry object. 2467 2468 Fields: 2469 key: Name of the additional property. 2470 value: A extra_types.JsonValue attribute. 2471 """ 2472 2473 key = _messages.StringField(1) 2474 value = _messages.MessageField('extra_types.JsonValue', 2) 2475 2476 additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True) 2477 2478 code = _messages.IntegerField(1, variant=_messages.Variant.INT32) 2479 details = _messages.MessageField('DetailsValueListEntry', 2, repeated=True) 2480 message = _messages.StringField(3) 2481 2482 2483class SystemParameter(_messages.Message): 2484 r"""Define a parameter's name and location. The parameter may be passed as 2485 either an HTTP header or a URL query parameter, and if both are passed the 2486 behavior is implementation-dependent. 2487 2488 Fields: 2489 httpHeader: Define the HTTP header name to use for the parameter. It is 2490 case insensitive. 2491 name: Define the name of the parameter, such as "api_key" . It is case 2492 sensitive. 2493 urlQueryParameter: Define the URL query parameter name to use for the 2494 parameter. It is case sensitive. 2495 """ 2496 2497 httpHeader = _messages.StringField(1) 2498 name = _messages.StringField(2) 2499 urlQueryParameter = _messages.StringField(3) 2500 2501 2502class SystemParameterRule(_messages.Message): 2503 r"""Define a system parameter rule mapping system parameter definitions to 2504 methods. 2505 2506 Fields: 2507 parameters: Define parameters. Multiple names may be defined for a 2508 parameter. For a given method call, only one of them should be used. If 2509 multiple names are used the behavior is implementation-dependent. If 2510 none of the specified names are present the behavior is parameter- 2511 dependent. 2512 selector: Selects the methods to which this rule applies. Use '*' to 2513 indicate all methods in all APIs. Refer to selector for syntax details. 2514 """ 2515 2516 parameters = _messages.MessageField('SystemParameter', 1, repeated=True) 2517 selector = _messages.StringField(2) 2518 2519 2520class SystemParameters(_messages.Message): 2521 r"""### System parameter configuration A system parameter is a special kind 2522 of parameter defined by the API system, not by an individual API. It is 2523 typically mapped to an HTTP header and/or a URL query parameter. This 2524 configuration specifies which methods change the names of the system 2525 parameters. 2526 2527 Fields: 2528 rules: Define system parameters. The parameters defined here will 2529 override the default parameters implemented by the system. If this field 2530 is missing from the service config, default system parameters will be 2531 used. Default system parameters and names is implementation-dependent. 2532 Example: define api key for all methods system_parameters 2533 rules: - selector: "*" parameters: - name: 2534 api_key url_query_parameter: api_key Example: define 2 2535 api key names for a specific method. system_parameters rules: 2536 - selector: "/ListShelves" parameters: - name: 2537 api_key http_header: Api-Key1 - name: api_key 2538 http_header: Api-Key2 **NOTE:** All service configuration rules follow 2539 "last one wins" order. 2540 """ 2541 2542 rules = _messages.MessageField('SystemParameterRule', 1, repeated=True) 2543 2544 2545class Type(_messages.Message): 2546 r"""A protocol buffer message type. 2547 2548 Enums: 2549 SyntaxValueValuesEnum: The source syntax. 2550 2551 Fields: 2552 fields: The list of fields. 2553 name: The fully qualified message name. 2554 oneofs: The list of types appearing in `oneof` definitions in this type. 2555 options: The protocol buffer options. 2556 sourceContext: The source context. 2557 syntax: The source syntax. 2558 """ 2559 2560 class SyntaxValueValuesEnum(_messages.Enum): 2561 r"""The source syntax. 2562 2563 Values: 2564 SYNTAX_PROTO2: Syntax `proto2`. 2565 SYNTAX_PROTO3: Syntax `proto3`. 2566 """ 2567 SYNTAX_PROTO2 = 0 2568 SYNTAX_PROTO3 = 1 2569 2570 fields = _messages.MessageField('Field', 1, repeated=True) 2571 name = _messages.StringField(2) 2572 oneofs = _messages.StringField(3, repeated=True) 2573 options = _messages.MessageField('Option', 4, repeated=True) 2574 sourceContext = _messages.MessageField('SourceContext', 5) 2575 syntax = _messages.EnumField('SyntaxValueValuesEnum', 6) 2576 2577 2578class Usage(_messages.Message): 2579 r"""Configuration controlling usage of a service. 2580 2581 Fields: 2582 producerNotificationChannel: The full resource name of a channel used for 2583 sending notifications to the service producer. Google Service 2584 Management currently only supports [Google Cloud 2585 Pub/Sub](https://cloud.google.com/pubsub) as a notification channel. To 2586 use Google Cloud Pub/Sub as the channel, this must be the name of a 2587 Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format 2588 documented in https://cloud.google.com/pubsub/docs/overview. 2589 requirements: Requirements that must be satisfied before a consumer 2590 project can use the service. Each requirement is of the form 2591 <service.name>/<requirement-id>; for example 2592 'serviceusage.googleapis.com/billing-enabled'. 2593 rules: A list of usage rules that apply to individual API methods. 2594 **NOTE:** All service configuration rules follow "last one wins" order. 2595 serviceIdentity: The configuration of a per-product per-project service 2596 identity. 2597 """ 2598 2599 producerNotificationChannel = _messages.StringField(1) 2600 requirements = _messages.StringField(2, repeated=True) 2601 rules = _messages.MessageField('UsageRule', 3, repeated=True) 2602 serviceIdentity = _messages.MessageField('ServiceIdentity', 4) 2603 2604 2605class UsageRule(_messages.Message): 2606 r"""Usage configuration rules for the service. NOTE: Under development. 2607 Use this rule to configure unregistered calls for the service. Unregistered 2608 calls are calls that do not contain consumer project identity. (Example: 2609 calls that do not contain an API key). By default, API methods do not allow 2610 unregistered calls, and each method call must be identified by a consumer 2611 project identity. Use this rule to allow/disallow unregistered calls. 2612 Example of an API that wants to allow unregistered calls for entire service. 2613 usage: rules: - selector: "*" allow_unregistered_calls: 2614 true Example of a method that wants to allow unregistered calls. 2615 usage: rules: - selector: 2616 "google.example.library.v1.LibraryService.CreateBook" 2617 allow_unregistered_calls: true 2618 2619 Fields: 2620 allowUnregisteredCalls: If true, the selected method allows unregistered 2621 calls, e.g. calls that don't identify any user or application. 2622 selector: Selects the methods to which this rule applies. Use '*' to 2623 indicate all methods in all APIs. Refer to selector for syntax details. 2624 skipServiceControl: If true, the selected method should skip service 2625 control and the control plane features, such as quota and billing, will 2626 not be available. This flag is used by Google Cloud Endpoints to bypass 2627 checks for internal methods, such as service health check methods. 2628 """ 2629 2630 allowUnregisteredCalls = _messages.BooleanField(1) 2631 selector = _messages.StringField(2) 2632 skipServiceControl = _messages.BooleanField(3) 2633 2634 2635class V1Beta1BatchCreateProducerOverridesResponse(_messages.Message): 2636 r"""Response message for BatchCreateProducerOverrides 2637 2638 Fields: 2639 overrides: The overrides that were created. 2640 """ 2641 2642 overrides = _messages.MessageField('V1Beta1QuotaOverride', 1, repeated=True) 2643 2644 2645class V1Beta1ConsumerQuotaLimit(_messages.Message): 2646 r"""Consumer quota settings for a quota limit. 2647 2648 Fields: 2649 isPrecise: Whether this limit is precise or imprecise. 2650 metric: The name of the parent metric of this limit. An example name 2651 would be: `compute.googleapis.com/cpus` 2652 name: The resource name of the quota limit. An example name would be: `se 2653 rvices/compute.googleapis.com/projects/123/quotas/metrics/compute.google 2654 apis.com%2Fcpus/limits/%2Fproject%2Fregion` The resource name is 2655 intended to be opaque and should not be parsed for its component 2656 strings, since its representation could change in the future. 2657 quotaBuckets: Summary of the enforced quota buckets, organized by quota 2658 dimension, ordered from least specific to most specific (for example, 2659 the global default bucket, with no quota dimensions, will always appear 2660 first). 2661 unit: The limit unit. An example unit would be: `1/{project}/{region}` 2662 Note that `{project}` and `{region}` are not placeholders in this 2663 example; the literal characters `{` and `}` occur in the string. 2664 """ 2665 2666 isPrecise = _messages.BooleanField(1) 2667 metric = _messages.StringField(2) 2668 name = _messages.StringField(3) 2669 quotaBuckets = _messages.MessageField('V1Beta1QuotaBucket', 4, repeated=True) 2670 unit = _messages.StringField(5) 2671 2672 2673class V1Beta1ConsumerQuotaMetric(_messages.Message): 2674 r"""Consumer quota settings for a quota metric. 2675 2676 Fields: 2677 consumerQuotaLimits: The consumer quota for each quota limit defined on 2678 the metric. 2679 displayName: The display name of the metric. An example name would be: 2680 "CPUs" 2681 metric: The name of the metric. An example name would be: 2682 `compute.googleapis.com/cpus` 2683 name: The resource name of the quota settings on this metric for this 2684 consumer. An example name would be: `services/serviceconsumermanagement 2685 .googleapis.com/projects/123/quota/metrics/compute.googleapis.com%2Fcpus 2686 The resource name is intended to be opaque and should not be parsed for 2687 its component strings, since its representation could change in the 2688 future. 2689 unit: The units in which the metric value is reported. 2690 """ 2691 2692 consumerQuotaLimits = _messages.MessageField('V1Beta1ConsumerQuotaLimit', 1, repeated=True) 2693 displayName = _messages.StringField(2) 2694 metric = _messages.StringField(3) 2695 name = _messages.StringField(4) 2696 unit = _messages.StringField(5) 2697 2698 2699class V1Beta1DisableConsumerResponse(_messages.Message): 2700 r"""Response message for the `DisableConsumer` method. This response message 2701 is assigned to the `response` field of the returned Operation when that 2702 operation is done. 2703 """ 2704 2705 2706 2707class V1Beta1EnableConsumerResponse(_messages.Message): 2708 r"""Response message for the `EnableConsumer` method. This response message 2709 is assigned to the `response` field of the returned Operation when that 2710 operation is done. 2711 """ 2712 2713 2714 2715class V1Beta1GenerateServiceIdentityResponse(_messages.Message): 2716 r"""Response message for the `GenerateServiceIdentity` method. This 2717 response message is assigned to the `response` field of the returned 2718 Operation when that operation is done. 2719 2720 Fields: 2721 identity: ServiceIdentity that was created or retrieved. 2722 """ 2723 2724 identity = _messages.MessageField('V1Beta1ServiceIdentity', 1) 2725 2726 2727class V1Beta1ImportProducerOverridesRequest(_messages.Message): 2728 r"""Request message for ImportProducerOverrides 2729 2730 Fields: 2731 force: Whether to force the creation of the quota overrides. If creating 2732 an override would cause the effective quota for the consumer to decrease 2733 by more than 10 percent, the call is rejected, as a safety measure to 2734 avoid accidentally decreasing quota too quickly. Setting the force 2735 parameter to true ignores this restriction. 2736 inlineSource: The import data is specified in the request message itself 2737 """ 2738 2739 force = _messages.BooleanField(1) 2740 inlineSource = _messages.MessageField('V1Beta1OverrideInlineSource', 2) 2741 2742 2743class V1Beta1ImportProducerOverridesResponse(_messages.Message): 2744 r"""Response message for ImportProducerOverrides 2745 2746 Fields: 2747 overrides: The overrides that were created from the imported data. 2748 """ 2749 2750 overrides = _messages.MessageField('V1Beta1QuotaOverride', 1, repeated=True) 2751 2752 2753class V1Beta1ImportProducerQuotaPoliciesResponse(_messages.Message): 2754 r"""Response message for ImportProducerQuotaPolicies 2755 2756 Fields: 2757 policies: The policies that were created from the imported data. 2758 """ 2759 2760 policies = _messages.MessageField('V1Beta1ProducerQuotaPolicy', 1, repeated=True) 2761 2762 2763class V1Beta1ListConsumerQuotaMetricsResponse(_messages.Message): 2764 r"""Response message for ListConsumerQuotaMetrics. 2765 2766 Fields: 2767 metrics: Quota settings for the consumer, organized by quota metric. 2768 nextPageToken: Token identifying which result to start with; returned by a 2769 previous list call. 2770 """ 2771 2772 metrics = _messages.MessageField('V1Beta1ConsumerQuotaMetric', 1, repeated=True) 2773 nextPageToken = _messages.StringField(2) 2774 2775 2776class V1Beta1ListProducerOverridesResponse(_messages.Message): 2777 r"""Response message for ListProducerOverrides. 2778 2779 Fields: 2780 nextPageToken: Token identifying which result to start with; returned by a 2781 previous list call. 2782 overrides: Producer overrides on this limit. 2783 """ 2784 2785 nextPageToken = _messages.StringField(1) 2786 overrides = _messages.MessageField('V1Beta1QuotaOverride', 2, repeated=True) 2787 2788 2789class V1Beta1OverrideInlineSource(_messages.Message): 2790 r"""Import data embedded in the request message 2791 2792 Fields: 2793 overrides: The overrides to create. Each override must have a value for 2794 'metric' and 'unit', to specify which metric and which limit the 2795 override should be applied to. 2796 """ 2797 2798 overrides = _messages.MessageField('V1Beta1QuotaOverride', 1, repeated=True) 2799 2800 2801class V1Beta1ProducerQuotaPolicy(_messages.Message): 2802 r"""Quota policy created by service producer. 2803 2804 Messages: 2805 DimensionsValue: If this map is nonempty, then this policy applies only 2806 to specific values for dimensions defined in the limit unit. For 2807 example, an policy on a limit with the unit 1/{project}/{region} could 2808 contain an entry with the key "region" and the value "us-east-1"; the 2809 policy is only applied to quota consumed in that region. This map has 2810 the following restrictions: * Keys that are not defined in the 2811 limit's unit are not valid keys. Any string appearing in {brackets} 2812 in the unit (besides {project} or {user}) is a defined key. * 2813 "project" is not a valid key; the project is already specified in 2814 the parent resource name. * "user" is not a valid key; the API does 2815 not support quota polcies that apply only to a specific user. * If 2816 "region" appears as a key, its value must be a valid Cloud region. * 2817 If "zone" appears as a key, its value must be a valid Cloud zone. * If 2818 any valid key other than "region" or "zone" appears in the map, then 2819 all valid keys other than "region" or "zone" must also appear in the 2820 map. 2821 2822 Fields: 2823 container: The cloud resource container at which the quota policy is 2824 created. The format is {container_type}/{container_number} 2825 dimensions: If this map is nonempty, then this policy applies only to 2826 specific values for dimensions defined in the limit unit. For example, 2827 an policy on a limit with the unit 1/{project}/{region} could contain an 2828 entry with the key "region" and the value "us-east-1"; the policy is 2829 only applied to quota consumed in that region. This map has the 2830 following restrictions: * Keys that are not defined in the limit's 2831 unit are not valid keys. Any string appearing in {brackets} in the 2832 unit (besides {project} or {user}) is a defined key. * "project" 2833 is not a valid key; the project is already specified in the parent 2834 resource name. * "user" is not a valid key; the API does not support 2835 quota polcies that apply only to a specific user. * If "region" 2836 appears as a key, its value must be a valid Cloud region. * If "zone" 2837 appears as a key, its value must be a valid Cloud zone. * If any valid 2838 key other than "region" or "zone" appears in the map, then all valid 2839 keys other than "region" or "zone" must also appear in the map. 2840 metric: The name of the metric to which this policy applies. An example 2841 name would be: `compute.googleapis.com/cpus` 2842 name: The resource name of the producer policy. An example name would be: 2843 `services/compute.googleapis.com/organizations/123/consumerQuotaMetrics/ 2844 compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerQuotaPo 2845 licies/4a3f2c1d` 2846 policyValue: The quota policy value. Can be any nonnegative integer, or -1 2847 (unlimited quota). 2848 unit: The limit unit of the limit to which this policy applies. An 2849 example unit would be: `1/{project}/{region}` Note that `{project}` and 2850 `{region}` are not placeholders in this example; the literal characters 2851 `{` and `}` occur in the string. 2852 """ 2853 2854 @encoding.MapUnrecognizedFields('additionalProperties') 2855 class DimensionsValue(_messages.Message): 2856 r""" If this map is nonempty, then this policy applies only to specific 2857 values for dimensions defined in the limit unit. For example, an policy 2858 on a limit with the unit 1/{project}/{region} could contain an entry with 2859 the key "region" and the value "us-east-1"; the policy is only applied to 2860 quota consumed in that region. This map has the following restrictions: 2861 * Keys that are not defined in the limit's unit are not valid keys. 2862 Any string appearing in {brackets} in the unit (besides {project} or 2863 {user}) is a defined key. * "project" is not a valid key; the project is 2864 already specified in the parent resource name. * "user" is not a 2865 valid key; the API does not support quota polcies that apply only to a 2866 specific user. * If "region" appears as a key, its value must be a valid 2867 Cloud region. * If "zone" appears as a key, its value must be a valid 2868 Cloud zone. * If any valid key other than "region" or "zone" appears in 2869 the map, then all valid keys other than "region" or "zone" must also 2870 appear in the map. 2871 2872 Messages: 2873 AdditionalProperty: An additional property for a DimensionsValue object. 2874 2875 Fields: 2876 additionalProperties: Additional properties of type DimensionsValue 2877 """ 2878 2879 class AdditionalProperty(_messages.Message): 2880 r"""An additional property for a DimensionsValue object. 2881 2882 Fields: 2883 key: Name of the additional property. 2884 value: A string attribute. 2885 """ 2886 2887 key = _messages.StringField(1) 2888 value = _messages.StringField(2) 2889 2890 additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True) 2891 2892 container = _messages.StringField(1) 2893 dimensions = _messages.MessageField('DimensionsValue', 2) 2894 metric = _messages.StringField(3) 2895 name = _messages.StringField(4) 2896 policyValue = _messages.IntegerField(5) 2897 unit = _messages.StringField(6) 2898 2899 2900class V1Beta1QuotaBucket(_messages.Message): 2901 r"""A quota bucket is a quota provisioning unit for a specific set of 2902 dimensions. 2903 2904 Messages: 2905 DimensionsValue: The dimensions of this quota bucket. If this map is 2906 empty, this is the global bucket, which is the default quota value 2907 applied to all requests that do not have a more specific override. If 2908 this map is nonempty, the default limit, effective limit, and quota 2909 overrides apply only to requests that have the dimensions given in the 2910 map. For example, if the map has key "region" and value "us-east-1", 2911 then the specified effective limit is only effective in that region, and 2912 the specified overrides apply only in that region. 2913 2914 Fields: 2915 adminOverride: Admin override on this quota bucket. 2916 consumerOverride: Consumer override on this quota bucket. 2917 defaultLimit: The default limit of this quota bucket, as specified by the 2918 service configuration. 2919 dimensions: The dimensions of this quota bucket. If this map is empty, 2920 this is the global bucket, which is the default quota value applied to 2921 all requests that do not have a more specific override. If this map is 2922 nonempty, the default limit, effective limit, and quota overrides apply 2923 only to requests that have the dimensions given in the map. For 2924 example, if the map has key "region" and value "us-east-1", then the 2925 specified effective limit is only effective in that region, and the 2926 specified overrides apply only in that region. 2927 effectiveLimit: The effective limit of this quota bucket. Equal to 2928 default_limit if there are no overrides. 2929 producerOverride: Producer override on this quota bucket. 2930 """ 2931 2932 @encoding.MapUnrecognizedFields('additionalProperties') 2933 class DimensionsValue(_messages.Message): 2934 r"""The dimensions of this quota bucket. If this map is empty, this is 2935 the global bucket, which is the default quota value applied to all 2936 requests that do not have a more specific override. If this map is 2937 nonempty, the default limit, effective limit, and quota overrides apply 2938 only to requests that have the dimensions given in the map. For example, 2939 if the map has key "region" and value "us-east-1", then the specified 2940 effective limit is only effective in that region, and the specified 2941 overrides apply only in that region. 2942 2943 Messages: 2944 AdditionalProperty: An additional property for a DimensionsValue object. 2945 2946 Fields: 2947 additionalProperties: Additional properties of type DimensionsValue 2948 """ 2949 2950 class AdditionalProperty(_messages.Message): 2951 r"""An additional property for a DimensionsValue object. 2952 2953 Fields: 2954 key: Name of the additional property. 2955 value: A string attribute. 2956 """ 2957 2958 key = _messages.StringField(1) 2959 value = _messages.StringField(2) 2960 2961 additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True) 2962 2963 adminOverride = _messages.MessageField('V1Beta1QuotaOverride', 1) 2964 consumerOverride = _messages.MessageField('V1Beta1QuotaOverride', 2) 2965 defaultLimit = _messages.IntegerField(3) 2966 dimensions = _messages.MessageField('DimensionsValue', 4) 2967 effectiveLimit = _messages.IntegerField(5) 2968 producerOverride = _messages.MessageField('V1Beta1QuotaOverride', 6) 2969 2970 2971class V1Beta1QuotaOverride(_messages.Message): 2972 r"""A quota override 2973 2974 Messages: 2975 DimensionsValue: If this map is nonempty, then this override applies only 2976 to specific values for dimensions defined in the limit unit. For 2977 example, an override on a limit with the unit 1/{project}/{region} could 2978 contain an entry with the key "region" and the value "us-east-1"; the 2979 override is only applied to quota consumed in that region. This map has 2980 the following restrictions: * Keys that are not defined in the 2981 limit's unit are not valid keys. Any string appearing in {brackets} 2982 in the unit (besides {project} or {user}) is a defined key. * 2983 "project" is not a valid key; the project is already specified in 2984 the parent resource name. * "user" is not a valid key; the API does 2985 not support quota overrides that apply only to a specific user. * 2986 If "region" appears as a key, its value must be a valid Cloud region. * 2987 If "zone" appears as a key, its value must be a valid Cloud zone. * If 2988 any valid key other than "region" or "zone" appears in the map, then 2989 all valid keys other than "region" or "zone" must also appear in the 2990 map. 2991 2992 Fields: 2993 dimensions: If this map is nonempty, then this override applies only to 2994 specific values for dimensions defined in the limit unit. For example, 2995 an override on a limit with the unit 1/{project}/{region} could contain 2996 an entry with the key "region" and the value "us-east-1"; the override 2997 is only applied to quota consumed in that region. This map has the 2998 following restrictions: * Keys that are not defined in the limit's 2999 unit are not valid keys. Any string appearing in {brackets} in the 3000 unit (besides {project} or {user}) is a defined key. * "project" 3001 is not a valid key; the project is already specified in the parent 3002 resource name. * "user" is not a valid key; the API does not support 3003 quota overrides that apply only to a specific user. * If "region" 3004 appears as a key, its value must be a valid Cloud region. * If "zone" 3005 appears as a key, its value must be a valid Cloud zone. * If any valid 3006 key other than "region" or "zone" appears in the map, then all valid 3007 keys other than "region" or "zone" must also appear in the map. 3008 metric: The name of the metric to which this override applies. An example 3009 name would be: `compute.googleapis.com/cpus` 3010 name: The resource name of the producer override. An example name would 3011 be: `services/compute.googleapis.com/projects/123/consumerQuotaMetrics/c 3012 ompute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerOverride 3013 s/4a3f2c1d` 3014 overrideValue: The overriding quota limit value. Can be any nonnegative 3015 integer, or -1 (unlimited quota). 3016 unit: The limit unit of the limit to which this override applies. An 3017 example unit would be: `1/{project}/{region}` Note that `{project}` and 3018 `{region}` are not placeholders in this example; the literal characters 3019 `{` and `}` occur in the string. 3020 """ 3021 3022 @encoding.MapUnrecognizedFields('additionalProperties') 3023 class DimensionsValue(_messages.Message): 3024 r""" If this map is nonempty, then this override applies only to specific 3025 values for dimensions defined in the limit unit. For example, an override 3026 on a limit with the unit 1/{project}/{region} could contain an entry with 3027 the key "region" and the value "us-east-1"; the override is only applied 3028 to quota consumed in that region. This map has the following 3029 restrictions: * Keys that are not defined in the limit's unit are not 3030 valid keys. Any string appearing in {brackets} in the unit (besides 3031 {project} or {user}) is a defined key. * "project" is not a valid 3032 key; the project is already specified in the parent resource name. * 3033 "user" is not a valid key; the API does not support quota overrides 3034 that apply only to a specific user. * If "region" appears as a key, its 3035 value must be a valid Cloud region. * If "zone" appears as a key, its 3036 value must be a valid Cloud zone. * If any valid key other than "region" 3037 or "zone" appears in the map, then all valid keys other than "region" 3038 or "zone" must also appear in the map. 3039 3040 Messages: 3041 AdditionalProperty: An additional property for a DimensionsValue object. 3042 3043 Fields: 3044 additionalProperties: Additional properties of type DimensionsValue 3045 """ 3046 3047 class AdditionalProperty(_messages.Message): 3048 r"""An additional property for a DimensionsValue object. 3049 3050 Fields: 3051 key: Name of the additional property. 3052 value: A string attribute. 3053 """ 3054 3055 key = _messages.StringField(1) 3056 value = _messages.StringField(2) 3057 3058 additionalProperties = _messages.MessageField('AdditionalProperty', 1, repeated=True) 3059 3060 dimensions = _messages.MessageField('DimensionsValue', 1) 3061 metric = _messages.StringField(2) 3062 name = _messages.StringField(3) 3063 overrideValue = _messages.IntegerField(4) 3064 unit = _messages.StringField(5) 3065 3066 3067class V1Beta1RefreshConsumerResponse(_messages.Message): 3068 r"""Response message for the `RefreshConsumer` method. This response message 3069 is assigned to the `response` field of the returned Operation when that 3070 operation is done. 3071 """ 3072 3073 3074 3075class V1Beta1ServiceIdentity(_messages.Message): 3076 r"""A service identity in the Identity and Access Management API. 3077 3078 Fields: 3079 email: The email address of the service identity. 3080 name: P4 service identity resource name. An example name would be: `servi 3081 ces/serviceconsumermanagement.googleapis.com/projects/123/serviceIdentit 3082 ies/default` 3083 tag: The P4 service identity configuration tag. This must be defined in 3084 activation_grants. If not specified when creating the account, the tag 3085 is set to "default". 3086 uniqueId: The unique and stable id of the service identity. 3087 """ 3088 3089 email = _messages.StringField(1) 3090 name = _messages.StringField(2) 3091 tag = _messages.StringField(3) 3092 uniqueId = _messages.StringField(4) 3093 3094 3095class V1beta1AddVisibilityLabelsResponse(_messages.Message): 3096 r"""Response message for the `AddVisibilityLabels` method. This response 3097 message is assigned to the `response` field of the returned Operation when 3098 that operation is done. 3099 3100 Fields: 3101 labels: The updated set of visibility labels for this consumer on this 3102 service. 3103 """ 3104 3105 labels = _messages.StringField(1, repeated=True) 3106 3107 3108class V1beta1DefaultIdentity(_messages.Message): 3109 r"""A default identity in the Identity and Access Management API. 3110 3111 Fields: 3112 email: The email address of the default identity. 3113 name: Default identity resource name. An example name would be: `services 3114 /serviceconsumermanagement.googleapis.com/projects/123/defaultIdentity` 3115 uniqueId: The unique and stable id of the default identity. 3116 """ 3117 3118 email = _messages.StringField(1) 3119 name = _messages.StringField(2) 3120 uniqueId = _messages.StringField(3) 3121 3122 3123class V1beta1DisableConsumerResponse(_messages.Message): 3124 r"""Response message for the `DisableConsumer` method. This response message 3125 is assigned to the `response` field of the returned Operation when that 3126 operation is done. 3127 """ 3128 3129 3130 3131class V1beta1EnableConsumerResponse(_messages.Message): 3132 r"""Response message for the `EnableConsumer` method. This response message 3133 is assigned to the `response` field of the returned Operation when that 3134 operation is done. 3135 """ 3136 3137 3138 3139class V1beta1GenerateDefaultIdentityResponse(_messages.Message): 3140 r"""Response message for the `GenerateDefaultIdentity` method. This 3141 response message is assigned to the `response` field of the returned 3142 Operation when that operation is done. 3143 3144 Enums: 3145 AttachStatusValueValuesEnum: Status of the role attachment. Under 3146 development (go/si-attach-role), currently always return 3147 ATTACH_STATUS_UNSPECIFIED) 3148 3149 Fields: 3150 attachStatus: Status of the role attachment. Under development (go/si- 3151 attach-role), currently always return ATTACH_STATUS_UNSPECIFIED) 3152 identity: DefaultIdentity that was created or retrieved. 3153 role: Role attached to consumer project. Empty if not attached in this 3154 request. (Under development, currently always return empty.) 3155 """ 3156 3157 class AttachStatusValueValuesEnum(_messages.Enum): 3158 r"""Status of the role attachment. Under development (go/si-attach-role), 3159 currently always return ATTACH_STATUS_UNSPECIFIED) 3160 3161 Values: 3162 ATTACH_STATUS_UNSPECIFIED: Indicates that the AttachStatus was not set. 3163 ATTACHED: The default identity was attached to a role successfully in 3164 this request. 3165 ATTACH_SKIPPED: The request specified that no attempt should be made to 3166 attach the role. 3167 PREVIOUSLY_ATTACHED: Role was attached to the consumer project at some 3168 point in time. Tenant manager doesn't make assertion about the current 3169 state of the identity with respect to the consumer. Role attachment 3170 should happen only once after activation and cannot be reattached 3171 after customer removes it. (go/si-attach-role) 3172 ATTACH_DENIED_BY_ORG_POLICY: Role attachment was denied in this request 3173 by customer set org policy. (go/si-attach-role) 3174 """ 3175 ATTACH_STATUS_UNSPECIFIED = 0 3176 ATTACHED = 1 3177 ATTACH_SKIPPED = 2 3178 PREVIOUSLY_ATTACHED = 3 3179 ATTACH_DENIED_BY_ORG_POLICY = 4 3180 3181 attachStatus = _messages.EnumField('AttachStatusValueValuesEnum', 1) 3182 identity = _messages.MessageField('V1beta1DefaultIdentity', 2) 3183 role = _messages.StringField(3) 3184 3185 3186class V1beta1GenerateServiceAccountResponse(_messages.Message): 3187 r"""Response message for the `GenerateServiceAccount` method. This response 3188 message is assigned to the `response` field of the returned Operation when 3189 that operation is done. 3190 3191 Fields: 3192 account: ServiceAccount that was created or retrieved. 3193 """ 3194 3195 account = _messages.MessageField('V1beta1ServiceAccount', 1) 3196 3197 3198class V1beta1RefreshConsumerResponse(_messages.Message): 3199 r"""Response message for the `RefreshConsumer` method. This response message 3200 is assigned to the `response` field of the returned Operation when that 3201 operation is done. 3202 """ 3203 3204 3205 3206class V1beta1RemoveVisibilityLabelsResponse(_messages.Message): 3207 r"""Response message for the `RemoveVisibilityLabels` method. This response 3208 message is assigned to the `response` field of the returned Operation when 3209 that operation is done. 3210 3211 Fields: 3212 labels: The updated set of visibility labels for this consumer on this 3213 service. 3214 """ 3215 3216 labels = _messages.StringField(1, repeated=True) 3217 3218 3219class V1beta1ServiceAccount(_messages.Message): 3220 r"""A service account in the Identity and Access Management API. 3221 3222 Fields: 3223 email: The email address of the service account. 3224 iamAccountName: Deprecated. See b/136209818. 3225 name: P4 SA resource name. An example name would be: `services/servicecon 3226 sumermanagement.googleapis.com/projects/123/serviceAccounts/default` 3227 tag: The P4 SA configuration tag. This must be defined in 3228 activation_grants. If not specified when creating the account, the tag 3229 is set to "default". 3230 uniqueId: The unique and stable id of the service account. 3231 """ 3232 3233 email = _messages.StringField(1) 3234 iamAccountName = _messages.StringField(2) 3235 name = _messages.StringField(3) 3236 tag = _messages.StringField(4) 3237 uniqueId = _messages.StringField(5) 3238 3239 3240encoding.AddCustomJsonFieldMapping( 3241 StandardQueryParameters, 'f__xgafv', '$.xgafv') 3242encoding.AddCustomJsonEnumMapping( 3243 StandardQueryParameters.FXgafvValueValuesEnum, '_1', '1') 3244encoding.AddCustomJsonEnumMapping( 3245 StandardQueryParameters.FXgafvValueValuesEnum, '_2', '2') 3246