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