google-cloud-backupdr-v1 1.6.0 → 1.7.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e53866445581b81902e950b00e54e846f984f02cdf9048cbf4dce70c60fec9c
4
- data.tar.gz: 3ddd1212302422c6f19750371aedecba316423b756d59476e414b98abbbd0f36
3
+ metadata.gz: 1dcb1b294f4ddc061e30f9ad05efe3a91684ff861ed41494a5b2ee828f550ec1
4
+ data.tar.gz: 9ee2dc2102fdd288848322b79cce5feb47e3f25acd1e8a8476e4db6b32f9b785
5
5
  SHA512:
6
- metadata.gz: f533dcc5190ffdb94940c3c9e1faee56e7df8259ba126b720af98e0a82cb91667f419af1fddff051494b74db8fa56f7a2aeab0a7cac89f1223a630dc810ab7ba
7
- data.tar.gz: 95ee181fea8ff7756507676ef5afcfadfe3d478540faaeaef8da2dc1c5a2da4a8a49c5bb38c4056b797286130b72f5d1e146f192a38ee6e8de22875ed98ec7df
6
+ metadata.gz: 44867bcf838f1272849ea17f18a51072756fefadffd21814b58bbcef7b18dbff2367df23248ba7b7aaef5017be151ff67a7939bf1fdefe798e8b40b6ad525c28
7
+ data.tar.gz: 285f3a96fb5129037e225c9145053caf6df6177f3d6af363d924f967c03085bf007bbf2c160f279d7665550b4f2cec8eadc1023f486602192c94734afd8fda96
@@ -0,0 +1,530 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 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/cloud/backupdr/v1/protection_summary_pb"
21
+ require "google/cloud/location"
22
+ require "google/iam/v1"
23
+
24
+ module Google
25
+ module Cloud
26
+ module BackupDR
27
+ module V1
28
+ module BackupDrProtectionSummary
29
+ ##
30
+ # Client for the BackupDrProtectionSummary service.
31
+ #
32
+ # The Protection Summary service.
33
+ #
34
+ class Client
35
+ # @private
36
+ API_VERSION = ""
37
+
38
+ # @private
39
+ DEFAULT_ENDPOINT_TEMPLATE = "backupdr.$UNIVERSE_DOMAIN$"
40
+
41
+ include Paths
42
+
43
+ # @private
44
+ attr_reader :backup_dr_protection_summary_stub
45
+
46
+ ##
47
+ # Configure the BackupDrProtectionSummary Client class.
48
+ #
49
+ # See {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client::Configuration}
50
+ # for a description of the configuration fields.
51
+ #
52
+ # @example
53
+ #
54
+ # # Modify the configuration for all BackupDrProtectionSummary clients
55
+ # ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.configure do |config|
56
+ # config.timeout = 10.0
57
+ # end
58
+ #
59
+ # @yield [config] Configure the Client client.
60
+ # @yieldparam config [Client::Configuration]
61
+ #
62
+ # @return [Client::Configuration]
63
+ #
64
+ def self.configure
65
+ @configure ||= begin
66
+ namespace = ["Google", "Cloud", "BackupDR", "V1"]
67
+ parent_config = while namespace.any?
68
+ parent_name = namespace.join "::"
69
+ parent_const = const_get parent_name
70
+ break parent_const.configure if parent_const.respond_to? :configure
71
+ namespace.pop
72
+ end
73
+ default_config = Client::Configuration.new parent_config
74
+
75
+ default_config.rpcs.list_resource_backup_configs.timeout = 60.0
76
+ default_config.rpcs.list_resource_backup_configs.retry_policy = {
77
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
78
+ }
79
+
80
+ default_config
81
+ end
82
+ yield @configure if block_given?
83
+ @configure
84
+ end
85
+
86
+ ##
87
+ # Configure the BackupDrProtectionSummary Client instance.
88
+ #
89
+ # The configuration is set to the derived mode, meaning that values can be changed,
90
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
91
+ # should be made on {Client.configure}.
92
+ #
93
+ # See {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client::Configuration}
94
+ # for a description of the configuration fields.
95
+ #
96
+ # @yield [config] Configure the Client client.
97
+ # @yieldparam config [Client::Configuration]
98
+ #
99
+ # @return [Client::Configuration]
100
+ #
101
+ def configure
102
+ yield @config if block_given?
103
+ @config
104
+ end
105
+
106
+ ##
107
+ # The effective universe domain
108
+ #
109
+ # @return [String]
110
+ #
111
+ def universe_domain
112
+ @backup_dr_protection_summary_stub.universe_domain
113
+ end
114
+
115
+ ##
116
+ # Create a new BackupDrProtectionSummary client object.
117
+ #
118
+ # @example
119
+ #
120
+ # # Create a client using the default configuration
121
+ # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new
122
+ #
123
+ # # Create a client using a custom configuration
124
+ # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config|
125
+ # config.timeout = 10.0
126
+ # end
127
+ #
128
+ # @yield [config] Configure the BackupDrProtectionSummary client.
129
+ # @yieldparam config [Client::Configuration]
130
+ #
131
+ def initialize
132
+ # These require statements are intentionally placed here to initialize
133
+ # the gRPC module only when it's required.
134
+ # See https://github.com/googleapis/toolkit/issues/446
135
+ require "gapic/grpc"
136
+ require "google/cloud/backupdr/v1/protection_summary_services_pb"
137
+
138
+ # Create the configuration object
139
+ @config = Configuration.new Client.configure
140
+
141
+ # Yield the configuration if needed
142
+ yield @config if block_given?
143
+
144
+ # Create credentials
145
+ credentials = @config.credentials
146
+ # Use self-signed JWT if the endpoint is unchanged from default,
147
+ # but only if the default endpoint does not have a region prefix.
148
+ enable_self_signed_jwt = @config.endpoint.nil? ||
149
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
150
+ !@config.endpoint.split(".").first.include?("-"))
151
+ credentials ||= Credentials.default scope: @config.scope,
152
+ enable_self_signed_jwt: enable_self_signed_jwt
153
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
154
+ credentials = Credentials.new credentials, scope: @config.scope
155
+ end
156
+ @quota_project_id = @config.quota_project
157
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
158
+
159
+ @backup_dr_protection_summary_stub = ::Gapic::ServiceStub.new(
160
+ ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Stub,
161
+ credentials: credentials,
162
+ endpoint: @config.endpoint,
163
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
164
+ universe_domain: @config.universe_domain,
165
+ channel_args: @config.channel_args,
166
+ interceptors: @config.interceptors,
167
+ channel_pool_config: @config.channel_pool,
168
+ logger: @config.logger
169
+ )
170
+
171
+ @backup_dr_protection_summary_stub.stub_logger&.info do |entry|
172
+ entry.set_system_name
173
+ entry.set_service
174
+ entry.message = "Created client for #{entry.service}"
175
+ entry.set_credentials_fields credentials
176
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
177
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
178
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
179
+ end
180
+
181
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
182
+ config.credentials = credentials
183
+ config.quota_project = @quota_project_id
184
+ config.endpoint = @backup_dr_protection_summary_stub.endpoint
185
+ config.universe_domain = @backup_dr_protection_summary_stub.universe_domain
186
+ config.logger = @backup_dr_protection_summary_stub.logger if config.respond_to? :logger=
187
+ end
188
+
189
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
190
+ config.credentials = credentials
191
+ config.quota_project = @quota_project_id
192
+ config.endpoint = @backup_dr_protection_summary_stub.endpoint
193
+ config.universe_domain = @backup_dr_protection_summary_stub.universe_domain
194
+ config.logger = @backup_dr_protection_summary_stub.logger if config.respond_to? :logger=
195
+ end
196
+ end
197
+
198
+ ##
199
+ # Get the associated client for mix-in of the Locations.
200
+ #
201
+ # @return [Google::Cloud::Location::Locations::Client]
202
+ #
203
+ attr_reader :location_client
204
+
205
+ ##
206
+ # Get the associated client for mix-in of the IAMPolicy.
207
+ #
208
+ # @return [Google::Iam::V1::IAMPolicy::Client]
209
+ #
210
+ attr_reader :iam_policy_client
211
+
212
+ ##
213
+ # The logger used for request/response debug logging.
214
+ #
215
+ # @return [Logger]
216
+ #
217
+ def logger
218
+ @backup_dr_protection_summary_stub.logger
219
+ end
220
+
221
+ # Service calls
222
+
223
+ ##
224
+ # Lists ResourceBackupConfigs.
225
+ #
226
+ # @overload list_resource_backup_configs(request, options = nil)
227
+ # Pass arguments to `list_resource_backup_configs` via a request object, either of type
228
+ # {::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest} or an equivalent Hash.
229
+ #
230
+ # @param request [::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest, ::Hash]
231
+ # A request object representing the call parameters. Required. To specify no
232
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
233
+ # @param options [::Gapic::CallOptions, ::Hash]
234
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
235
+ #
236
+ # @overload list_resource_backup_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
237
+ # Pass arguments to `list_resource_backup_configs` via keyword arguments. Note that at
238
+ # least one keyword argument is required. To specify no parameters, or to keep all
239
+ # the default parameter values, pass an empty Hash as a request object (see above).
240
+ #
241
+ # @param parent [::String]
242
+ # Required. The project and location for which to retrieve resource backup
243
+ # configs. Format: 'projects/\\{project_id}/locations/\\{location}'. In Google
244
+ # Cloud Backup and DR, locations map to Google Cloud regions, for example
245
+ # **us-central1**.
246
+ # @param page_size [::Integer]
247
+ # Optional. Requested page size. Server may return fewer items than
248
+ # requested. If unspecified, server will use 100 as default. Maximum value is
249
+ # 500 and values above 500 will be coerced to 500.
250
+ # @param page_token [::String]
251
+ # Optional. A token identifying a page of results the server should return.
252
+ # @param filter [::String]
253
+ # Optional. Filtering results.
254
+ # @param order_by [::String]
255
+ # Optional. Hint for how to order the results.
256
+ #
257
+ # @yield [response, operation] Access the result along with the RPC operation
258
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>]
259
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
260
+ #
261
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ResourceBackupConfig>]
262
+ #
263
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
264
+ #
265
+ # @example Basic example
266
+ # require "google/cloud/backupdr/v1"
267
+ #
268
+ # # Create a client object. The client can be reused for multiple calls.
269
+ # client = Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new
270
+ #
271
+ # # Create a request. To set request fields, pass in keyword arguments.
272
+ # request = Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest.new
273
+ #
274
+ # # Call the list_resource_backup_configs method.
275
+ # result = client.list_resource_backup_configs request
276
+ #
277
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
278
+ # # over elements, and API calls will be issued to fetch pages as needed.
279
+ # result.each do |item|
280
+ # # Each element is of type ::Google::Cloud::BackupDR::V1::ResourceBackupConfig.
281
+ # p item
282
+ # end
283
+ #
284
+ def list_resource_backup_configs request, options = nil
285
+ raise ::ArgumentError, "request must be provided" if request.nil?
286
+
287
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListResourceBackupConfigsRequest
288
+
289
+ # Converts hash and nil to an options object
290
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
291
+
292
+ # Customize the options with defaults
293
+ metadata = @config.rpcs.list_resource_backup_configs.metadata.to_h
294
+
295
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
296
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
297
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
298
+ gapic_version: ::Google::Cloud::BackupDR::V1::VERSION
299
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
300
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
301
+
302
+ header_params = {}
303
+ if request.parent
304
+ header_params["parent"] = request.parent
305
+ end
306
+
307
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
308
+ metadata[:"x-goog-request-params"] ||= request_params_header
309
+
310
+ options.apply_defaults timeout: @config.rpcs.list_resource_backup_configs.timeout,
311
+ metadata: metadata,
312
+ retry_policy: @config.rpcs.list_resource_backup_configs.retry_policy
313
+
314
+ options.apply_defaults timeout: @config.timeout,
315
+ metadata: @config.metadata,
316
+ retry_policy: @config.retry_policy
317
+
318
+ @backup_dr_protection_summary_stub.call_rpc :list_resource_backup_configs, request, options: options do |response, operation|
319
+ response = ::Gapic::PagedEnumerable.new @backup_dr_protection_summary_stub, :list_resource_backup_configs, request, response, operation, options
320
+ yield response, operation if block_given?
321
+ throw :response, response
322
+ end
323
+ rescue ::GRPC::BadStatus => e
324
+ raise ::Google::Cloud::Error.from_error(e)
325
+ end
326
+
327
+ ##
328
+ # Configuration class for the BackupDrProtectionSummary API.
329
+ #
330
+ # This class represents the configuration for BackupDrProtectionSummary,
331
+ # providing control over timeouts, retry behavior, logging, transport
332
+ # parameters, and other low-level controls. Certain parameters can also be
333
+ # applied individually to specific RPCs. See
334
+ # {::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client::Configuration::Rpcs}
335
+ # for a list of RPCs that can be configured independently.
336
+ #
337
+ # Configuration can be applied globally to all clients, or to a single client
338
+ # on construction.
339
+ #
340
+ # @example
341
+ #
342
+ # # Modify the global config, setting the timeout for
343
+ # # list_resource_backup_configs to 20 seconds,
344
+ # # and all remaining timeouts to 10 seconds.
345
+ # ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.configure do |config|
346
+ # config.timeout = 10.0
347
+ # config.rpcs.list_resource_backup_configs.timeout = 20.0
348
+ # end
349
+ #
350
+ # # Apply the above configuration only to a new client.
351
+ # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config|
352
+ # config.timeout = 10.0
353
+ # config.rpcs.list_resource_backup_configs.timeout = 20.0
354
+ # end
355
+ #
356
+ # @!attribute [rw] endpoint
357
+ # A custom service endpoint, as a hostname or hostname:port. The default is
358
+ # nil, indicating to use the default endpoint in the current universe domain.
359
+ # @return [::String,nil]
360
+ # @!attribute [rw] credentials
361
+ # Credentials to send with calls. You may provide any of the following types:
362
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
363
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
364
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
365
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
366
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
367
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
368
+ # * (`nil`) indicating no credentials
369
+ #
370
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
371
+ # is deprecated. Providing an unvalidated credential configuration to
372
+ # Google APIs can compromise the security of your systems and data.
373
+ #
374
+ # @example
375
+ #
376
+ # # The recommended way to provide credentials is to use the `make_creds` method
377
+ # # on the appropriate credentials class for your environment.
378
+ #
379
+ # require "googleauth"
380
+ #
381
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
382
+ # json_key_io: ::File.open("/path/to/keyfile.json")
383
+ # )
384
+ #
385
+ # client = ::Google::Cloud::BackupDR::V1::BackupDrProtectionSummary::Client.new do |config|
386
+ # config.credentials = credentials
387
+ # end
388
+ #
389
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
390
+ # external source for authentication to Google Cloud, you must validate it before
391
+ # providing it to a Google API client library. Providing an unvalidated credential
392
+ # configuration to Google APIs can compromise the security of your systems and data.
393
+ # For more information, refer to [Validate credential configurations from external
394
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
395
+ # @return [::Object]
396
+ # @!attribute [rw] scope
397
+ # The OAuth scopes
398
+ # @return [::Array<::String>]
399
+ # @!attribute [rw] lib_name
400
+ # The library name as recorded in instrumentation and logging
401
+ # @return [::String]
402
+ # @!attribute [rw] lib_version
403
+ # The library version as recorded in instrumentation and logging
404
+ # @return [::String]
405
+ # @!attribute [rw] channel_args
406
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
407
+ # `GRPC::Core::Channel` object is provided as the credential.
408
+ # @return [::Hash]
409
+ # @!attribute [rw] interceptors
410
+ # An array of interceptors that are run before calls are executed.
411
+ # @return [::Array<::GRPC::ClientInterceptor>]
412
+ # @!attribute [rw] timeout
413
+ # The call timeout in seconds.
414
+ # @return [::Numeric]
415
+ # @!attribute [rw] metadata
416
+ # Additional gRPC headers to be sent with the call.
417
+ # @return [::Hash{::Symbol=>::String}]
418
+ # @!attribute [rw] retry_policy
419
+ # The retry policy. The value is a hash with the following keys:
420
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
421
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
422
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
423
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
424
+ # trigger a retry.
425
+ # @return [::Hash]
426
+ # @!attribute [rw] quota_project
427
+ # A separate project against which to charge quota.
428
+ # @return [::String]
429
+ # @!attribute [rw] universe_domain
430
+ # The universe domain within which to make requests. This determines the
431
+ # default endpoint URL. The default value of nil uses the environment
432
+ # universe (usually the default "googleapis.com" universe).
433
+ # @return [::String,nil]
434
+ # @!attribute [rw] logger
435
+ # A custom logger to use for request/response debug logging, or the value
436
+ # `:default` (the default) to construct a default logger, or `nil` to
437
+ # explicitly disable logging.
438
+ # @return [::Logger,:default,nil]
439
+ #
440
+ class Configuration
441
+ extend ::Gapic::Config
442
+
443
+ # @private
444
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
445
+ DEFAULT_ENDPOINT = "backupdr.googleapis.com"
446
+
447
+ config_attr :endpoint, nil, ::String, nil
448
+ config_attr :credentials, nil do |value|
449
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
450
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
451
+ allowed.any? { |klass| klass === value }
452
+ end
453
+ config_attr :scope, nil, ::String, ::Array, nil
454
+ config_attr :lib_name, nil, ::String, nil
455
+ config_attr :lib_version, nil, ::String, nil
456
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
457
+ config_attr :interceptors, nil, ::Array, nil
458
+ config_attr :timeout, nil, ::Numeric, nil
459
+ config_attr :metadata, nil, ::Hash, nil
460
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
461
+ config_attr :quota_project, nil, ::String, nil
462
+ config_attr :universe_domain, nil, ::String, nil
463
+ config_attr :logger, :default, ::Logger, nil, :default
464
+
465
+ # @private
466
+ def initialize parent_config = nil
467
+ @parent_config = parent_config unless parent_config.nil?
468
+
469
+ yield self if block_given?
470
+ end
471
+
472
+ ##
473
+ # Configurations for individual RPCs
474
+ # @return [Rpcs]
475
+ #
476
+ def rpcs
477
+ @rpcs ||= begin
478
+ parent_rpcs = nil
479
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
480
+ Rpcs.new parent_rpcs
481
+ end
482
+ end
483
+
484
+ ##
485
+ # Configuration for the channel pool
486
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
487
+ #
488
+ def channel_pool
489
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
490
+ end
491
+
492
+ ##
493
+ # Configuration RPC class for the BackupDrProtectionSummary API.
494
+ #
495
+ # Includes fields providing the configuration for each RPC in this service.
496
+ # Each configuration object is of type `Gapic::Config::Method` and includes
497
+ # the following configuration fields:
498
+ #
499
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
500
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
501
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
502
+ # include the following keys:
503
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
504
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
505
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
506
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
507
+ # trigger a retry.
508
+ #
509
+ class Rpcs
510
+ ##
511
+ # RPC-specific configuration for `list_resource_backup_configs`
512
+ # @return [::Gapic::Config::Method]
513
+ #
514
+ attr_reader :list_resource_backup_configs
515
+
516
+ # @private
517
+ def initialize parent_rpcs = nil
518
+ list_resource_backup_configs_config = parent_rpcs.list_resource_backup_configs if parent_rpcs.respond_to? :list_resource_backup_configs
519
+ @list_resource_backup_configs = ::Gapic::Config::Method.new list_resource_backup_configs_config
520
+
521
+ yield self if block_given?
522
+ end
523
+ end
524
+ end
525
+ end
526
+ end
527
+ end
528
+ end
529
+ end
530
+ end
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 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 BackupDR
24
+ module V1
25
+ module BackupDrProtectionSummary
26
+ # Credentials for the BackupDrProtectionSummary 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 2026 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 BackupDR
23
+ module V1
24
+ module BackupDrProtectionSummary
25
+ # Path helper methods for the BackupDrProtectionSummary API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified Location resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ #
37
+ # @return [::String]
38
+ def location_path project:, location:
39
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
40
+
41
+ "projects/#{project}/locations/#{location}"
42
+ end
43
+
44
+ extend self
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end