google-cloud-cloud_quotas-v1 0.a → 0.1.0

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