google-cloud-cloud_quotas-v1beta 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +154 -0
  6. data/lib/google/api/cloudquotas/v1beta/cloudquotas_pb.rb +58 -0
  7. data/lib/google/api/cloudquotas/v1beta/cloudquotas_services_pb.rb +62 -0
  8. data/lib/google/api/cloudquotas/v1beta/quota_adjuster_settings_pb.rb +54 -0
  9. data/lib/google/api/cloudquotas/v1beta/quota_adjuster_settings_services_pb.rb +52 -0
  10. data/lib/google/api/cloudquotas/v1beta/resources_pb.rb +59 -0
  11. data/lib/google/cloud/cloud_quotas/v1beta/cloud_quotas/client.rb +1030 -0
  12. data/lib/google/cloud/cloud_quotas/v1beta/cloud_quotas/credentials.rb +47 -0
  13. data/lib/google/cloud/cloud_quotas/v1beta/cloud_quotas/paths.rb +265 -0
  14. data/lib/google/cloud/cloud_quotas/v1beta/cloud_quotas/rest/client.rb +960 -0
  15. data/lib/google/cloud/cloud_quotas/v1beta/cloud_quotas/rest/service_stub.rb +537 -0
  16. data/lib/google/cloud/cloud_quotas/v1beta/cloud_quotas/rest.rb +58 -0
  17. data/lib/google/cloud/cloud_quotas/v1beta/cloud_quotas.rb +61 -0
  18. data/lib/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager/client.rb +564 -0
  19. data/lib/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager/credentials.rb +47 -0
  20. data/lib/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager/paths.rb +50 -0
  21. data/lib/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager/rest/client.rb +524 -0
  22. data/lib/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager/rest/service_stub.rb +204 -0
  23. data/lib/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager/rest.rb +57 -0
  24. data/lib/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager.rb +60 -0
  25. data/lib/google/cloud/cloud_quotas/v1beta/rest.rb +38 -0
  26. data/lib/google/cloud/cloud_quotas/v1beta/version.rb +28 -0
  27. data/lib/google/cloud/cloud_quotas/v1beta.rb +46 -0
  28. data/lib/google-cloud-cloud_quotas-v1beta.rb +21 -0
  29. data/proto_docs/README.md +4 -0
  30. data/proto_docs/google/api/client.rb +459 -0
  31. data/proto_docs/google/api/cloudquotas/v1beta/cloudquotas.rb +193 -0
  32. data/proto_docs/google/api/cloudquotas/v1beta/quota_adjuster_settings.rb +89 -0
  33. data/proto_docs/google/api/cloudquotas/v1beta/resources.rb +348 -0
  34. data/proto_docs/google/api/field_behavior.rb +85 -0
  35. data/proto_docs/google/api/launch_stage.rb +71 -0
  36. data/proto_docs/google/api/resource.rb +227 -0
  37. data/proto_docs/google/protobuf/duration.rb +98 -0
  38. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  39. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  40. data/proto_docs/google/protobuf/wrappers.rb +121 -0
  41. metadata +118 -0
