UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 91.9 kB
{"openapi":"3.0.0","info":{"contact":{"name":"Google","url":"https://google.com"},"description":"Enables services that service consumers want to use on Google Cloud Platform, lists the available or enabled services, or disables services that service consumers no longer use.","title":"Service User","version":"v1","x-apiClientRegistration":{"url":"https://console.developers.google.com"},"x-apisguru-categories":["cloud"],"x-logo":{"url":"https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},"x-origin":[{"converter":{"url":"https://github.com/lucybot/api-spec-converter","version":"2.6.2"},"format":"google","url":"https://serviceuser.googleapis.com/$discovery/rest?version=v1","version":"v1"}],"x-preferred":true,"x-providerName":"googleapis.com","x-serviceName":"serviceuser"},"externalDocs":{"url":"https://cloud.google.com/service-management/"},"tags":[{"name":"projects"},{"name":"services"}],"paths":{"/v1/services:search":{"get":{"description":"Search available services.\n\nWhen no filter is specified, returns all accessible services. For\nauthenticated users, also returns all services the calling user has\n\"servicemanagement.services.bind\" permission for.","operationId":"serviceuser.services.search","parameters":[{"description":"Requested size of the next page of data.","in":"query","name":"pageSize","schema":{"type":"integer"}},{"description":"Token identifying which result to start with; returned by a previous list\ncall.","in":"query","name":"pageToken","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SearchServicesResponse"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/cloud-platform"]},{"Oauth2":["https://www.googleapis.com/auth/cloud-platform.read-only"]}],"tags":["services"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/bearer_token"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/pp"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}]},"/v1/{name}:disable":{"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/bearer_token"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/pp"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}],"post":{"description":"Disable a service so it can no longer be used with a\nproject. This prevents unintended usage that may cause unexpected billing\ncharges or security leaks.\n\nOperation<response: google.protobuf.Empty>","operationId":"serviceuser.projects.services.disable","parameters":[{"description":"Name of the consumer and the service to disable for that consumer.\n\nThe Service User implementation accepts the following forms for consumer:\n- \"project:<project_id>\"\n\nA valid path would be:\n- /v1/projects/my-project/services/servicemanagement.googleapis.com:disable","in":"path","name":"name","required":true,"x-reservedExpansion":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisableServiceRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Operation"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/cloud-platform"]},{"Oauth2":["https://www.googleapis.com/auth/service.management"]}],"tags":["projects"]}},"/v1/{name}:enable":{"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/bearer_token"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/pp"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}],"post":{"description":"Enable a service so it can be used with a project.\nSee [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for\nmore information.\n\nOperation<response: google.protobuf.Empty>","operationId":"serviceuser.projects.services.enable","parameters":[{"description":"Name of the consumer and the service to enable for that consumer.\n\nA valid path would be:\n- /v1/projects/my-project/services/servicemanagement.googleapis.com:enable","in":"path","name":"name","required":true,"x-reservedExpansion":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnableServiceRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Operation"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/cloud-platform"]},{"Oauth2":["https://www.googleapis.com/auth/service.management"]}],"tags":["projects"]}},"/v1/{parent}/services":{"get":{"description":"List enabled services for the specified consumer.","operationId":"serviceuser.projects.services.list","parameters":[{"description":"Requested size of the next page of data.","in":"query","name":"pageSize","schema":{"type":"integer"}},{"description":"Token identifying which result to start with; returned by a previous list\ncall.","in":"query","name":"pageToken","schema":{"type":"string"}},{"description":"List enabled services for the specified parent.\n\nAn example valid parent would be:\n- projects/my-project","in":"path","name":"parent","required":true,"x-reservedExpansion":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ListEnabledServicesResponse"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/cloud-platform"]},{"Oauth2":["https://www.googleapis.com/auth/cloud-platform.read-only"]}],"tags":["projects"]},"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/bearer_token"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/pp"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}]}},"servers":[{"url":"https://serviceuser.googleapis.com/"}],"components":{"parameters":{"access_token":{"description":"OAuth access token.","in":"query","name":"access_token","schema":{"type":"string"}},"alt":{"description":"Data format for response.","in":"query","name":"alt","schema":{"type":"string","enum":["json","media","proto"],"default":"json"}},"bearer_token":{"description":"OAuth bearer token.","in":"query","name":"bearer_token","schema":{"type":"string"}},"callback":{"description":"JSONP","in":"query","name":"callback","schema":{"type":"string"}},"fields":{"description":"Selector specifying which fields to include in a partial response.","in":"query","name":"fields","schema":{"type":"string"}},"key":{"description":"API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.","in":"query","name":"key","schema":{"type":"string"}},"oauth_token":{"description":"OAuth 2.0 token for the current user.","in":"query","name":"oauth_token","schema":{"type":"string"}},"pp":{"description":"Pretty-print response.","in":"query","name":"pp","schema":{"type":"boolean","default":true}},"prettyPrint":{"description":"Returns response with indentations and line breaks.","in":"query","name":"prettyPrint","schema":{"type":"boolean","default":true}},"quotaUser":{"description":"Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.","in":"query","name":"quotaUser","schema":{"type":"string"}},"uploadType":{"description":"Legacy upload protocol for media (e.g. \"media\", \"multipart\").","in":"query","name":"uploadType","schema":{"type":"string"}},"upload_protocol":{"description":"Upload protocol for media (e.g. \"raw\", \"multipart\").","in":"query","name":"upload_protocol","schema":{"type":"string"}},"_.xgafv":{"description":"V1 error format.","in":"query","name":"$.xgafv","schema":{"type":"string","enum":["1","2"]}}},"securitySchemes":{"Oauth2":{"description":"Oauth 2.0 authentication","type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://accounts.google.com/o/oauth2/auth","scopes":{"https://www.googleapis.com/auth/cloud-platform":"View and manage your data across Google Cloud Platform services","https://www.googleapis.com/auth/cloud-platform.read-only":"View your data across Google Cloud Platform services","https://www.googleapis.com/auth/service.management":"Manage your Google API service configuration"}}}}},"schemas":{"Api":{"description":"Api is a light-weight descriptor for an API Interface.\n\nInterfaces are also described as \"protocol buffer services\" in some contexts,\nsuch as by the \"service\" keyword in a .proto file, but they are different\nfrom API Services, which represent a concrete implementation of an interface\nas opposed to simply a description of methods and bindings. They are also\nsometimes simply referred to as \"APIs\" in other contexts, such as the name of\nthis message itself. See https://cloud.google.com/apis/design/glossary for\ndetailed terminology.","properties":{"methods":{"description":"The methods of this interface, in unspecified order.","items":{"$ref":"#/components/schemas/Method"},"type":"array"},"mixins":{"description":"Included interfaces. See Mixin.","items":{"$ref":"#/components/schemas/Mixin"},"type":"array"},"name":{"description":"The fully qualified name of this interface, including package name\nfollowed by the interface's simple name.","type":"string"},"options":{"description":"Any metadata attached to the interface.","items":{"$ref":"#/components/schemas/Option"},"type":"array"},"sourceContext":{"$ref":"#/components/schemas/SourceContext"},"syntax":{"description":"The source syntax of the service.","enum":["SYNTAX_PROTO2","SYNTAX_PROTO3"],"type":"string"},"version":{"description":"A version string for this interface. If specified, must have the form\n`major-version.minor-version`, as in `1.10`. If the minor version is\nomitted, it defaults to zero. If the entire version field is empty, the\nmajor version is derived from the package name, as outlined below. If the\nfield is not empty, the version in the package name will be verified to be\nconsistent with what is provided here.\n\nThe versioning schema uses [semantic\nversioning](http://semver.org) where the major version number\nindicates a breaking change and the minor version an additive,\nnon-breaking change. Both version numbers are signals to users\nwhat to expect from different versions, and should be carefully\nchosen based on the product plan.\n\nThe major version is also reflected in the package name of the\ninterface, which must end in `v<major-version>`, as in\n`google.feature.v1`. For major versions 0 and 1, the suffix can\nbe omitted. Zero major versions must only be used for\nexperimental, non-GA interfaces.\n","type":"string"}},"type":"object"},"AuthProvider":{"description":"Configuration for an anthentication provider, including support for\n[JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).","properties":{"audiences":{"description":"The list of JWT\n[audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).\nthat are allowed to access. A JWT containing any of these audiences will\nbe accepted. When this setting is absent, only JWTs with audience\n\"https://Service_name/API_name\"\nwill be accepted. For example, if no audiences are in the setting,\nLibraryService API will only accept JWTs with the following audience\n\"https://library-example.googleapis.com/google.example.library.v1.LibraryService\".\n\nExample:\n\n audiences: bookstore_android.apps.googleusercontent.com,\n bookstore_web.apps.googleusercontent.com","type":"string"},"authorizationUrl":{"description":"Redirect URL if JWT token is required but no present or is expired.\nImplement authorizationUrl of securityDefinitions in OpenAPI spec.","type":"string"},"id":{"description":"The unique identifier of the auth provider. It will be referred to by\n`AuthRequirement.provider_id`.\n\nExample: \"bookstore_auth\".","type":"string"},"issuer":{"description":"Identifies the principal that issued the JWT. See\nhttps://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1\nUsually a URL or an email address.\n\nExample: https://securetoken.google.com\nExample: 1234567-compute@developer.gserviceaccount.com","type":"string"},"jwksUri":{"description":"URL of the provider's public key set to validate signature of the JWT. See\n[OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).\nOptional if the key set document:\n - can be retrieved from\n [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html\n of the issuer.\n - can be inferred from the email domain of the issuer (e.g. a Google service account).\n\nExample: https://www.googleapis.com/oauth2/v1/certs","type":"string"}},"type":"object"},"AuthRequirement":{"description":"User-defined authentication requirements, including support for\n[JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).","properties":{"audiences":{"description":"NOTE: This will be deprecated soon, once AuthProvider.audiences is\nimplemented and accepted in all the runtime components.\n\nThe list of JWT\n[audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).\nthat are allowed to access. A JWT containing any of these audiences will\nbe accepted. When this setting is absent, only JWTs with audience\n\"https://Service_name/API_name\"\nwill be accepted. For example, if no audiences are in the setting,\nLibraryService API will only accept JWTs with the following audience\n\"https://library-example.googleapis.com/google.example.library.v1.LibraryService\".\n\nExample:\n\n audiences: bookstore_android.apps.googleusercontent.com,\n bookstore_web.apps.googleusercontent.com","type":"string"},"providerId":{"description":"id from authentication provider.\n\nExample:\n\n provider_id: bookstore_auth","type":"string"}},"type":"object"},"Authentication":{"description":"`Authentication` defines the authentication configuration for an API.\n\nExample for an API targeted for external use:\n\n name: calendar.googleapis.com\n authentication:\n providers:\n - id: google_calendar_auth\n jwks_uri: https://www.googleapis.com/oauth2/v1/certs\n issuer: https://securetoken.google.com\n rules:\n - selector: \"*\"\n requirements:\n provider_id: google_calendar_auth","properties":{"providers":{"description":"Defines a set of authentication providers that a service supports.","items":{"$ref":"#/components/schemas/AuthProvider"},"type":"array"},"rules":{"description":"A list of authentication rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.","items":{"$ref":"#/components/schemas/AuthenticationRule"},"type":"array"}},"type":"object"},"AuthenticationRule":{"description":"Authentication rules for the service.\n\nBy default, if a method has any authentication requirements, every request\nmust include a valid credential matching one of the requirements.\nIt's an error to include more than one kind of credential in a single\nrequest.\n\nIf a method doesn't have any auth requirements, request credentials will be\nignored.","properties":{"allowWithoutCredential":{"description":"If true, the service accepts API keys without any other credential.","type":"boolean"},"customAuth":{"$ref":"#/components/schemas/CustomAuthRequirements"},"oauth":{"$ref":"#/components/schemas/OAuthRequirements"},"requirements":{"description":"Requirements for additional authentication providers.","items":{"$ref":"#/components/schemas/AuthRequirement"},"type":"array"},"selector":{"description":"Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.","type":"string"}},"type":"object"},"AuthorizationConfig":{"description":"Configuration of authorization.\n\nThis section determines the authorization provider, if unspecified, then no\nauthorization check will be done.\n\nExample:\n\n experimental:\n authorization:\n provider: firebaserules.googleapis.com","properties":{"provider":{"description":"The name of the authorization provider, such as\nfirebaserules.googleapis.com.","type":"string"}},"type":"object"},"Backend":{"description":"`Backend` defines the backend configuration for a service.","properties":{"rules":{"description":"A list of API backend rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.","items":{"$ref":"#/components/schemas/BackendRule"},"type":"array"}},"type":"object"},"BackendRule":{"description":"A backend rule provides configuration for an individual API element.","properties":{"address":{"description":"The address of the API backend.","type":"string"},"deadline":{"description":"The number of seconds to wait for a response from a request. The default\ndeadline for gRPC is infinite (no deadline) and HTTP requests is 5 seconds.","format":"double","type":"number"},"minDeadline":{"description":"Minimum deadline in seconds needed for this method. Calls having deadline\nvalue lower than this will be rejected.","format":"double","type":"number"},"selector":{"description":"Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.","type":"string"}},"type":"object"},"Billing":{"description":"Billing related configuration of the service.\n\nThe following example shows how to configure monitored resources and metrics\nfor billing:\n\n monitored_resources:\n - type: library.googleapis.com/branch\n labels:\n - key: /city\n description: The city where the library branch is located in.\n - key: /name\n description: The name of the branch.\n metrics:\n - name: library.googleapis.com/book/borrowed_count\n metric_kind: DELTA\n value_type: INT64\n billing:\n consumer_destinations:\n - monitored_resource: library.googleapis.com/branch\n metrics:\n - library.googleapis.com/book/borrowed_count","properties":{"consumerDestinations":{"description":"Billing configurations for sending metrics to the consumer project.\nThere can be multiple consumer destinations per service, each one must have\na different monitored resource type. A metric can be used in at most\none consumer destination.","items":{"$ref":"#/components/schemas/BillingDestination"},"type":"array"}},"type":"object"},"BillingDestination":{"description":"Configuration of a specific billing destination (Currently only support\nbill against consumer project).","properties":{"metrics":{"description":"Names of the metrics to report to this billing destination.\nEach name must be defined in Service.metrics section.","items":{"type":"string"},"type":"array"},"monitoredResource":{"description":"The monitored resource type. The type must be defined in\nService.monitored_resources section.","type":"string"}},"type":"object"},"Context":{"description":"`Context` defines which contexts an API requests.\n\nExample:\n\n context:\n rules:\n - selector: \"*\"\n requested:\n - google.rpc.context.ProjectContext\n - google.rpc.context.OriginContext\n\nThe above specifies that all methods in the API request\n`google.rpc.context.ProjectContext` and\n`google.rpc.context.OriginContext`.\n\nAvailable context types are defined in package\n`google.rpc.context`.\n\nThis also provides mechanism to whitelist any protobuf message extension that\ncan be sent in grpc metadata using “x-goog-ext-<extension_id>-bin” and\n“x-goog-ext-<extension_id>-jspb” format. For example, list any service\nspecific protobuf types that can appear in grpc metadata as follows in your\nyaml file:\n\nExample:\n\n context:\n rules:\n - selector: \"google.example.library.v1.LibraryService.CreateBook\"\n allowed_request_extensions:\n - google.foo.v1.NewExtension\n allowed_response_extensions:\n - google.foo.v1.NewExtension\n\nYou can also specify extension ID instead of fully qualified extension name\nhere.","properties":{"rules":{"description":"A list of RPC context rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.","items":{"$ref":"#/components/schemas/ContextRule"},"type":"array"}},"type":"object"},"ContextRule":{"description":"A context rule provides information about the context for an individual API\nelement.","properties":{"allowedRequestExtensions":{"description":"A list of full type names or extension IDs of extensions allowed in grpc\nside channel from client to backend.","items":{"type":"string"},"type":"array"},"allowedResponseExtensions":{"description":"A list of full type names or extension IDs of extensions allowed in grpc\nside channel from backend to client.","items":{"type":"string"},"type":"array"},"provided":{"description":"A list of full type names of provided contexts.","items":{"type":"string"},"type":"array"},"requested":{"description":"A list of full type names of requested contexts.","items":{"type":"string"},"type":"array"},"selector":{"description":"Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.","type":"string"}},"type":"object"},"Control":{"description":"Selects and configures the service controller used by the service. The\nservice controller handles features like abuse, quota, billing, logging,\nmonitoring, etc.","properties":{"environment":{"description":"The service control environment to use. If empty, no control plane\nfeature (like quota and billing) will be enabled.","type":"string"}},"type":"object"},"CustomAuthRequirements":{"description":"Configuration for a custom authentication provider.","properties":{"provider":{"description":"A configuration string containing connection information for the\nauthentication provider, typically formatted as a SmartService string\n(go/smartservice).","type":"string"}},"type":"object"},"CustomError":{"description":"Customize service error responses. For example, list any service\nspecific protobuf types that can appear in error detail lists of\nerror responses.\n\nExample:\n\n custom_error:\n types:\n - google.foo.v1.CustomError\n - google.foo.v1.AnotherError","properties":{"rules":{"description":"The list of custom error rules that apply to individual API messages.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.","items":{"$ref":"#/components/schemas/CustomErrorRule"},"type":"array"},"types":{"description":"The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.","items":{"type":"string"},"type":"array"}},"type":"object"},"CustomErrorRule":{"description":"A custom error rule.","properties":{"isErrorType":{"description":"Mark this message as possible payload in error response. Otherwise,\nobjects of this type will be filtered when they appear in error payload.","type":"boolean"},"selector":{"description":"Selects messages to which this rule applies.\n\nRefer to selector for syntax details.","type":"string"}},"type":"object"},"CustomHttpPattern":{"description":"A custom pattern is used for defining custom HTTP verb.","properties":{"kind":{"description":"The name of this custom HTTP verb.","type":"string"},"path":{"description":"The path matched by this custom verb.","type":"string"}},"type":"object"},"DisableServiceRequest":{"description":"Request message for DisableService method.","properties":{},"type":"object"},"Documentation":{"description":"`Documentation` provides the information for describing a service.\n\nExample:\n<pre><code>documentation:\n summary: >\n The Google Calendar API gives access\n to most calendar features.\n pages:\n - name: Overview\n content: &#40;== include google/foo/overview.md ==&#41;\n - name: Tutorial\n content: &#40;== include google/foo/tutorial.md ==&#41;\n subpages;\n - name: Java\n content: &#40;== include google/foo/tutorial_java.md ==&#41;\n rules:\n - selector: google.calendar.Calendar.Get\n description: >\n ...\n - selector: google.calendar.Calendar.Put\n description: >\n ...\n</code></pre>\nDocumentation is provided in markdown syntax. In addition to\nstandard markdown features, definition lists, tables and fenced\ncode blocks are supported. Section headers can be provided and are\ninterpreted relative to the section nesting of the context where\na documentation fragment is embedded.\n\nDocumentation from the IDL is merged with documentation defined\nvia the config at normalization time, where documentation provided\nby config rules overrides IDL provided.\n\nA number of constructs specific to the API platform are supported\nin documentation text.\n\nIn order to reference a proto element, the following\nnotation can be used:\n<pre><code>&#91;fully.qualified.proto.name]&#91;]</code></pre>\nTo override the display text used for the link, this can be used:\n<pre><code>&#91;display text]&#91;fully.qualified.proto.name]</code></pre>\nText can be excluded from doc using the following notation:\n<pre><code>&#40;-- internal comment --&#41;</code></pre>\n\nA few directives are available in documentation. Note that\ndirectives must appear on a single line to be properly\nidentified. The `include` directive includes a markdown file from\nan external source:\n<pre><code>&#40;== include path/to/file ==&#41;</code></pre>\nThe `resource_for` directive marks a message to be the resource of\na collection in REST view. If it is not specified, tools attempt\nto infer the resource from the operations in a collection:\n<pre><code>&#40;== resource_for v1.shelves.books ==&#41;</code></pre>\nThe directive `suppress_warning` does not directly affect documentation\nand is documented together with service config validation.","properties":{"documentationRootUrl":{"description":"The URL to the root of documentation.","type":"string"},"overview":{"description":"Declares a single overview page. For example:\n<pre><code>documentation:\n summary: ...\n overview: &#40;== include overview.md ==&#41;\n</code></pre>\nThis is a shortcut for the following declaration (using pages style):\n<pre><code>documentation:\n summary: ...\n pages:\n - name: Overview\n content: &#40;== include overview.md ==&#41;\n</code></pre>\nNote: you cannot specify both `overview` field and `pages` field.","type":"string"},"pages":{"description":"The top level pages for the documentation set.","items":{"$ref":"#/components/schemas/Page"},"type":"array"},"rules":{"description":"A list of documentation rules that apply to individual API elements.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.","items":{"$ref":"#/components/schemas/DocumentationRule"},"type":"array"},"summary":{"description":"A short summary of what the service does. Can only be provided by\nplain text.","type":"string"}},"type":"object"},"DocumentationRule":{"description":"A documentation rule provides information about individual API elements.","properties":{"deprecationDescription":{"description":"Deprecation description of the selected element(s). It can be provided if an\nelement is marked as `deprecated`.","type":"string"},"description":{"description":"Description of the selected API(s).","type":"string"},"selector":{"description":"The selector is a comma-separated list of patterns. Each pattern is a\nqualified name of the element which may end in \"*\", indicating a wildcard.\nWildcards are only allowed at the end and for a whole component of the\nqualified name, i.e. \"foo.*\" is ok, but not \"foo.b*\" or \"foo.*.bar\". To\nspecify a default for all applicable elements, the whole pattern \"*\"\nis used.","type":"string"}},"type":"object"},"EnableServiceRequest":{"description":"Request message for EnableService method.","properties":{},"type":"object"},"Endpoint":{"description":"`Endpoint` describes a network endpoint that serves a set of APIs.\nA service may expose any number of endpoints, and all endpoints share the\nsame service configuration, such as quota configuration and monitoring\nconfiguration.\n\nExample service configuration:\n\n name: library-example.googleapis.com\n endpoints:\n # Below entry makes 'google.example.library.v1.Library'\n # API be served from endpoint address library-example.googleapis.com.\n # It also allows HTTP OPTIONS calls to be passed to the backend, for\n # it to decide whether the subsequent cross-origin request is\n # allowed to proceed.\n - name: library-example.googleapis.com\n allow_cors: true","properties":{"aliases":{"description":"DEPRECATED: This field is no longer supported. Instead of using aliases,\nplease specify multiple google.api.Endpoint for each of the intended\naliases.\n\nAdditional names that this endpoint will be hosted on.","items":{"type":"string"},"type":"array"},"allowCors":{"description":"Allowing\n[CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka\ncross-domain traffic, would allow the backends served from this endpoint to\nreceive and respond to HTTP OPTIONS requests. The response will be used by\nthe browser to determine whether the subsequent cross-origin request is\nallowed to proceed.","type":"boolean"},"features":{"description":"The list of features enabled on this endpoint.","items":{"type":"string"},"type":"array"},"name":{"description":"The canonical name of this endpoint.","type":"string"},"target":{"description":"The specification of an Internet routable address of API frontend that will\nhandle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary).\nIt should be either a valid IPv4 address or a fully-qualified domain name.\nFor example, \"8.8.8.8\" or \"myservice.appspot.com\".","type":"string"}},"type":"object"},"Enum":{"description":"Enum type definition.","properties":{"enumvalue":{"description":"Enum value definitions.","items":{"$ref":"#/components/schemas/EnumValue"},"type":"array"},"name":{"description":"Enum type name.","type":"string"},"options":{"description":"Protocol buffer options.","items":{"$ref":"#/components/schemas/Option"},"type":"array"},"sourceContext":{"$ref":"#/components/schemas/SourceContext"},"syntax":{"description":"The source syntax.","enum":["SYNTAX_PROTO2","SYNTAX_PROTO3"],"type":"string"}},"type":"object"},"EnumValue":{"description":"Enum value definition.","properties":{"name":{"description":"Enum value name.","type":"string"},"number":{"description":"Enum value number.","format":"int32","type":"integer"},"options":{"description":"Protocol buffer options.","items":{"$ref":"#/components/schemas/Option"},"type":"array"}},"type":"object"},"Experimental":{"description":"Experimental service configuration. These configuration options can\nonly be used by whitelisted users.","properties":{"authorization":{"$ref":"#/components/schemas/AuthorizationConfig"}},"type":"object"},"Field":{"description":"A single field of a message type.","properties":{"cardinality":{"description":"The field cardinality.","enum":["CARDINALITY_UNKNOWN","CARDINALITY_OPTIONAL","CARDINALITY_REQUIRED","CARDINALITY_REPEATED"],"type":"string"},"defaultValue":{"description":"The string value of the default value of this field. Proto2 syntax only.","type":"string"},"jsonName":{"description":"The field JSON name.","type":"string"},"kind":{"description":"The field type.","enum":["TYPE_UNKNOWN","TYPE_DOUBLE","TYPE_FLOAT","TYPE_INT64","TYPE_UINT64","TYPE_INT32","TYPE_FIXED64","TYPE_FIXED32","TYPE_BOOL","TYPE_STRING","TYPE_GROUP","TYPE_MESSAGE","TYPE_BYTES","TYPE_UINT32","TYPE_ENUM","TYPE_SFIXED32","TYPE_SFIXED64","TYPE_SINT32","TYPE_SINT64"],"type":"string"},"name":{"description":"The field name.","type":"string"},"number":{"description":"The field number.","format":"int32","type":"integer"},"oneofIndex":{"description":"The index of the field type in `Type.oneofs`, for message or enumeration\ntypes. The first type has index 1; zero means the type is not in the list.","format":"int32","type":"integer"},"options":{"description":"The protocol buffer options.","items":{"$ref":"#/components/schemas/Option"},"type":"array"},"packed":{"description":"Whether to use alternative packed wire representation.","type":"boolean"},"typeUrl":{"description":"The field type URL, without the scheme, for message or enumeration\ntypes. Example: `\"type.googleapis.com/google.protobuf.Timestamp\"`.","type":"string"}},"type":"object"},"Http":{"description":"Defines the HTTP configuration for an API service. It contains a list of\nHttpRule, each specifying the mapping of an RPC method\nto one or more HTTP REST API methods.","properties":{"fullyDecodeReservedExpansion":{"description":"When set to true, URL path parmeters will be fully URI-decoded except in\ncases of single segment matches in reserved expansion, where \"%2F\" will be\nleft encoded.\n\nThe default behavior is to not decode RFC 6570 reserved characters in multi\nsegment matches.","type":"boolean"},"rules":{"description":"A list of HTTP configuration rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.","items":{"$ref":"#/components/schemas/HttpRule"},"type":"array"}},"type":"object"},"HttpRule":{"description":"`HttpRule` defines the mapping of an RPC method to one or more HTTP\nREST API methods. The mapping specifies how different portions of the RPC\nrequest message are mapped to URL path, URL query parameters, and\nHTTP request body. The mapping is typically specified as an\n`google.api.http` annotation on the RPC method,\nsee \"google/api/annotations.proto\" for details.\n\nThe mapping consists of a field specifying the path template and\nmethod kind. The path template can refer to fields in the request\nmessage, as in the example below which describes a REST GET\noperation on a resource collection of messages:\n\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http).get = \"/v1/messages/{message_id}/{sub.subfield}\";\n }\n }\n message GetMessageRequest {\n message SubMessage {\n string subfield = 1;\n }\n string message_id = 1; // mapped to the URL\n SubMessage sub = 2; // `sub.subfield` is url-mapped\n }\n message Message {\n string text = 1; // content of the resource\n }\n\nThe same http annotation can alternatively be expressed inside the\n`GRPC API Configuration` YAML file.\n\n http:\n rules:\n - selector: <proto_package_name>.Messaging.GetMessage\n get: /v1/messages/{message_id}/{sub.subfield}\n\nThis definition enables an automatic, bidrectional mapping of HTTP\nJSON to RPC. Example:\n\nHTTP | RPC\n-----|-----\n`GET /v1/messages/123456/foo` | `GetMessage(message_id: \"123456\" sub: SubMessage(subfield: \"foo\"))`\n\nIn general, not only fields but also field paths can be referenced\nfrom a path pattern. Fields mapped to the path pattern cannot be\nrepeated and must have a primitive (non-message) type.\n\nAny fields in the request message which are not bound by the path\npattern automatically become (optional) HTTP query\nparameters. Assume the following definition of the request message:\n\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http).get = \"/v1/messages/{message_id}\";\n }\n }\n message GetMessageRequest {\n message SubMessage {\n string subfield = 1;\n }\n string message_id = 1; // mapped to the URL\n int64 revision = 2; // becomes a parameter\n SubMessage sub = 3; // `sub.subfield` becomes a parameter\n }\n\n\nThis enables a HTTP JSON to RPC mapping as below:\n\nHTTP | RPC\n-----|-----\n`GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))`\n\nNote that fields which are mapped to HTTP parameters must have a\nprimitive type or a repeated primitive type. Message types are not\nallowed. In the case of a repeated type, the parameter can be\nrepeated in the URL, as in `...?param=A&param=B`.\n\nFor HTTP method kinds which allow a request body, the `body` field\nspecifies the mapping. Consider a REST update method on the\nmessage resource collection:\n\n\n service Messaging {\n rpc UpdateMessage(UpdateMessageRequest) returns (Message) {\n option (google.api.http) = {\n put: \"/v1/messages/{message_id}\"\n body: \"message\"\n };\n }\n }\n message UpdateMessageRequest {\n string message_id = 1; // mapped to the URL\n Message message = 2; // mapped to the body\n }\n\n\nThe following HTTP JSON to RPC mapping is enabled, where the\nrepresentation of the JSON in the request body is determined by\nprotos JSON encoding:\n\nHTTP | RPC\n-----|-----\n`PUT /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })`\n\nThe special name `*` can be used in the body mapping to define that\nevery field not bound by the path template should be mapped to the\nrequest body. This enables the following alternative definition of\nthe update method:\n\n service Messaging {\n rpc UpdateMessage(Message) returns (Message) {\n option (google.api.http) = {\n put: \"/v1/messages/{message_id}\"\n body: \"*\"\n };\n }\n }\n message Message {\n string message_id = 1;\n string text = 2;\n }\n\n\nThe following HTTP JSON to RPC mapping is enabled:\n\nHTTP | RPC\n-----|-----\n`PUT /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" text: \"Hi!\")`\n\nNote that when using `*` in the body mapping, it is not possible to\nhave HTTP parameters, as all fields not bound by the path end in\nthe body. This makes this option more rarely used in practice of\ndefining REST APIs. The common usage of `*` is in custom methods\nwhich don't use the URL at all for transferring data.\n\nIt is possible to define multiple HTTP methods for one RPC by using\nthe `additional_bindings` option. Example:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get: \"/v1/messages/{message_id}\"\n additional_bindings {\n get: \"/v1/users/{user_id}/messages/{message_id}\"\n }\n };\n }\n }\n message GetMessageRequest {\n string message_id = 1;\n string user_id = 2;\n }\n\n\nThis enables the following two alternative HTTP JSON to RPC\nmappings:\n\nHTTP | RPC\n-----|-----\n`GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")`\n`GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id: \"123456\")`\n\n# Rules for HTTP mapping\n\nThe rules for mapping HTTP path, query parameters, and body fields\nto the request message are as follows:\n\n1. The `body` field specifies either `*` or a field path, or is\n omitted. If omitted, it indicates there is no HTTP request body.\n2. Leaf fields (recursive expansion of nested messages in the\n request) can be classified into three types:\n (a) Matched in the URL template.\n (b) Covered by body (if body is `*`, everything except (a) fields;\n else everything under the body field)\n (c) All other fields.\n3. URL query parameters found in the HTTP request are mapped to (c) fields.\n4. Any body sent with an HTTP request can contain only (b) fields.\n\nThe syntax of the path template is as follows:\n\n Template = \"/\" Segments [ Verb ] ;\n Segments = Segment { \"/\" Segment } ;\n Segment = \"*\" | \"**\" | LITERAL | Variable ;\n Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ;\n FieldPath = IDENT { \".\" IDENT } ;\n Verb = \":\" LITERAL ;\n\nThe syntax `*` matches a single path segment. The syntax `**` matches zero\nor more path segments, which must be the last part of the path except the\n`Verb`. The syntax `LITERAL` matches literal text in the path.\n\nThe syntax `Variable` matches part of the URL path as specified by its\ntemplate. A variable template must not contain other variables. If a variable\nmatches a single path segment, its template may be omitted, e.g. `{var}`\nis equivalent to `{var=*}`.\n\nIf a variable contains exactly one path segment, such as `\"{var}\"` or\n`\"{var=*}\"`, when such a variable is expanded into a URL path, all characters\nexcept `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the\nDiscovery Document as `{var}`.\n\nIf a variable contains one or more path segments, such as `\"{var=foo/*}\"`\nor `\"{var=**}\"`, when such a variable is expanded into a URL path, all\ncharacters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables\nshow up in the Discovery Document as `{+var}`.\n\nNOTE: While the single segment variable matches the semantics of\n[RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2\nSimple String Expansion, the multi segment variable **does not** match\nRFC 6570 Reserved Expansion. The reason is that the Reserved Expansion\ndoes not expand special characters like `?` and `#`, which would lead\nto invalid URLs.\n\nNOTE: the field paths in variables and in the `body` must not refer to\nrepeated fields or map fields.","properties":{"additionalBindings":{"description":"Additional HTTP bindings for the selector. Nested bindings must\nnot contain an `additional_bindings` field themselves (that is,\nthe nesting may only be one level deep).","items":{"$ref":"#/components/schemas/HttpRule"},"type":"array"},"body":{"description":"The name of the request field whose value is mapped to the HTTP body, or\n`*` for mapping all fields not captured by the path pattern to the HTTP\nbody. NOTE: the referred field must not be a repeated field and must be\npresent at the top-level of request message type.","type":"string"},"custom":{"$ref":"#/components/schemas/CustomHttpPattern"},"delete":{"description":"Used for deleting a resource.","type":"string"},"get":{"description":"Used for listing and getting information about resources.","type":"string"},"mediaDownload":{"$ref":"#/components/schemas/MediaDownload"},"mediaUpload":{"$ref":"#/components/schemas/MediaUpload"},"patch":{"description":"Used for updating a resource.","type":"string"},"post":{"description":"Used for creating a resource.","type":"string"},"put":{"description":"Used for updating a resource.","type":"string"},"selector":{"description":"Selects methods to which this rule applies.\n\nRefer to selector for syntax details.","type":"string"}},"type":"object"},"LabelDescriptor":{"description":"A description of a label.","properties":{"description":{"description":"A human-readable description for the label.","type":"string"},"key":{"description":"The label key.","type":"string"},"valueType":{"description":"The type of data that can be assigned to the label.","enum":["STRING","BOOL","INT64"],"type":"string"}},"type":"object"},"ListEnabledServicesResponse":{"description":"Response message for `ListEnabledServices` method.","properties":{"nextPageToken":{"description":"Token that can be passed to `ListEnabledServices` to resume a paginated\nquery.","type":"string"},"services":{"description":"Services enabled for the specified parent.","items":{"$ref":"#/components/schemas/PublishedService"},"type":"array"}},"type":"object"},"LogDescriptor":{"description":"A description of a log type. Example in YAML format:\n\n - name: library.googleapis.com/activity_history\n description: The history of borrowing and returning library items.\n display_name: Activity\n labels:\n - key: /customer_id\n description: Identifier of a library customer","properties":{"description":{"description":"A human-readable description of this log. This information appears in\nthe documentation and can contain details.","type":"string"},"displayName":{"description":"The human-readable name for this log. This information appears on\nthe user interface and should be concise.","type":"string"},"labels":{"description":"The set of labels that are available to describe a specific log entry.\nRuntime requests that contain labels not specified here are\nconsidered invalid.","items":{"$ref":"#/components/schemas/LabelDescriptor"},"type":"array"},"name":{"description":"The name of the log. It must be less than 512 characters long and can\ninclude the following characters: upper- and lower-case alphanumeric\ncharacters [A-Za-z0-9], and punctuation characters including\nslash, underscore, hyphen, period [/_-.].","type":"string"}},"type":"object"},"Logging":{"description":"Logging configuration of the service.\n\nThe following example shows how to configure logs to be sent to the\nproducer and consumer projects. In the example, the `activity_history`\nlog is sent to both the producer and consumer projects, whereas the\n`purchase_history` log is only sent to the producer project.\n\n monitored_resources:\n - type: library.googleapis.com/branch\n labels:\n - key: /city\n description: The city where the library branch is located in.\n - key: /name\n description: The name of the branch.\n logs:\n - name: activity_history\n labels:\n - key: /customer_id\n - name: purchase_history\n logging:\n producer_destinations:\n - monitored_resource: library.googleapis.com/branch\n logs:\n - activity_history\n - purchase_history\n consumer_destinations:\n - monitored_resource: library.googleapis.com/branch\n logs:\n - activity_history","properties":{"consumerDestinations":{"description":"Logging configurations for sending logs to the consumer project.\nThere can be multiple consumer destinations, each one must have a\ndifferent monitored resource type. A log can be used in at most\none consumer destination.","items":{"$ref":"#/components/schemas/LoggingDestination"},"type":"array"},"producerDestinations":{"description":"Logging configurations for sending logs to the producer project.\nThere can be multiple producer destinations, each one must have a\ndifferent monitored resource type. A log can be used in at most\none producer destination.","items":{"$ref":"#/components/schemas/LoggingDestination"},"type":"array"}},"type":"object"},"LoggingDestination":{"description":"Configuration of a specific logging destination (the producer project\nor the consumer project).","properties":{"logs":{"description":"Names of the logs to be sent to this destination. Each name must\nbe defined in the Service.logs section. If the log name is\nnot a domain scoped name, it will be automatically prefixed with\nthe service name followed by \"/\".","items":{"type":"string"},"type":"array"},"monitoredResource":{"description":"The monitored resource type. The type must be defined in the\nService.monitored_resources section.","type":"string"}},"type":"object"},"MediaDownload":{"description":"Defines the Media configuration for a service in case of a download.\nUse this only for Scotty Requests. Do not use this for media support using\nBytestream, add instead [][google.bytestream.RestByteStream] as an API to\nyour configuration for Bytestream methods.","properties":{"completeNotification":{"description":"A boolean that determines whether a notification for the completion of a\ndownload should be sent to the backend.","type":"boolean"},"downloadService":{"description":"DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED.\n\nSpecify name of the download service if one is used for download.","type":"string"},"dropzone":{"description":"Name of the Scotty dropzone to use for the current API.","type":"string"},"enabled":{"description":"Whether download is enabled.","type":"boolean"},"maxDirectDownloadSize":{"description":"Optional maximum acceptable size for direct download.\nThe size is specified in bytes.","format":"int64","type":"string"},"useDirectDownload":{"description":"A boolean that determines if direct download from ESF should be used for\ndownload of this media.","type":"boolean"}},"type":"object"},"MediaUpload":{"description":"Defines the Media configuration for a service in case of an upload.\nUse this only for Scotty Requests. Do not use this for media support using\nBytestream, add instead [][google.bytestream.RestByteStream] as an API to\nyour