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