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