google-apis-serviceconsumermanagement_v1beta1 0.1.0

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