@@ -0,0 +1,960 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/api/cloudquotas/v1beta/cloudquotas_pb"
21
+ require "google/cloud/cloud_quotas/v1beta/cloud_quotas/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module CloudQuotas
26
+ module V1beta
27
+ module CloudQuotas
28
+ module Rest
29
+ ##
30
+ # REST client for the CloudQuotas service.
31
+ #
32
+ # The Cloud Quotas API is an infrastructure service for Google Cloud that lets
33
+ # service consumers list and manage their resource usage limits.
34
+ #
35
+ # - List/Get the metadata and current status of the quotas for a service.
36
+ # - Create/Update quota preferencess that declare the preferred quota values.
37
+ # - Check the status of a quota preference request.
38
+ # - List/Get pending and historical quota preference.
39
+ #
40
+ class Client
41
+ # @private
42
+ API_VERSION = ""
43
+
44
+ # @private
45
+ DEFAULT_ENDPOINT_TEMPLATE = "cloudquotas.$UNIVERSE_DOMAIN$"
46
+
47
+ include Paths
48
+
49
+ # @private
50
+ attr_reader :cloud_quotas_stub
51
+
52
+ ##
53
+ # Configure the CloudQuotas Client class.
54
+ #
55
+ # See {::Google::Cloud::CloudQuotas::V1beta::CloudQuotas::Rest::Client::Configuration}
56
+ # for a description of the configuration fields.
57
+ #
58
+ # @example
59
+ #
60
+ # # Modify the configuration for all CloudQuotas clients
61
+ # ::Google::Cloud::CloudQuotas::V1beta::CloudQuotas::Rest::Client.configure do |config|
62
+ # config.timeout = 10.0
63
+ # end
64
+ #
65
+ # @yield [config] Configure the Client client.
66
+ # @yieldparam config [Client::Configuration]
67
+ #
68
+ # @return [Client::Configuration]
69
+ #
70
+ def self.configure
71
+ @configure ||= begin
72
+ namespace = ["Google", "Cloud", "CloudQuotas", "V1beta"]
73
+ parent_config = while namespace.any?
74
+ parent_name = namespace.join "::"
75
+ parent_const = const_get parent_name
76
+ break parent_const.configure if parent_const.respond_to? :configure
77
+ namespace.pop
78
+ end
79
+ default_config = Client::Configuration.new parent_config
80
+
81
+ default_config.rpcs.list_quota_infos.timeout = 60.0
82
+ default_config.rpcs.list_quota_infos.retry_policy = {
83
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
84
+ }
85
+
86
+ default_config.rpcs.get_quota_info.timeout = 60.0
87
+ default_config.rpcs.get_quota_info.retry_policy = {
88
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
89
+ }
90
+
91
+ default_config.rpcs.list_quota_preferences.timeout = 60.0
92
+ default_config.rpcs.list_quota_preferences.retry_policy = {
93
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
94
+ }
95
+
96
+ default_config.rpcs.get_quota_preference.timeout = 60.0
97
+ default_config.rpcs.get_quota_preference.retry_policy = {
98
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
99
+ }
100
+
101
+ default_config.rpcs.create_quota_preference.timeout = 60.0
102
+ default_config.rpcs.create_quota_preference.retry_policy = {
103
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
104
+ }
105
+
106
+ default_config.rpcs.update_quota_preference.timeout = 60.0
107
+ default_config.rpcs.update_quota_preference.retry_policy = {
108
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
109
+ }
110
+
111
+ default_config
112
+ end
113
+ yield @configure if block_given?
114
+ @configure
115
+ end
116
+
117
+ ##
118
+ # Configure the CloudQuotas Client instance.
119
+ #
120
+ # The configuration is set to the derived mode, meaning that values can be changed,
121
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
122
+ # should be made on {Client.configure}.
123
+ #
124
+ # See {::Google::Cloud::CloudQuotas::V1beta::CloudQuotas::Rest::Client::Configuration}
125
+ # for a description of the configuration fields.
126
+ #
127
+ # @yield [config] Configure the Client client.
128
+ # @yieldparam config [Client::Configuration]
129
+ #
130
+ # @return [Client::Configuration]
131
+ #
132
+ def configure
133
+ yield @config if block_given?
134
+ @config
135
+ end
136
+
137
+ ##
138
+ # The effective universe domain
139
+ #
140
+ # @return [String]
141
+ #
142
+ def universe_domain
143
+ @cloud_quotas_stub.universe_domain
144
+ end
145
+
146
+ ##
147
+ # Create a new CloudQuotas REST client object.
148
+ #
149
+ # @example
150
+ #
151
+ # # Create a client using the default configuration
152
+ # client = ::Google::Cloud::CloudQuotas::V1beta::CloudQuotas::Rest::Client.new
153
+ #
154
+ # # Create a client using a custom configuration
155
+ # client = ::Google::Cloud::CloudQuotas::V1beta::CloudQuotas::Rest::Client.new do |config|
156
+ # config.timeout = 10.0
157
+ # end
158
+ #
159
+ # @yield [config] Configure the CloudQuotas client.
160
+ # @yieldparam config [Client::Configuration]
161
+ #
162
+ def initialize
163
+ # Create the configuration object
164
+ @config = Configuration.new Client.configure
165
+
166
+ # Yield the configuration if needed
167
+ yield @config if block_given?
168
+
169
+ # Create credentials
170
+ credentials = @config.credentials
171
+ # Use self-signed JWT if the endpoint is unchanged from default,
172
+ # but only if the default endpoint does not have a region prefix.
173
+ enable_self_signed_jwt = @config.endpoint.nil? ||
174
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
175
+ !@config.endpoint.split(".").first.include?("-"))
176
+ credentials ||= Credentials.default scope: @config.scope,
177
+ enable_self_signed_jwt: enable_self_signed_jwt
178
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
179
+ credentials = Credentials.new credentials, scope: @config.scope
180
+ end
181
+
182
+ @quota_project_id = @config.quota_project
183
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
184
+
185
+ @cloud_quotas_stub = ::Google::Cloud::CloudQuotas::V1beta::CloudQuotas::Rest::ServiceStub.new(
186
+ endpoint: @config.endpoint,
187
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
188
+ universe_domain: @config.universe_domain,
189
+ credentials: credentials,
190
+ logger: @config.logger
191
+ )
192
+
193
+ @cloud_quotas_stub.logger(stub: true)&.info do |entry|
194
+ entry.set_system_name
195
+ entry.set_service
196
+ entry.message = "Created client for #{entry.service}"
197
+ entry.set_credentials_fields credentials
198
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
199
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
200
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
201
+ end
202
+ end
203
+
204
+ ##
205
+ # The logger used for request/response debug logging.
206
+ #
207
+ # @return [Logger]
208
+ #
209
+ def logger
210
+ @cloud_quotas_stub.logger
211
+ end
212
+
213
+ # Service calls
214
+
215
+ ##
216
+ # Lists QuotaInfos of all quotas for a given project, folder or organization.
217
+ #
218
+ # @overload list_quota_infos(request, options = nil)
219
+ # Pass arguments to `list_quota_infos` via a request object, either of type
220
+ # {::Google::Cloud::CloudQuotas::V1beta::ListQuotaInfosRequest} or an equivalent Hash.
221
+ #
222
+ # @param request [::Google::Cloud::CloudQuotas::V1beta::ListQuotaInfosRequest, ::Hash]
223
+ # A request object representing the call parameters. Required. To specify no
224
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
225
+ # @param options [::Gapic::CallOptions, ::Hash]
226
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
227
+ #
228
+ # @overload list_quota_infos(parent: nil, page_size: nil, page_token: nil)
229
+ # Pass arguments to `list_quota_infos` via keyword arguments. Note that at
230
+ # least one keyword argument is required. To specify no parameters, or to keep all
231
+ # the default parameter values, pass an empty Hash as a request object (see above).
232
+ #
233
+ # @param parent [::String]
234
+ # Required. Parent value of QuotaInfo resources.
235
+ # Listing across different resource containers (such as 'projects/-') is not
236
+ # allowed.
237
+ #
238
+ # Example names:
239
+ # `projects/123/locations/global/services/compute.googleapis.com`
240
+ # `folders/234/locations/global/services/compute.googleapis.com`
241
+ # `organizations/345/locations/global/services/compute.googleapis.com`
242
+ # @param page_size [::Integer]
243
+ # Optional. Requested page size. Server may return fewer items than
244
+ # requested. If unspecified, server will pick an appropriate default.
245
+ # @param page_token [::String]
246
+ # Optional. A token identifying a page of results the server should return.
247
+ # @yield [result, operation] Access the result along with the TransportOperation object
248
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudQuotas::V1beta::QuotaInfo>]
249
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
250
+ #
251
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudQuotas::V1beta::QuotaInfo>]
252
+ #
253
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
254
+ #
255
+ # @example Basic example
256
+ # require "google/cloud/cloud_quotas/v1beta"
257
+ #
258
+ # # Create a client object. The client can be reused for multiple calls.
259
+ # client = Google::Cloud::CloudQuotas::V1beta::CloudQuotas::Rest::Client.new
260
+ #
261
+ # # Create a request. To set request fields, pass in keyword arguments.
262
+ # request = Google::Cloud::CloudQuotas::V1beta::ListQuotaInfosRequest.new
263
+ #
264
+ # # Call the list_quota_infos method.
265
+ # result = client.list_quota_infos request
266
+ #
267
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
268
+ # # over elements, and API calls will be issued to fetch pages as needed.
269
+ # result.each do |item|
270
+ # # Each element is of type ::Google::Cloud::CloudQuotas::V1beta::QuotaInfo.
271
+ # p item
272
+ # end
273
+ #
274
+ def list_quota_infos request, options = nil
275
+ raise ::ArgumentError, "request must be provided" if request.nil?
276
+
277
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudQuotas::V1beta::ListQuotaInfosRequest
278
+
279
+ # Converts hash and nil to an options object
280
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
281
+
282
+ # Customize the options with defaults
283
+ call_metadata = @config.rpcs.list_quota_infos.metadata.to_h
284
+
285
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
286
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
287
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
288
+ gapic_version: ::Google::Cloud::CloudQuotas::V1beta::VERSION,
289
+ transports_version_send: [:rest]
290
+
291
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
292
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
293
+
294
+ options.apply_defaults timeout: @config.rpcs.list_quota_infos.timeout,
295
+ metadata: call_metadata,
296
+ retry_policy: @config.rpcs.list_quota_infos.retry_policy
297
+
298
+ options.apply_defaults timeout: @config.timeout,
299
+ metadata: @config.metadata,
300
+ retry_policy: @config.retry_policy
301
+
302
+ @cloud_quotas_stub.list_quota_infos request, options do |result, operation|
303
+ result = ::Gapic::Rest::PagedEnumerable.new @cloud_quotas_stub, :list_quota_infos, "quota_infos", request, result, options
304
+ yield result, operation if block_given?
305
+ throw :response, result
306
+ end
307
+ rescue ::Gapic::Rest::Error => e
308
+ raise ::Google::Cloud::Error.from_error(e)
309
+ end
310
+
311
+ ##
312
+ # Retrieve the QuotaInfo of a quota for a project, folder or organization.
313
+ #
314
+ # @overload get_quota_info(request, options = nil)
315
+ # Pass arguments to `get_quota_info` via a request object, either of type
316
+ # {::Google::Cloud::CloudQuotas::V1beta::GetQuotaInfoRequest} or an equivalent Hash.
317
+ #
318
+ # @param request [::Google::Cloud::CloudQuotas::V1beta::GetQuotaInfoRequest, ::Hash]
319
+ # A request object representing the call parameters. Required. To specify no
320
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
321
+ # @param options [::Gapic::CallOptions, ::Hash]
322
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
323
+ #
324
+ # @overload get_quota_info(name: nil)
325
+ # Pass arguments to `get_quota_info` via keyword arguments. Note that at
326
+ # least one keyword argument is required. To specify no parameters, or to keep all
327
+ # the default parameter values, pass an empty Hash as a request object (see above).
328
+ #
329
+ # @param name [::String]
330
+ # Required. The resource name of the quota info.
331
+ #
332
+ # An example name:
333
+ # `projects/123/locations/global/services/compute.googleapis.com/quotaInfos/CpusPerProjectPerRegion`
334
+ # @yield [result, operation] Access the result along with the TransportOperation object
335
+ # @yieldparam result [::Google::Cloud::CloudQuotas::V1beta::QuotaInfo]
336
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
337
+ #
338
+ # @return [::Google::Cloud::CloudQuotas::V1beta::QuotaInfo]
339
+ #
340
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
341
+ #
342
+ # @example Basic example
343
+ # require "google/cloud/cloud_quotas/v1beta"
344
+ #
345
+ # # Create a client object. The client can be reused for multiple calls.
346
+ # client = Google::Cloud::CloudQuotas::V1beta::CloudQuotas::Rest::Client.new
347
+ #
348
+ # # Create a request. To set request fields, pass in keyword arguments.
349
+ # request = Google::Cloud::CloudQuotas::V1beta::GetQuotaInfoRequest.new
350
+ #
351
+ # # Call the get_quota_info method.
352
+ # result = client.get_quota_info request
353
+ #
354
+ # # The returned object is of type Google::Cloud::CloudQuotas::V1beta::QuotaInfo.
355
+ # p result
356
+ #
357
+ def get_quota_info request, options = nil
358
+ raise ::ArgumentError, "request must be provided" if request.nil?
359
+
360
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudQuotas::V1beta::GetQuotaInfoRequest
361
+
362
+ # Converts hash and nil to an options object
363
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
364
+
365
+ # Customize the options with defaults
366
+ call_metadata = @config.rpcs.get_quota_info.metadata.to_h
367
+
368
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
369
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
370
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
371
+ gapic_version: ::Google::Cloud::CloudQuotas::V1beta::VERSION,
372
+ transports_version_send: [:rest]
373
+
374
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
375
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
376
+
377
+ options.apply_defaults timeout: @config.rpcs.get_quota_info.timeout,
378
+ metadata: call_metadata,
379
+ retry_policy: @config.rpcs.get_quota_info.retry_policy
380
+
381
+ options.apply_defaults timeout: @config.timeout,
382
+ metadata: @config.metadata,
383
+ retry_policy: @config.retry_policy
384
+
385
+ @cloud_quotas_stub.get_quota_info request, options do |result, operation|
386
+ yield result, operation if block_given?
387
+ end
388
+ rescue ::Gapic::Rest::Error => e
389
+ raise ::Google::Cloud::Error.from_error(e)
390
+ end
391
+
392
+ ##
393
+ # Lists QuotaPreferences in a given project, folder or organization.
394
+ #
395
+ # @overload list_quota_preferences(request, options = nil)
396
+ # Pass arguments to `list_quota_preferences` via a request object, either of type
397
+ # {::Google::Cloud::CloudQuotas::V1beta::ListQuotaPreferencesRequest} or an equivalent Hash.
398
+ #
399
+ # @param request [::Google::Cloud::CloudQuotas::V1beta::ListQuotaPreferencesRequest, ::Hash]
400
+ # A request object representing the call parameters. Required. To specify no
401
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
402
+ # @param options [::Gapic::CallOptions, ::Hash]
403
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
404
+ #
405
+ # @overload list_quota_preferences(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
406
+ # Pass arguments to `list_quota_preferences` via keyword arguments. Note that at
407
+ # least one keyword argument is required. To specify no parameters, or to keep all
408
+ # the default parameter values, pass an empty Hash as a request object (see above).
409
+ #
410
+ # @param parent [::String]
411
+ # Required. Parent value of QuotaPreference resources.
412
+ # Listing across different resource containers (such as 'projects/-') is not
413
+ # allowed.
414
+ #
415
+ # When the value starts with 'folders' or 'organizations', it lists the
416
+ # QuotaPreferences for org quotas in the container. It does not list the
417
+ # QuotaPreferences in the descendant projects of the container.
418
+ #
419
+ # Example parents:
420
+ # `projects/123/locations/global`
421
+ # @param page_size [::Integer]
422
+ # Optional. Requested page size. Server may return fewer items than
423
+ # requested. If unspecified, server will pick an appropriate default.
424
+ # @param page_token [::String]
425
+ # Optional. A token identifying a page of results the server should return.
426
+ # @param filter [::String]
427
+ # Optional. Filter result QuotaPreferences by their state, type,
428
+ # create/update time range.
429
+ #
430
+ # Example filters:
431
+ # `reconciling=true AND request_type=CLOUD_CONSOLE`,
432
+ # `reconciling=true OR creation_time>2022-12-03T10:30:00`
433
+ # @param order_by [::String]
434
+ # Optional. How to order of the results. By default, the results are ordered
435
+ # by create time.
436
+ #
437
+ # Example orders:
438
+ # `quota_id`,
439
+ # `service, create_time`
440
+ # @yield [result, operation] Access the result along with the TransportOperation object
441
+ # @yieldparam result [::Google::Cloud::CloudQuotas::V1beta::ListQuotaPreferencesResponse]
442
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
443
+ #
444
+ # @return [::Google::Cloud::CloudQuotas::V1beta::ListQuotaPreferencesResponse]
445
+ #
446
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
447
+ #
448
+ # @example Basic example
449
+ # require "google/cloud/cloud_quotas/v1beta"
450
+ #
451
+ # # Create a client object. The client can be reused for multiple calls.
452
+ # client = Google::Cloud::CloudQuotas::V1beta::CloudQuotas::Rest::Client.new
453
+ #
454
+ # # Create a request. To set request fields, pass in keyword arguments.
455
+ # request = Google::Cloud::CloudQuotas::V1beta::ListQuotaPreferencesRequest.new
456
+ #
457
+ # # Call the list_quota_preferences method.
458
+ # result = client.list_quota_preferences request
459
+ #
460
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
461
+ # # over elements, and API calls will be issued to fetch pages as needed.
462
+ # result.each do |item|
463
+ # # Each element is of type ::Google::Cloud::CloudQuotas::V1beta::QuotaPreference.
464
+ # p item
465
+ # end
466
+ #
467
+ def list_quota_preferences request, options = nil
468
+ raise ::ArgumentError, "request must be provided" if request.nil?
469
+
470
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudQuotas::V1beta::ListQuotaPreferencesRequest
471
+
472
+ # Converts hash and nil to an options object
473
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
474
+
475
+ # Customize the options with defaults
476
+ call_metadata = @config.rpcs.list_quota_preferences.metadata.to_h
477
+
478
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
479
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
480
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
481
+ gapic_version: ::Google::Cloud::CloudQuotas::V1beta::VERSION,
482
+ transports_version_send: [:rest]
483
+
484
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
485
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
486
+
487
+ options.apply_defaults timeout: @config.rpcs.list_quota_preferences.timeout,
488
+ metadata: call_metadata,
489
+ retry_policy: @config.rpcs.list_quota_preferences.retry_policy
490
+
491
+ options.apply_defaults timeout: @config.timeout,
492
+ metadata: @config.metadata,
493
+ retry_policy: @config.retry_policy
494
+
495
+ @cloud_quotas_stub.list_quota_preferences request, options do |result, operation|
496
+ yield result, operation if block_given?
497
+ end
498
+ rescue ::Gapic::Rest::Error => e
499
+ raise ::Google::Cloud::Error.from_error(e)
500
+ end
501
+
502
+ ##
503
+ # Gets details of a single QuotaPreference.
504
+ #
505
+ # @overload get_quota_preference(request, options = nil)
506
+ # Pass arguments to `get_quota_preference` via a request object, either of type
507
+ # {::Google::Cloud::CloudQuotas::V1beta::GetQuotaPreferenceRequest} or an equivalent Hash.
508
+ #
509
+ # @param request [::Google::Cloud::CloudQuotas::V1beta::GetQuotaPreferenceRequest, ::Hash]
510
+ # A request object representing the call parameters. Required. To specify no
511
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
512
+ # @param options [::Gapic::CallOptions, ::Hash]
513
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
514
+ #
515
+ # @overload get_quota_preference(name: nil)
516
+ # Pass arguments to `get_quota_preference` via keyword arguments. Note that at
517
+ # least one keyword argument is required. To specify no parameters, or to keep all
518
+ # the default parameter values, pass an empty Hash as a request object (see above).
519
+ #
520
+ # @param name [::String]
521
+ # Required. Name of the resource
522
+ #
523
+ # Example name:
524
+ # `projects/123/locations/global/quota_preferences/my-config-for-us-east1`
525
+ # @yield [result, operation] Access the result along with the TransportOperation object
526
+ # @yieldparam result [::Google::Cloud::CloudQuotas::V1beta::QuotaPreference]
527
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
528
+ #
529
+ # @return [::Google::Cloud::CloudQuotas::V1beta::QuotaPreference]
530
+ #
531
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
532
+ #
533
+ # @example Basic example
534
+ # require "google/cloud/cloud_quotas/v1beta"
535
+ #
536
+ # # Create a client object. The client can be reused for multiple calls.
537
+ # client = Google::Cloud::CloudQuotas::V1beta::CloudQuotas::Rest::Client.new
538
+ #
539
+ # # Create a request. To set request fields, pass in keyword arguments.
540
+ # request = Google::Cloud::CloudQuotas::V1beta::GetQuotaPreferenceRequest.new
541
+ #
542
+ # # Call the get_quota_preference method.
543
+ # result = client.get_quota_preference request
544
+ #
545
+ # # The returned object is of type Google::Cloud::CloudQuotas::V1beta::QuotaPreference.
546
+ # p result
547
+ #
548
+ def get_quota_preference request, options = nil
549
+ raise ::ArgumentError, "request must be provided" if request.nil?
550
+
551
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudQuotas::V1beta::GetQuotaPreferenceRequest
552
+
553
+ # Converts hash and nil to an options object
554
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
555
+
556
+ # Customize the options with defaults
557
+ call_metadata = @config.rpcs.get_quota_preference.metadata.to_h
558
+
559
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
560
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
561
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
562
+ gapic_version: ::Google::Cloud::CloudQuotas::V1beta::VERSION,
563
+ transports_version_send: [:rest]
564
+
565
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
566
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
567
+
568
+ options.apply_defaults timeout: @config.rpcs.get_quota_preference.timeout,
569
+ metadata: call_metadata,
570
+ retry_policy: @config.rpcs.get_quota_preference.retry_policy
571
+
572
+ options.apply_defaults timeout: @config.timeout,
573
+ metadata: @config.metadata,
574
+ retry_policy: @config.retry_policy
575
+
576
+ @cloud_quotas_stub.get_quota_preference request, options do |result, operation|
577
+ yield result, operation if block_given?
578
+ end
579
+ rescue ::Gapic::Rest::Error => e
580
+ raise ::Google::Cloud::Error.from_error(e)
581
+ end
582
+
583
+ ##
584
+ # Creates a new QuotaPreference that declares the desired value for a quota.
585
+ #
586
+ # @overload create_quota_preference(request, options = nil)
587
+ # Pass arguments to `create_quota_preference` via a request object, either of type
588
+ # {::Google::Cloud::CloudQuotas::V1beta::CreateQuotaPreferenceRequest} or an equivalent Hash.
589
+ #
590
+ # @param request [::Google::Cloud::CloudQuotas::V1beta::CreateQuotaPreferenceRequest, ::Hash]
591
+ # A request object representing the call parameters. Required. To specify no
592
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
593
+ # @param options [::Gapic::CallOptions, ::Hash]
594
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
595
+ #
596
+ # @overload create_quota_preference(parent: nil, quota_preference_id: nil, quota_preference: nil, ignore_safety_checks: nil)
597
+ # Pass arguments to `create_quota_preference` via keyword arguments. Note that at
598
+ # least one keyword argument is required. To specify no parameters, or to keep all
599
+ # the default parameter values, pass an empty Hash as a request object (see above).
600
+ #
601
+ # @param parent [::String]
602
+ # Required. Value for parent.
603
+ #
604
+ # Example:
605
+ # `projects/123/locations/global`
606
+ # @param quota_preference_id [::String]
607
+ # Optional. Id of the requesting object, must be unique under its parent.
608
+ # If client does not set this field, the service will generate one.
609
+ # @param quota_preference [::Google::Cloud::CloudQuotas::V1beta::QuotaPreference, ::Hash]
610
+ # Required. The resource being created
611
+ # @param ignore_safety_checks [::Array<::Google::Cloud::CloudQuotas::V1beta::QuotaSafetyCheck>]
612
+ # The list of quota safety checks to be ignored.
613
+ # @yield [result, operation] Access the result along with the TransportOperation object
614
+ # @yieldparam result [::Google::Cloud::CloudQuotas::V1beta::QuotaPreference]
615
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
616
+ #
617
+ # @return [::Google::Cloud::CloudQuotas::V1beta::QuotaPreference]
618
+ #
619
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
620
+ #
621
+ # @example Basic example
622
+ # require "google/cloud/cloud_quotas/v1beta"
623
+ #
624
+ # # Create a client object. The client can be reused for multiple calls.
625
+ # client = Google::Cloud::CloudQuotas::V1beta::CloudQuotas::Rest::Client.new
626
+ #
627
+ # # Create a request. To set request fields, pass in keyword arguments.
628
+ # request = Google::Cloud::CloudQuotas::V1beta::CreateQuotaPreferenceRequest.new
629
+ #
630
+ # # Call the create_quota_preference method.
631
+ # result = client.create_quota_preference request
632
+ #
633
+ # # The returned object is of type Google::Cloud::CloudQuotas::V1beta::QuotaPreference.
634
+ # p result
635
+ #
636
+ def create_quota_preference request, options = nil
637
+ raise ::ArgumentError, "request must be provided" if request.nil?
638
+
639
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudQuotas::V1beta::CreateQuotaPreferenceRequest
640
+
641
+ # Converts hash and nil to an options object
642
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
643
+
644
+ # Customize the options with defaults
645
+ call_metadata = @config.rpcs.create_quota_preference.metadata.to_h
646
+
647
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
648
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
649
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
650
+ gapic_version: ::Google::Cloud::CloudQuotas::V1beta::VERSION,
651
+ transports_version_send: [:rest]
652
+
653
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
654
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
655
+
656
+ options.apply_defaults timeout: @config.rpcs.create_quota_preference.timeout,
657
+ metadata: call_metadata,
658
+ retry_policy: @config.rpcs.create_quota_preference.retry_policy
659
+
660
+ options.apply_defaults timeout: @config.timeout,
661
+ metadata: @config.metadata,
662
+ retry_policy: @config.retry_policy
663
+
664
+ @cloud_quotas_stub.create_quota_preference request, options do |result, operation|
665
+ yield result, operation if block_given?
666
+ end
667
+ rescue ::Gapic::Rest::Error => e
668
+ raise ::Google::Cloud::Error.from_error(e)
669
+ end
670
+
671
+ ##
672
+ # Updates the parameters of a single QuotaPreference. It can updates the
673
+ # config in any states, not just the ones pending approval.
674
+ #
675
+ # @overload update_quota_preference(request, options = nil)
676
+ # Pass arguments to `update_quota_preference` via a request object, either of type
677
+ # {::Google::Cloud::CloudQuotas::V1beta::UpdateQuotaPreferenceRequest} or an equivalent Hash.
678
+ #
679
+ # @param request [::Google::Cloud::CloudQuotas::V1beta::UpdateQuotaPreferenceRequest, ::Hash]
680
+ # A request object representing the call parameters. Required. To specify no
681
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
682
+ # @param options [::Gapic::CallOptions, ::Hash]
683
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
684
+ #
685
+ # @overload update_quota_preference(update_mask: nil, quota_preference: nil, allow_missing: nil, validate_only: nil, ignore_safety_checks: nil)
686
+ # Pass arguments to `update_quota_preference` via keyword arguments. Note that at
687
+ # least one keyword argument is required. To specify no parameters, or to keep all
688
+ # the default parameter values, pass an empty Hash as a request object (see above).
689
+ #
690
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
691
+ # Optional. Field mask is used to specify the fields to be overwritten in the
692
+ # QuotaPreference resource by the update.
693
+ # The fields specified in the update_mask are relative to the resource, not
694
+ # the full request. A field will be overwritten if it is in the mask. If the
695
+ # user does not provide a mask then all fields will be overwritten.
696
+ # @param quota_preference [::Google::Cloud::CloudQuotas::V1beta::QuotaPreference, ::Hash]
697
+ # Required. The resource being updated
698
+ # @param allow_missing [::Boolean]
699
+ # Optional. If set to true, and the quota preference is not found, a new one
700
+ # will be created. In this situation, `update_mask` is ignored.
701
+ # @param validate_only [::Boolean]
702
+ # Optional. If set to true, validate the request, but do not actually update.
703
+ # Note that a request being valid does not mean that the request is
704
+ # guaranteed to be fulfilled.
705
+ # @param ignore_safety_checks [::Array<::Google::Cloud::CloudQuotas::V1beta::QuotaSafetyCheck>]
706
+ # The list of quota safety checks to be ignored.
707
+ # @yield [result, operation] Access the result along with the TransportOperation object
708
+ # @yieldparam result [::Google::Cloud::CloudQuotas::V1beta::QuotaPreference]
709
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
710
+ #
711
+ # @return [::Google::Cloud::CloudQuotas::V1beta::QuotaPreference]
712
+ #
713
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
714
+ #
715
+ # @example Basic example
716
+ # require "google/cloud/cloud_quotas/v1beta"
717
+ #
718
+ # # Create a client object. The client can be reused for multiple calls.
719
+ # client = Google::Cloud::CloudQuotas::V1beta::CloudQuotas::Rest::Client.new
720
+ #
721
+ # # Create a request. To set request fields, pass in keyword arguments.
722
+ # request = Google::Cloud::CloudQuotas::V1beta::UpdateQuotaPreferenceRequest.new
723
+ #
724
+ # # Call the update_quota_preference method.
725
+ # result = client.update_quota_preference request
726
+ #
727
+ # # The returned object is of type Google::Cloud::CloudQuotas::V1beta::QuotaPreference.
728
+ # p result
729
+ #
730
+ def update_quota_preference request, options = nil
731
+ raise ::ArgumentError, "request must be provided" if request.nil?
732
+
733
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudQuotas::V1beta::UpdateQuotaPreferenceRequest
734
+
735
+ # Converts hash and nil to an options object
736
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
737
+
738
+ # Customize the options with defaults
739
+ call_metadata = @config.rpcs.update_quota_preference.metadata.to_h
740
+
741
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
742
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
743
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
744
+ gapic_version: ::Google::Cloud::CloudQuotas::V1beta::VERSION,
745
+ transports_version_send: [:rest]
746
+
747
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
748
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
749
+
750
+ options.apply_defaults timeout: @config.rpcs.update_quota_preference.timeout,
751
+ metadata: call_metadata,
752
+ retry_policy: @config.rpcs.update_quota_preference.retry_policy
753
+
754
+ options.apply_defaults timeout: @config.timeout,
755
+ metadata: @config.metadata,
756
+ retry_policy: @config.retry_policy
757
+
758
+ @cloud_quotas_stub.update_quota_preference request, options do |result, operation|
759
+ yield result, operation if block_given?
760
+ end
761
+ rescue ::Gapic::Rest::Error => e
762
+ raise ::Google::Cloud::Error.from_error(e)
763
+ end
764
+
765
+ ##
766
+ # Configuration class for the CloudQuotas REST API.
767
+ #
768
+ # This class represents the configuration for CloudQuotas REST,
769
+ # providing control over timeouts, retry behavior, logging, transport
770
+ # parameters, and other low-level controls. Certain parameters can also be
771
+ # applied individually to specific RPCs. See
772
+ # {::Google::Cloud::CloudQuotas::V1beta::CloudQuotas::Rest::Client::Configuration::Rpcs}
773
+ # for a list of RPCs that can be configured independently.
774
+ #
775
+ # Configuration can be applied globally to all clients, or to a single client
776
+ # on construction.
777
+ #
778
+ # @example
779
+ #
780
+ # # Modify the global config, setting the timeout for
781
+ # # list_quota_infos to 20 seconds,
782
+ # # and all remaining timeouts to 10 seconds.
783
+ # ::Google::Cloud::CloudQuotas::V1beta::CloudQuotas::Rest::Client.configure do |config|
784
+ # config.timeout = 10.0
785
+ # config.rpcs.list_quota_infos.timeout = 20.0
786
+ # end
787
+ #
788
+ # # Apply the above configuration only to a new client.
789
+ # client = ::Google::Cloud::CloudQuotas::V1beta::CloudQuotas::Rest::Client.new do |config|
790
+ # config.timeout = 10.0
791
+ # config.rpcs.list_quota_infos.timeout = 20.0
792
+ # end
793
+ #
794
+ # @!attribute [rw] endpoint
795
+ # A custom service endpoint, as a hostname or hostname:port. The default is
796
+ # nil, indicating to use the default endpoint in the current universe domain.
797
+ # @return [::String,nil]
798
+ # @!attribute [rw] credentials
799
+ # Credentials to send with calls. You may provide any of the following types:
800
+ # * (`String`) The path to a service account key file in JSON format
801
+ # * (`Hash`) A service account key as a Hash
802
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
803
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
804
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
805
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
806
+ # * (`nil`) indicating no credentials
807
+ # @return [::Object]
808
+ # @!attribute [rw] scope
809
+ # The OAuth scopes
810
+ # @return [::Array<::String>]
811
+ # @!attribute [rw] lib_name
812
+ # The library name as recorded in instrumentation and logging
813
+ # @return [::String]
814
+ # @!attribute [rw] lib_version
815
+ # The library version as recorded in instrumentation and logging
816
+ # @return [::String]
817
+ # @!attribute [rw] timeout
818
+ # The call timeout in seconds.
819
+ # @return [::Numeric]
820
+ # @!attribute [rw] metadata
821
+ # Additional headers to be sent with the call.
822
+ # @return [::Hash{::Symbol=>::String}]
823
+ # @!attribute [rw] retry_policy
824
+ # The retry policy. The value is a hash with the following keys:
825
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
826
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
827
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
828
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
829
+ # trigger a retry.
830
+ # @return [::Hash]
831
+ # @!attribute [rw] quota_project
832
+ # A separate project against which to charge quota.
833
+ # @return [::String]
834
+ # @!attribute [rw] universe_domain
835
+ # The universe domain within which to make requests. This determines the
836
+ # default endpoint URL. The default value of nil uses the environment
837
+ # universe (usually the default "googleapis.com" universe).
838
+ # @return [::String,nil]
839
+ # @!attribute [rw] logger
840
+ # A custom logger to use for request/response debug logging, or the value
841
+ # `:default` (the default) to construct a default logger, or `nil` to
842
+ # explicitly disable logging.
843
+ # @return [::Logger,:default,nil]
844
+ #
845
+ class Configuration
846
+ extend ::Gapic::Config
847
+
848
+ # @private
849
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
850
+ DEFAULT_ENDPOINT = "cloudquotas.googleapis.com"
851
+
852
+ config_attr :endpoint, nil, ::String, nil
853
+ config_attr :credentials, nil do |value|
854
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
855
+ allowed.any? { |klass| klass === value }
856
+ end
857
+ config_attr :scope, nil, ::String, ::Array, nil
858
+ config_attr :lib_name, nil, ::String, nil
859
+ config_attr :lib_version, nil, ::String, nil
860
+ config_attr :timeout, nil, ::Numeric, nil
861
+ config_attr :metadata, nil, ::Hash, nil
862
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
863
+ config_attr :quota_project, nil, ::String, nil
864
+ config_attr :universe_domain, nil, ::String, nil
865
+ config_attr :logger, :default, ::Logger, nil, :default
866
+
867
+ # @private
868
+ def initialize parent_config = nil
869
+ @parent_config = parent_config unless parent_config.nil?
870
+
871
+ yield self if block_given?
872
+ end
873
+
874
+ ##
875
+ # Configurations for individual RPCs
876
+ # @return [Rpcs]
877
+ #
878
+ def rpcs
879
+ @rpcs ||= begin
880
+ parent_rpcs = nil
881
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
882
+ Rpcs.new parent_rpcs
883
+ end
884
+ end
885
+
886
+ ##
887
+ # Configuration RPC class for the CloudQuotas API.
888
+ #
889
+ # Includes fields providing the configuration for each RPC in this service.
890
+ # Each configuration object is of type `Gapic::Config::Method` and includes
891
+ # the following configuration fields:
892
+ #
893
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
894
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
895
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
896
+ # include the following keys:
897
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
898
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
899
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
900
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
901
+ # trigger a retry.
902
+ #
903
+ class Rpcs
904
+ ##
905
+ # RPC-specific configuration for `list_quota_infos`
906
+ # @return [::Gapic::Config::Method]
907
+ #
908
+ attr_reader :list_quota_infos
909
+ ##
910
+ # RPC-specific configuration for `get_quota_info`
911
+ # @return [::Gapic::Config::Method]
912
+ #
913
+ attr_reader :get_quota_info
914
+ ##
915
+ # RPC-specific configuration for `list_quota_preferences`
916
+ # @return [::Gapic::Config::Method]
917
+ #
918
+ attr_reader :list_quota_preferences
919
+ ##
920
+ # RPC-specific configuration for `get_quota_preference`
921
+ # @return [::Gapic::Config::Method]
922
+ #
923
+ attr_reader :get_quota_preference
924
+ ##
925
+ # RPC-specific configuration for `create_quota_preference`
926
+ # @return [::Gapic::Config::Method]
927
+ #
928
+ attr_reader :create_quota_preference
929
+ ##
930
+ # RPC-specific configuration for `update_quota_preference`
931
+ # @return [::Gapic::Config::Method]
932
+ #
933
+ attr_reader :update_quota_preference
934
+
935
+ # @private
936
+ def initialize parent_rpcs = nil
937
+ list_quota_infos_config = parent_rpcs.list_quota_infos if parent_rpcs.respond_to? :list_quota_infos
938
+ @list_quota_infos = ::Gapic::Config::Method.new list_quota_infos_config
939
+ get_quota_info_config = parent_rpcs.get_quota_info if parent_rpcs.respond_to? :get_quota_info
940
+ @get_quota_info = ::Gapic::Config::Method.new get_quota_info_config
941
+ list_quota_preferences_config = parent_rpcs.list_quota_preferences if parent_rpcs.respond_to? :list_quota_preferences
942
+ @list_quota_preferences = ::Gapic::Config::Method.new list_quota_preferences_config
943
+ get_quota_preference_config = parent_rpcs.get_quota_preference if parent_rpcs.respond_to? :get_quota_preference
944
+ @get_quota_preference = ::Gapic::Config::Method.new get_quota_preference_config
945
+ create_quota_preference_config = parent_rpcs.create_quota_preference if parent_rpcs.respond_to? :create_quota_preference
946
+ @create_quota_preference = ::Gapic::Config::Method.new create_quota_preference_config
947
+ update_quota_preference_config = parent_rpcs.update_quota_preference if parent_rpcs.respond_to? :update_quota_preference
948
+ @update_quota_preference = ::Gapic::Config::Method.new update_quota_preference_config
949
+
950
+ yield self if block_given?
951
+ end
952
+ end
953
+ end
954
+ end
955
+ end
956
+ end
957
+ end
958
+ end
959
+ end
960
+ end