google-cloud-cloud_quotas-v1beta 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +154 -0
  6. data/lib/google/api/cloudquotas/v1beta/cloudquotas_pb.rb +58 -0
  7. data/lib/google/api/cloudquotas/v1beta/cloudquotas_services_pb.rb +62 -0
  8. data/lib/google/api/cloudquotas/v1beta/quota_adjuster_settings_pb.rb +54 -0
  9. data/lib/google/api/cloudquotas/v1beta/quota_adjuster_settings_services_pb.rb +52 -0
  10. data/lib/google/api/cloudquotas/v1beta/resources_pb.rb +59 -0
  11. data/lib/google/cloud/cloud_quotas/v1beta/cloud_quotas/client.rb +1030 -0
  12. data/lib/google/cloud/cloud_quotas/v1beta/cloud_quotas/credentials.rb +47 -0
  13. data/lib/google/cloud/cloud_quotas/v1beta/cloud_quotas/paths.rb +265 -0
  14. data/lib/google/cloud/cloud_quotas/v1beta/cloud_quotas/rest/client.rb +960 -0
  15. data/lib/google/cloud/cloud_quotas/v1beta/cloud_quotas/rest/service_stub.rb +537 -0
  16. data/lib/google/cloud/cloud_quotas/v1beta/cloud_quotas/rest.rb +58 -0
  17. data/lib/google/cloud/cloud_quotas/v1beta/cloud_quotas.rb +61 -0
  18. data/lib/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager/client.rb +564 -0
  19. data/lib/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager/credentials.rb +47 -0
  20. data/lib/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager/paths.rb +50 -0
  21. data/lib/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager/rest/client.rb +524 -0
  22. data/lib/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager/rest/service_stub.rb +204 -0
  23. data/lib/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager/rest.rb +57 -0
  24. data/lib/google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager.rb +60 -0
  25. data/lib/google/cloud/cloud_quotas/v1beta/rest.rb +38 -0
  26. data/lib/google/cloud/cloud_quotas/v1beta/version.rb +28 -0
  27. data/lib/google/cloud/cloud_quotas/v1beta.rb +46 -0
  28. data/lib/google-cloud-cloud_quotas-v1beta.rb +21 -0
  29. data/proto_docs/README.md +4 -0
  30. data/proto_docs/google/api/client.rb +459 -0
  31. data/proto_docs/google/api/cloudquotas/v1beta/cloudquotas.rb +193 -0
  32. data/proto_docs/google/api/cloudquotas/v1beta/quota_adjuster_settings.rb +89 -0
  33. data/proto_docs/google/api/cloudquotas/v1beta/resources.rb +348 -0
  34. data/proto_docs/google/api/field_behavior.rb +85 -0
  35. data/proto_docs/google/api/launch_stage.rb +71 -0
  36. data/proto_docs/google/api/resource.rb +227 -0
  37. data/proto_docs/google/protobuf/duration.rb +98 -0
  38. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  39. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  40. data/proto_docs/google/protobuf/wrappers.rb +121 -0
  41. metadata +118 -0
