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