google-cloud-cloud_quotas-v1beta 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,564 @@
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
+
22
+ module Google
23
+ module Cloud
24
+ module CloudQuotas
25
+ module V1beta
26
+ module QuotaAdjusterSettingsManager
27
+ ##
28
+ # Client for the QuotaAdjusterSettingsManager service.
29
+ #
30
+ # The Quotas Adjuster Settings API is an infrastructure service for Google
31
+ # Cloud that lets service consumers view and update their quota adjuster
32
+ # settings.
33
+ #
34
+ # - Update quota adjuster settings.
35
+ # - Get the name of the configurations.
36
+ #
37
+ class Client
38
+ # @private
39
+ API_VERSION = ""
40
+
41
+ # @private
42
+ DEFAULT_ENDPOINT_TEMPLATE = "cloudquotas.$UNIVERSE_DOMAIN$"
43
+
44
+ include Paths
45
+
46
+ # @private
47
+ attr_reader :quota_adjuster_settings_manager_stub
48
+
49
+ ##
50
+ # Configure the QuotaAdjusterSettingsManager Client class.
51
+ #
52
+ # See {::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettingsManager::Client::Configuration}
53
+ # for a description of the configuration fields.
54
+ #
55
+ # @example
56
+ #
57
+ # # Modify the configuration for all QuotaAdjusterSettingsManager clients
58
+ # ::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettingsManager::Client.configure do |config|
59
+ # config.timeout = 10.0
60
+ # end
61
+ #
62
+ # @yield [config] Configure the Client client.
63
+ # @yieldparam config [Client::Configuration]
64
+ #
65
+ # @return [Client::Configuration]
66
+ #
67
+ def self.configure
68
+ @configure ||= begin
69
+ namespace = ["Google", "Cloud", "CloudQuotas", "V1beta"]
70
+ parent_config = while namespace.any?
71
+ parent_name = namespace.join "::"
72
+ parent_const = const_get parent_name
73
+ break parent_const.configure if parent_const.respond_to? :configure
74
+ namespace.pop
75
+ end
76
+ default_config = Client::Configuration.new parent_config
77
+
78
+ default_config.rpcs.update_quota_adjuster_settings.timeout = 60.0
79
+ default_config.rpcs.update_quota_adjuster_settings.retry_policy = {
80
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
81
+ }
82
+
83
+ default_config.rpcs.get_quota_adjuster_settings.timeout = 60.0
84
+ default_config.rpcs.get_quota_adjuster_settings.retry_policy = {
85
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
86
+ }
87
+
88
+ default_config
89
+ end
90
+ yield @configure if block_given?
91
+ @configure
92
+ end
93
+
94
+ ##
95
+ # Configure the QuotaAdjusterSettingsManager Client instance.
96
+ #
97
+ # The configuration is set to the derived mode, meaning that values can be changed,
98
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
99
+ # should be made on {Client.configure}.
100
+ #
101
+ # See {::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettingsManager::Client::Configuration}
102
+ # for a description of the configuration fields.
103
+ #
104
+ # @yield [config] Configure the Client client.
105
+ # @yieldparam config [Client::Configuration]
106
+ #
107
+ # @return [Client::Configuration]
108
+ #
109
+ def configure
110
+ yield @config if block_given?
111
+ @config
112
+ end
113
+
114
+ ##
115
+ # The effective universe domain
116
+ #
117
+ # @return [String]
118
+ #
119
+ def universe_domain
120
+ @quota_adjuster_settings_manager_stub.universe_domain
121
+ end
122
+
123
+ ##
124
+ # Create a new QuotaAdjusterSettingsManager client object.
125
+ #
126
+ # @example
127
+ #
128
+ # # Create a client using the default configuration
129
+ # client = ::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettingsManager::Client.new
130
+ #
131
+ # # Create a client using a custom configuration
132
+ # client = ::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettingsManager::Client.new do |config|
133
+ # config.timeout = 10.0
134
+ # end
135
+ #
136
+ # @yield [config] Configure the QuotaAdjusterSettingsManager client.
137
+ # @yieldparam config [Client::Configuration]
138
+ #
139
+ def initialize
140
+ # These require statements are intentionally placed here to initialize
141
+ # the gRPC module only when it's required.
142
+ # See https://github.com/googleapis/toolkit/issues/446
143
+ require "gapic/grpc"
144
+ require "google/api/cloudquotas/v1beta/quota_adjuster_settings_services_pb"
145
+
146
+ # Create the configuration object
147
+ @config = Configuration.new Client.configure
148
+
149
+ # Yield the configuration if needed
150
+ yield @config if block_given?
151
+
152
+ # Create credentials
153
+ credentials = @config.credentials
154
+ # Use self-signed JWT if the endpoint is unchanged from default,
155
+ # but only if the default endpoint does not have a region prefix.
156
+ enable_self_signed_jwt = @config.endpoint.nil? ||
157
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
158
+ !@config.endpoint.split(".").first.include?("-"))
159
+ credentials ||= Credentials.default scope: @config.scope,
160
+ enable_self_signed_jwt: enable_self_signed_jwt
161
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
162
+ credentials = Credentials.new credentials, scope: @config.scope
163
+ end
164
+ @quota_project_id = @config.quota_project
165
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
166
+
167
+ @quota_adjuster_settings_manager_stub = ::Gapic::ServiceStub.new(
168
+ ::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettingsManager::Stub,
169
+ credentials: credentials,
170
+ endpoint: @config.endpoint,
171
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
172
+ universe_domain: @config.universe_domain,
173
+ channel_args: @config.channel_args,
174
+ interceptors: @config.interceptors,
175
+ channel_pool_config: @config.channel_pool,
176
+ logger: @config.logger
177
+ )
178
+
179
+ @quota_adjuster_settings_manager_stub.stub_logger&.info do |entry|
180
+ entry.set_system_name
181
+ entry.set_service
182
+ entry.message = "Created client for #{entry.service}"
183
+ entry.set_credentials_fields credentials
184
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
185
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
186
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
187
+ end
188
+ end
189
+
190
+ ##
191
+ # The logger used for request/response debug logging.
192
+ #
193
+ # @return [Logger]
194
+ #
195
+ def logger
196
+ @quota_adjuster_settings_manager_stub.logger
197
+ end
198
+
199
+ # Service calls
200
+
201
+ ##
202
+ # RPC Method for updating QuotaAdjusterSettings based on the request
203
+ #
204
+ # @overload update_quota_adjuster_settings(request, options = nil)
205
+ # Pass arguments to `update_quota_adjuster_settings` via a request object, either of type
206
+ # {::Google::Cloud::CloudQuotas::V1beta::UpdateQuotaAdjusterSettingsRequest} or an equivalent Hash.
207
+ #
208
+ # @param request [::Google::Cloud::CloudQuotas::V1beta::UpdateQuotaAdjusterSettingsRequest, ::Hash]
209
+ # A request object representing the call parameters. Required. To specify no
210
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
211
+ # @param options [::Gapic::CallOptions, ::Hash]
212
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
213
+ #
214
+ # @overload update_quota_adjuster_settings(quota_adjuster_settings: nil, update_mask: nil, validate_only: nil)
215
+ # Pass arguments to `update_quota_adjuster_settings` via keyword arguments. Note that at
216
+ # least one keyword argument is required. To specify no parameters, or to keep all
217
+ # the default parameter values, pass an empty Hash as a request object (see above).
218
+ #
219
+ # @param quota_adjuster_settings [::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettings, ::Hash]
220
+ # Required. The QuotaAdjusterSettings to update.
221
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
222
+ # Optional. The list of fields to update.
223
+ # @param validate_only [::Boolean]
224
+ # Optional. If set to true, validate the request, but do not actually update.
225
+ # Note that a request being valid does not mean that the request is
226
+ # guaranteed to be fulfilled.
227
+ #
228
+ # @yield [response, operation] Access the result along with the RPC operation
229
+ # @yieldparam response [::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettings]
230
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
231
+ #
232
+ # @return [::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettings]
233
+ #
234
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
235
+ #
236
+ # @example Basic example
237
+ # require "google/cloud/cloud_quotas/v1beta"
238
+ #
239
+ # # Create a client object. The client can be reused for multiple calls.
240
+ # client = Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettingsManager::Client.new
241
+ #
242
+ # # Create a request. To set request fields, pass in keyword arguments.
243
+ # request = Google::Cloud::CloudQuotas::V1beta::UpdateQuotaAdjusterSettingsRequest.new
244
+ #
245
+ # # Call the update_quota_adjuster_settings method.
246
+ # result = client.update_quota_adjuster_settings request
247
+ #
248
+ # # The returned object is of type Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettings.
249
+ # p result
250
+ #
251
+ def update_quota_adjuster_settings request, options = nil
252
+ raise ::ArgumentError, "request must be provided" if request.nil?
253
+
254
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudQuotas::V1beta::UpdateQuotaAdjusterSettingsRequest
255
+
256
+ # Converts hash and nil to an options object
257
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
258
+
259
+ # Customize the options with defaults
260
+ metadata = @config.rpcs.update_quota_adjuster_settings.metadata.to_h
261
+
262
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
263
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
264
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
265
+ gapic_version: ::Google::Cloud::CloudQuotas::V1beta::VERSION
266
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
267
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
268
+
269
+ header_params = {}
270
+ if request.quota_adjuster_settings&.name
271
+ header_params["quota_adjuster_settings.name"] = request.quota_adjuster_settings.name
272
+ end
273
+
274
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
275
+ metadata[:"x-goog-request-params"] ||= request_params_header
276
+
277
+ options.apply_defaults timeout: @config.rpcs.update_quota_adjuster_settings.timeout,
278
+ metadata: metadata,
279
+ retry_policy: @config.rpcs.update_quota_adjuster_settings.retry_policy
280
+
281
+ options.apply_defaults timeout: @config.timeout,
282
+ metadata: @config.metadata,
283
+ retry_policy: @config.retry_policy
284
+
285
+ @quota_adjuster_settings_manager_stub.call_rpc :update_quota_adjuster_settings, request, options: options do |response, operation|
286
+ yield response, operation if block_given?
287
+ end
288
+ rescue ::GRPC::BadStatus => e
289
+ raise ::Google::Cloud::Error.from_error(e)
290
+ end
291
+
292
+ ##
293
+ # RPC Method for getting QuotaAdjusterSettings based on the request
294
+ #
295
+ # @overload get_quota_adjuster_settings(request, options = nil)
296
+ # Pass arguments to `get_quota_adjuster_settings` via a request object, either of type
297
+ # {::Google::Cloud::CloudQuotas::V1beta::GetQuotaAdjusterSettingsRequest} or an equivalent Hash.
298
+ #
299
+ # @param request [::Google::Cloud::CloudQuotas::V1beta::GetQuotaAdjusterSettingsRequest, ::Hash]
300
+ # A request object representing the call parameters. Required. To specify no
301
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
302
+ # @param options [::Gapic::CallOptions, ::Hash]
303
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
304
+ #
305
+ # @overload get_quota_adjuster_settings(name: nil)
306
+ # Pass arguments to `get_quota_adjuster_settings` via keyword arguments. Note that at
307
+ # least one keyword argument is required. To specify no parameters, or to keep all
308
+ # the default parameter values, pass an empty Hash as a request object (see above).
309
+ #
310
+ # @param name [::String]
311
+ # Required. Name of the config. Required to be “settings”, as only a single
312
+ # setting per container will be supported initially.
313
+ #
314
+ # @yield [response, operation] Access the result along with the RPC operation
315
+ # @yieldparam response [::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettings]
316
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
317
+ #
318
+ # @return [::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettings]
319
+ #
320
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
321
+ #
322
+ # @example Basic example
323
+ # require "google/cloud/cloud_quotas/v1beta"
324
+ #
325
+ # # Create a client object. The client can be reused for multiple calls.
326
+ # client = Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettingsManager::Client.new
327
+ #
328
+ # # Create a request. To set request fields, pass in keyword arguments.
329
+ # request = Google::Cloud::CloudQuotas::V1beta::GetQuotaAdjusterSettingsRequest.new
330
+ #
331
+ # # Call the get_quota_adjuster_settings method.
332
+ # result = client.get_quota_adjuster_settings request
333
+ #
334
+ # # The returned object is of type Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettings.
335
+ # p result
336
+ #
337
+ def get_quota_adjuster_settings request, options = nil
338
+ raise ::ArgumentError, "request must be provided" if request.nil?
339
+
340
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudQuotas::V1beta::GetQuotaAdjusterSettingsRequest
341
+
342
+ # Converts hash and nil to an options object
343
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
344
+
345
+ # Customize the options with defaults
346
+ metadata = @config.rpcs.get_quota_adjuster_settings.metadata.to_h
347
+
348
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
349
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
350
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
351
+ gapic_version: ::Google::Cloud::CloudQuotas::V1beta::VERSION
352
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
353
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
354
+
355
+ header_params = {}
356
+ if request.name
357
+ header_params["name"] = request.name
358
+ end
359
+
360
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
361
+ metadata[:"x-goog-request-params"] ||= request_params_header
362
+
363
+ options.apply_defaults timeout: @config.rpcs.get_quota_adjuster_settings.timeout,
364
+ metadata: metadata,
365
+ retry_policy: @config.rpcs.get_quota_adjuster_settings.retry_policy
366
+
367
+ options.apply_defaults timeout: @config.timeout,
368
+ metadata: @config.metadata,
369
+ retry_policy: @config.retry_policy
370
+
371
+ @quota_adjuster_settings_manager_stub.call_rpc :get_quota_adjuster_settings, request, options: options do |response, operation|
372
+ yield response, operation if block_given?
373
+ end
374
+ rescue ::GRPC::BadStatus => e
375
+ raise ::Google::Cloud::Error.from_error(e)
376
+ end
377
+
378
+ ##
379
+ # Configuration class for the QuotaAdjusterSettingsManager API.
380
+ #
381
+ # This class represents the configuration for QuotaAdjusterSettingsManager,
382
+ # providing control over timeouts, retry behavior, logging, transport
383
+ # parameters, and other low-level controls. Certain parameters can also be
384
+ # applied individually to specific RPCs. See
385
+ # {::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettingsManager::Client::Configuration::Rpcs}
386
+ # for a list of RPCs that can be configured independently.
387
+ #
388
+ # Configuration can be applied globally to all clients, or to a single client
389
+ # on construction.
390
+ #
391
+ # @example
392
+ #
393
+ # # Modify the global config, setting the timeout for
394
+ # # update_quota_adjuster_settings to 20 seconds,
395
+ # # and all remaining timeouts to 10 seconds.
396
+ # ::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettingsManager::Client.configure do |config|
397
+ # config.timeout = 10.0
398
+ # config.rpcs.update_quota_adjuster_settings.timeout = 20.0
399
+ # end
400
+ #
401
+ # # Apply the above configuration only to a new client.
402
+ # client = ::Google::Cloud::CloudQuotas::V1beta::QuotaAdjusterSettingsManager::Client.new do |config|
403
+ # config.timeout = 10.0
404
+ # config.rpcs.update_quota_adjuster_settings.timeout = 20.0
405
+ # end
406
+ #
407
+ # @!attribute [rw] endpoint
408
+ # A custom service endpoint, as a hostname or hostname:port. The default is
409
+ # nil, indicating to use the default endpoint in the current universe domain.
410
+ # @return [::String,nil]
411
+ # @!attribute [rw] credentials
412
+ # Credentials to send with calls. You may provide any of the following types:
413
+ # * (`String`) The path to a service account key file in JSON format
414
+ # * (`Hash`) A service account key as a Hash
415
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
416
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
417
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
418
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
419
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
420
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
421
+ # * (`nil`) indicating no credentials
422
+ # @return [::Object]
423
+ # @!attribute [rw] scope
424
+ # The OAuth scopes
425
+ # @return [::Array<::String>]
426
+ # @!attribute [rw] lib_name
427
+ # The library name as recorded in instrumentation and logging
428
+ # @return [::String]
429
+ # @!attribute [rw] lib_version
430
+ # The library version as recorded in instrumentation and logging
431
+ # @return [::String]
432
+ # @!attribute [rw] channel_args
433
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
434
+ # `GRPC::Core::Channel` object is provided as the credential.
435
+ # @return [::Hash]
436
+ # @!attribute [rw] interceptors
437
+ # An array of interceptors that are run before calls are executed.
438
+ # @return [::Array<::GRPC::ClientInterceptor>]
439
+ # @!attribute [rw] timeout
440
+ # The call timeout in seconds.
441
+ # @return [::Numeric]
442
+ # @!attribute [rw] metadata
443
+ # Additional gRPC headers to be sent with the call.
444
+ # @return [::Hash{::Symbol=>::String}]
445
+ # @!attribute [rw] retry_policy
446
+ # The retry policy. The value is a hash with the following keys:
447
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
448
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
449
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
450
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
451
+ # trigger a retry.
452
+ # @return [::Hash]
453
+ # @!attribute [rw] quota_project
454
+ # A separate project against which to charge quota.
455
+ # @return [::String]
456
+ # @!attribute [rw] universe_domain
457
+ # The universe domain within which to make requests. This determines the
458
+ # default endpoint URL. The default value of nil uses the environment
459
+ # universe (usually the default "googleapis.com" universe).
460
+ # @return [::String,nil]
461
+ # @!attribute [rw] logger
462
+ # A custom logger to use for request/response debug logging, or the value
463
+ # `:default` (the default) to construct a default logger, or `nil` to
464
+ # explicitly disable logging.
465
+ # @return [::Logger,:default,nil]
466
+ #
467
+ class Configuration
468
+ extend ::Gapic::Config
469
+
470
+ # @private
471
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
472
+ DEFAULT_ENDPOINT = "cloudquotas.googleapis.com"
473
+
474
+ config_attr :endpoint, nil, ::String, nil
475
+ config_attr :credentials, nil do |value|
476
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
477
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
478
+ allowed.any? { |klass| klass === value }
479
+ end
480
+ config_attr :scope, nil, ::String, ::Array, nil
481
+ config_attr :lib_name, nil, ::String, nil
482
+ config_attr :lib_version, nil, ::String, nil
483
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
484
+ config_attr :interceptors, nil, ::Array, nil
485
+ config_attr :timeout, nil, ::Numeric, nil
486
+ config_attr :metadata, nil, ::Hash, nil
487
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
488
+ config_attr :quota_project, nil, ::String, nil
489
+ config_attr :universe_domain, nil, ::String, nil
490
+ config_attr :logger, :default, ::Logger, nil, :default
491
+
492
+ # @private
493
+ def initialize parent_config = nil
494
+ @parent_config = parent_config unless parent_config.nil?
495
+
496
+ yield self if block_given?
497
+ end
498
+
499
+ ##
500
+ # Configurations for individual RPCs
501
+ # @return [Rpcs]
502
+ #
503
+ def rpcs
504
+ @rpcs ||= begin
505
+ parent_rpcs = nil
506
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
507
+ Rpcs.new parent_rpcs
508
+ end
509
+ end
510
+
511
+ ##
512
+ # Configuration for the channel pool
513
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
514
+ #
515
+ def channel_pool
516
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
517
+ end
518
+
519
+ ##
520
+ # Configuration RPC class for the QuotaAdjusterSettingsManager API.
521
+ #
522
+ # Includes fields providing the configuration for each RPC in this service.
523
+ # Each configuration object is of type `Gapic::Config::Method` and includes
524
+ # the following configuration fields:
525
+ #
526
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
527
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
528
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
529
+ # include the following keys:
530
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
531
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
532
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
533
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
534
+ # trigger a retry.
535
+ #
536
+ class Rpcs
537
+ ##
538
+ # RPC-specific configuration for `update_quota_adjuster_settings`
539
+ # @return [::Gapic::Config::Method]
540
+ #
541
+ attr_reader :update_quota_adjuster_settings
542
+ ##
543
+ # RPC-specific configuration for `get_quota_adjuster_settings`
544
+ # @return [::Gapic::Config::Method]
545
+ #
546
+ attr_reader :get_quota_adjuster_settings
547
+
548
+ # @private
549
+ def initialize parent_rpcs = nil
550
+ update_quota_adjuster_settings_config = parent_rpcs.update_quota_adjuster_settings if parent_rpcs.respond_to? :update_quota_adjuster_settings
551
+ @update_quota_adjuster_settings = ::Gapic::Config::Method.new update_quota_adjuster_settings_config
552
+ get_quota_adjuster_settings_config = parent_rpcs.get_quota_adjuster_settings if parent_rpcs.respond_to? :get_quota_adjuster_settings
553
+ @get_quota_adjuster_settings = ::Gapic::Config::Method.new get_quota_adjuster_settings_config
554
+
555
+ yield self if block_given?
556
+ end
557
+ end
558
+ end
559
+ end
560
+ end
561
+ end
562
+ end
563
+ end
564
+ end
@@ -0,0 +1,47 @@
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 "googleauth"
20
+
21
+ module Google
22
+ module Cloud
23
+ module CloudQuotas
24
+ module V1beta
25
+ module QuotaAdjusterSettingsManager
26
+ # Credentials for the QuotaAdjusterSettingsManager API.
27
+ class Credentials < ::Google::Auth::Credentials
28
+ self.scope = [
29
+ "https://www.googleapis.com/auth/cloud-platform"
30
+ ]
31
+ self.env_vars = [
32
+ "GOOGLE_CLOUD_CREDENTIALS",
33
+ "GOOGLE_CLOUD_KEYFILE",
34
+ "GCLOUD_KEYFILE",
35
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
36
+ "GOOGLE_CLOUD_KEYFILE_JSON",
37
+ "GCLOUD_KEYFILE_JSON"
38
+ ]
39
+ self.paths = [
40
+ "~/.config/google_cloud/application_default_credentials.json"
41
+ ]
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,50 @@
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
+
20
+ module Google
21
+ module Cloud
22
+ module CloudQuotas
23
+ module V1beta
24
+ module QuotaAdjusterSettingsManager
25
+ # Path helper methods for the QuotaAdjusterSettingsManager API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified QuotaAdjusterSettings resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}/quotaAdjusterSettings`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ #
37
+ # @return [::String]
38
+ def quota_adjuster_settings_path project:, location:
39
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
40
+
41
+ "projects/#{project}/locations/#{location}/quotaAdjusterSettings"
42
+ end
43
+
44
+ extend self
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end