@@ -0,0 +1,524 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/api/cloudquotas/v1beta/quota_adjuster_settings_pb"
21
+ require "google/cloud/cloud_quotas/v1beta/quota_adjuster_settings_manager/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module CloudQuotas
26
+ module V1beta
27
+ module QuotaAdjusterSettingsManager
28
+ module Rest
29
+ ##
30
+ # REST client for the QuotaAdjusterSettingsManager service.
31
+ #
32
+ # The Quotas Adjuster Settings API is an infrastructure service for Google
33
+ # Cloud that lets service consumers view and update their quota adjuster
34
+ # settings.
35
+ #
36
+ # - Update quota adjuster settings.
37
+ # - Get the name of the configurations.
38
+ #
39
+ class Client
40
+ # @private
41
+ API_VERSION = ""
42
+
43
+ # @private
44
+ DEFAULT_ENDPOINT_TEMPLATE = "cloudquotas.$UNIVERSE_DOMAIN$"
45
+
46
+ include Paths
47
+
48
+ # @private
49
+ attr_reader :quota_adjuster_settings_manager_stub
50
+
51
+ ##
52
+ # Configure the QuotaAdjusterSettingsManager Client class.
53
+ #
54
+ # See {::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettingsManager::Rest::Client::Configuration}
55
+ # for a description of the configuration fields.
56
+ #
57
+ # @example
58
+ #
59
+ # # Modify the configuration for all QuotaAdjusterSettingsManager clients
60
+ # ::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettingsManager::Rest::Client.configure do |config|
61
+ # config.timeout = 10.0
62
+ # end
63
+ #
64
+ # @yield [config] Configure the Client client.
65
+ # @yieldparam config [Client::Configuration]
66
+ #
67
+ # @return [Client::Configuration]
68
+ #
69
+ def self.configure
70
+ @configure ||= begin
71
+ namespace = ["Google", "Cloud", "CloudQuotas", "V1beta"]
72
+ parent_config = while namespace.any?
73
+ parent_name = namespace.join "::"
74
+ parent_const = const_get parent_name
75
+ break parent_const.configure if parent_const.respond_to? :configure
76
+ namespace.pop
77
+ end
78
+ default_config = Client::Configuration.new parent_config
79
+
80
+ default_config.rpcs.update_quota_adjuster_settings.timeout = 60.0
81
+ default_config.rpcs.update_quota_adjuster_settings.retry_policy = {
82
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
83
+ }
84
+
85
+ default_config.rpcs.get_quota_adjuster_settings.timeout = 60.0
86
+ default_config.rpcs.get_quota_adjuster_settings.retry_policy = {
87
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
88
+ }
89
+
90
+ default_config
91
+ end
92
+ yield @configure if block_given?
93
+ @configure
94
+ end
95
+
96
+ ##
97
+ # Configure the QuotaAdjusterSettingsManager Client instance.
98
+ #
99
+ # The configuration is set to the derived mode, meaning that values can be changed,
100
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
101
+ # should be made on {Client.configure}.
102
+ #
103
+ # See {::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettingsManager::Rest::Client::Configuration}
104
+ # for a description of the configuration fields.
105
+ #
106
+ # @yield [config] Configure the Client client.
107
+ # @yieldparam config [Client::Configuration]
108
+ #
109
+ # @return [Client::Configuration]
110
+ #
111
+ def configure
112
+ yield @config if block_given?
113
+ @config
114
+ end
115
+
116
+ ##
117
+ # The effective universe domain
118
+ #
119
+ # @return [String]
120
+ #
121
+ def universe_domain
122
+ @quota_adjuster_settings_manager_stub.universe_domain
123
+ end
124
+
125
+ ##
126
+ # Create a new QuotaAdjusterSettingsManager REST client object.
127
+ #
128
+ # @example
129
+ #
130
+ # # Create a client using the default configuration
131
+ # client = ::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettingsManager::Rest::Client.new
132
+ #
133
+ # # Create a client using a custom configuration
134
+ # client = ::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettingsManager::Rest::Client.new do |config|
135
+ # config.timeout = 10.0
136
+ # end
137
+ #
138
+ # @yield [config] Configure the QuotaAdjusterSettingsManager client.
139
+ # @yieldparam config [Client::Configuration]
140
+ #
141
+ def initialize
142
+ # Create the configuration object
143
+ @config = Configuration.new Client.configure
144
+
145
+ # Yield the configuration if needed
146
+ yield @config if block_given?
147
+
148
+ # Create credentials
149
+ credentials = @config.credentials
150
+ # Use self-signed JWT if the endpoint is unchanged from default,
151
+ # but only if the default endpoint does not have a region prefix.
152
+ enable_self_signed_jwt = @config.endpoint.nil? ||
153
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
154
+ !@config.endpoint.split(".").first.include?("-"))
155
+ credentials ||= Credentials.default scope: @config.scope,
156
+ enable_self_signed_jwt: enable_self_signed_jwt
157
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
158
+ credentials = Credentials.new credentials, scope: @config.scope
159
+ end
160
+
161
+ @quota_project_id = @config.quota_project
162
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
163
+
164
+ @quota_adjuster_settings_manager_stub = ::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettingsManager::Rest::ServiceStub.new(
165
+ endpoint: @config.endpoint,
166
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
167
+ universe_domain: @config.universe_domain,
168
+ credentials: credentials,
169
+ logger: @config.logger
170
+ )
171
+
172
+ @quota_adjuster_settings_manager_stub.logger(stub: true)&.info do |entry|
173
+ entry.set_system_name
174
+ entry.set_service
175
+ entry.message = "Created client for #{entry.service}"
176
+ entry.set_credentials_fields credentials
177
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
178
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
179
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
180
+ end
181
+ end
182
+
183
+ ##
184
+ # The logger used for request/response debug logging.
185
+ #
186
+ # @return [Logger]
187
+ #
188
+ def logger
189
+ @quota_adjuster_settings_manager_stub.logger
190
+ end
191
+
192
+ # Service calls
193
+
194
+ ##
195
+ # RPC Method for updating QuotaAdjusterSettings based on the request
196
+ #
197
+ # @overload update_quota_adjuster_settings(request, options = nil)
198
+ # Pass arguments to `update_quota_adjuster_settings` via a request object, either of type
199
+ # {::Google::Cloud::CloudQuotas::V1beta::UpdateQuotaAdjusterSettingsRequest} or an equivalent Hash.
200
+ #
201
+ # @param request [::Google::Cloud::CloudQuotas::V1beta::UpdateQuotaAdjusterSettingsRequest, ::Hash]
202
+ # A request object representing the call parameters. Required. To specify no
203
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
204
+ # @param options [::Gapic::CallOptions, ::Hash]
205
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
206
+ #
207
+ # @overload update_quota_adjuster_settings(quota_adjuster_settings: nil, update_mask: nil, validate_only: nil)
208
+ # Pass arguments to `update_quota_adjuster_settings` via keyword arguments. Note that at
209
+ # least one keyword argument is required. To specify no parameters, or to keep all
210
+ # the default parameter values, pass an empty Hash as a request object (see above).
211
+ #
212
+ # @param quota_adjuster_settings [::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettings, ::Hash]
213
+ # Required. The QuotaAdjusterSettings to update.
214
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
215
+ # Optional. The list of fields to update.
216
+ # @param validate_only [::Boolean]
217
+ # Optional. If set to true, validate the request, but do not actually update.
218
+ # Note that a request being valid does not mean that the request is
219
+ # guaranteed to be fulfilled.
220
+ # @yield [result, operation] Access the result along with the TransportOperation object
221
+ # @yieldparam result [::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettings]
222
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
223
+ #
224
+ # @return [::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettings]
225
+ #
226
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
227
+ #
228
+ # @example Basic example
229
+ # require "google/cloud/cloud_quotas/v1beta"
230
+ #
231
+ # # Create a client object. The client can be reused for multiple calls.
232
+ # client = Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettingsManager::Rest::Client.new
233
+ #
234
+ # # Create a request. To set request fields, pass in keyword arguments.
235
+ # request = Google::Cloud::CloudQuotas::V1beta::UpdateQuotaAdjusterSettingsRequest.new
236
+ #
237
+ # # Call the update_quota_adjuster_settings method.
238
+ # result = client.update_quota_adjuster_settings request
239
+ #
240
+ # # The returned object is of type Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettings.
241
+ # p result
242
+ #
243
+ def update_quota_adjuster_settings request, options = nil
244
+ raise ::ArgumentError, "request must be provided" if request.nil?
245
+
246
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudQuotas::V1beta::UpdateQuotaAdjusterSettingsRequest
247
+
248
+ # Converts hash and nil to an options object
249
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
250
+
251
+ # Customize the options with defaults
252
+ call_metadata = @config.rpcs.update_quota_adjuster_settings.metadata.to_h
253
+
254
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
255
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
256
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
257
+ gapic_version: ::Google::Cloud::CloudQuotas::V1beta::VERSION,
258
+ transports_version_send: [:rest]
259
+
260
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
261
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
262
+
263
+ options.apply_defaults timeout: @config.rpcs.update_quota_adjuster_settings.timeout,
264
+ metadata: call_metadata,
265
+ retry_policy: @config.rpcs.update_quota_adjuster_settings.retry_policy
266
+
267
+ options.apply_defaults timeout: @config.timeout,
268
+ metadata: @config.metadata,
269
+ retry_policy: @config.retry_policy
270
+
271
+ @quota_adjuster_settings_manager_stub.update_quota_adjuster_settings request, options do |result, operation|
272
+ yield result, operation if block_given?
273
+ end
274
+ rescue ::Gapic::Rest::Error => e
275
+ raise ::Google::Cloud::Error.from_error(e)
276
+ end
277
+
278
+ ##
279
+ # RPC Method for getting QuotaAdjusterSettings based on the request
280
+ #
281
+ # @overload get_quota_adjuster_settings(request, options = nil)
282
+ # Pass arguments to `get_quota_adjuster_settings` via a request object, either of type
283
+ # {::Google::Cloud::CloudQuotas::V1beta::GetQuotaAdjusterSettingsRequest} or an equivalent Hash.
284
+ #
285
+ # @param request [::Google::Cloud::CloudQuotas::V1beta::GetQuotaAdjusterSettingsRequest, ::Hash]
286
+ # A request object representing the call parameters. Required. To specify no
287
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
288
+ # @param options [::Gapic::CallOptions, ::Hash]
289
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
290
+ #
291
+ # @overload get_quota_adjuster_settings(name: nil)
292
+ # Pass arguments to `get_quota_adjuster_settings` via keyword arguments. Note that at
293
+ # least one keyword argument is required. To specify no parameters, or to keep all
294
+ # the default parameter values, pass an empty Hash as a request object (see above).
295
+ #
296
+ # @param name [::String]
297
+ # Required. Name of the config. Required to be “settings”, as only a single
298
+ # setting per container will be supported initially.
299
+ # @yield [result, operation] Access the result along with the TransportOperation object
300
+ # @yieldparam result [::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettings]
301
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
302
+ #
303
+ # @return [::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettings]
304
+ #
305
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
306
+ #
307
+ # @example Basic example
308
+ # require "google/cloud/cloud_quotas/v1beta"
309
+ #
310
+ # # Create a client object. The client can be reused for multiple calls.
311
+ # client = Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettingsManager::Rest::Client.new
312
+ #
313
+ # # Create a request. To set request fields, pass in keyword arguments.
314
+ # request = Google::Cloud::CloudQuotas::V1beta::GetQuotaAdjusterSettingsRequest.new
315
+ #
316
+ # # Call the get_quota_adjuster_settings method.
317
+ # result = client.get_quota_adjuster_settings request
318
+ #
319
+ # # The returned object is of type Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettings.
320
+ # p result
321
+ #
322
+ def get_quota_adjuster_settings request, options = nil
323
+ raise ::ArgumentError, "request must be provided" if request.nil?
324
+
325
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudQuotas::V1beta::GetQuotaAdjusterSettingsRequest
326
+
327
+ # Converts hash and nil to an options object
328
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
329
+
330
+ # Customize the options with defaults
331
+ call_metadata = @config.rpcs.get_quota_adjuster_settings.metadata.to_h
332
+
333
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
334
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
335
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
336
+ gapic_version: ::Google::Cloud::CloudQuotas::V1beta::VERSION,
337
+ transports_version_send: [:rest]
338
+
339
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
340
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
341
+
342
+ options.apply_defaults timeout: @config.rpcs.get_quota_adjuster_settings.timeout,
343
+ metadata: call_metadata,
344
+ retry_policy: @config.rpcs.get_quota_adjuster_settings.retry_policy
345
+
346
+ options.apply_defaults timeout: @config.timeout,
347
+ metadata: @config.metadata,
348
+ retry_policy: @config.retry_policy
349
+
350
+ @quota_adjuster_settings_manager_stub.get_quota_adjuster_settings request, options do |result, operation|
351
+ yield result, operation if block_given?
352
+ end
353
+ rescue ::Gapic::Rest::Error => e
354
+ raise ::Google::Cloud::Error.from_error(e)
355
+ end
356
+
357
+ ##
358
+ # Configuration class for the QuotaAdjusterSettingsManager REST API.
359
+ #
360
+ # This class represents the configuration for QuotaAdjusterSettingsManager REST,
361
+ # providing control over timeouts, retry behavior, logging, transport
362
+ # parameters, and other low-level controls. Certain parameters can also be
363
+ # applied individually to specific RPCs. See
364
+ # {::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettingsManager::Rest::Client::Configuration::Rpcs}
365
+ # for a list of RPCs that can be configured independently.
366
+ #
367
+ # Configuration can be applied globally to all clients, or to a single client
368
+ # on construction.
369
+ #
370
+ # @example
371
+ #
372
+ # # Modify the global config, setting the timeout for
373
+ # # update_quota_adjuster_settings to 20 seconds,
374
+ # # and all remaining timeouts to 10 seconds.
375
+ # ::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettingsManager::Rest::Client.configure do |config|
376
+ # config.timeout = 10.0
377
+ # config.rpcs.update_quota_adjuster_settings.timeout = 20.0
378
+ # end
379
+ #
380
+ # # Apply the above configuration only to a new client.
381
+ # client = ::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettingsManager::Rest::Client.new do |config|
382
+ # config.timeout = 10.0
383
+ # config.rpcs.update_quota_adjuster_settings.timeout = 20.0
384
+ # end
385
+ #
386
+ # @!attribute [rw] endpoint
387
+ # A custom service endpoint, as a hostname or hostname:port. The default is
388
+ # nil, indicating to use the default endpoint in the current universe domain.
389
+ # @return [::String,nil]
390
+ # @!attribute [rw] credentials
391
+ # Credentials to send with calls. You may provide any of the following types:
392
+ # * (`String`) The path to a service account key file in JSON format
393
+ # * (`Hash`) A service account key as a Hash
394
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
395
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
396
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
397
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
398
+ # * (`nil`) indicating no credentials
399
+ # @return [::Object]
400
+ # @!attribute [rw] scope
401
+ # The OAuth scopes
402
+ # @return [::Array<::String>]
403
+ # @!attribute [rw] lib_name
404
+ # The library name as recorded in instrumentation and logging
405
+ # @return [::String]
406
+ # @!attribute [rw] lib_version
407
+ # The library version as recorded in instrumentation and logging
408
+ # @return [::String]
409
+ # @!attribute [rw] timeout
410
+ # The call timeout in seconds.
411
+ # @return [::Numeric]
412
+ # @!attribute [rw] metadata
413
+ # Additional headers to be sent with the call.
414
+ # @return [::Hash{::Symbol=>::String}]
415
+ # @!attribute [rw] retry_policy
416
+ # The retry policy. The value is a hash with the following keys:
417
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
418
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
419
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
420
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
421
+ # trigger a retry.
422
+ # @return [::Hash]
423
+ # @!attribute [rw] quota_project
424
+ # A separate project against which to charge quota.
425
+ # @return [::String]
426
+ # @!attribute [rw] universe_domain
427
+ # The universe domain within which to make requests. This determines the
428
+ # default endpoint URL. The default value of nil uses the environment
429
+ # universe (usually the default "googleapis.com" universe).
430
+ # @return [::String,nil]
431
+ # @!attribute [rw] logger
432
+ # A custom logger to use for request/response debug logging, or the value
433
+ # `:default` (the default) to construct a default logger, or `nil` to
434
+ # explicitly disable logging.
435
+ # @return [::Logger,:default,nil]
436
+ #
437
+ class Configuration
438
+ extend ::Gapic::Config
439
+
440
+ # @private
441
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
442
+ DEFAULT_ENDPOINT = "cloudquotas.googleapis.com"
443
+
444
+ config_attr :endpoint, nil, ::String, nil
445
+ config_attr :credentials, nil do |value|
446
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
447
+ allowed.any? { |klass| klass === value }
448
+ end
449
+ config_attr :scope, nil, ::String, ::Array, nil
450
+ config_attr :lib_name, nil, ::String, nil
451
+ config_attr :lib_version, nil, ::String, nil
452
+ config_attr :timeout, nil, ::Numeric, nil
453
+ config_attr :metadata, nil, ::Hash, nil
454
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
455
+ config_attr :quota_project, nil, ::String, nil
456
+ config_attr :universe_domain, nil, ::String, nil
457
+ config_attr :logger, :default, ::Logger, nil, :default
458
+
459
+ # @private
460
+ def initialize parent_config = nil
461
+ @parent_config = parent_config unless parent_config.nil?
462
+
463
+ yield self if block_given?
464
+ end
465
+
466
+ ##
467
+ # Configurations for individual RPCs
468
+ # @return [Rpcs]
469
+ #
470
+ def rpcs
471
+ @rpcs ||= begin
472
+ parent_rpcs = nil
473
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
474
+ Rpcs.new parent_rpcs
475
+ end
476
+ end
477
+
478
+ ##
479
+ # Configuration RPC class for the QuotaAdjusterSettingsManager API.
480
+ #
481
+ # Includes fields providing the configuration for each RPC in this service.
482
+ # Each configuration object is of type `Gapic::Config::Method` and includes
483
+ # the following configuration fields:
484
+ #
485
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
486
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
487
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
488
+ # include the following keys:
489
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
490
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
491
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
492
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
493
+ # trigger a retry.
494
+ #
495
+ class Rpcs
496
+ ##
497
+ # RPC-specific configuration for `update_quota_adjuster_settings`
498
+ # @return [::Gapic::Config::Method]
499
+ #
500
+ attr_reader :update_quota_adjuster_settings
501
+ ##
502
+ # RPC-specific configuration for `get_quota_adjuster_settings`
503
+ # @return [::Gapic::Config::Method]
504
+ #
505
+ attr_reader :get_quota_adjuster_settings
506
+
507
+ # @private
508
+ def initialize parent_rpcs = nil
509
+ update_quota_adjuster_settings_config = parent_rpcs.update_quota_adjuster_settings if parent_rpcs.respond_to? :update_quota_adjuster_settings
510
+ @update_quota_adjuster_settings = ::Gapic::Config::Method.new update_quota_adjuster_settings_config
511
+ get_quota_adjuster_settings_config = parent_rpcs.get_quota_adjuster_settings if parent_rpcs.respond_to? :get_quota_adjuster_settings
512
+ @get_quota_adjuster_settings = ::Gapic::Config::Method.new get_quota_adjuster_settings_config
513
+
514
+ yield self if block_given?
515
+ end
516
+ end
517
+ end
518
+ end
519
+ end
520
+ end
521
+ end
522
+ end
523
+ end
524
+ end