google-cloud-netapp-v1 0.2.0 → 0.3.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 (29) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/netapp/v1/active_directory_pb.rb +1 -1
  3. data/lib/google/cloud/netapp/v1/backup_pb.rb +57 -0
  4. data/lib/google/cloud/netapp/v1/backup_policy_pb.rb +56 -0
  5. data/lib/google/cloud/netapp/v1/backup_vault_pb.rb +56 -0
  6. data/lib/google/cloud/netapp/v1/cloud_netapp_service_pb.rb +4 -1
  7. data/lib/google/cloud/netapp/v1/cloud_netapp_service_services_pb.rb +33 -0
  8. data/lib/google/cloud/netapp/v1/kms_pb.rb +1 -1
  9. data/lib/google/cloud/netapp/v1/netapp/client.rb +1733 -120
  10. data/lib/google/cloud/netapp/v1/netapp/paths.rb +59 -0
  11. data/lib/google/cloud/netapp/v1/netapp/rest/client.rb +1622 -117
  12. data/lib/google/cloud/netapp/v1/netapp/rest/service_stub.rb +891 -0
  13. data/lib/google/cloud/netapp/v1/replication_pb.rb +1 -1
  14. data/lib/google/cloud/netapp/v1/snapshot_pb.rb +1 -1
  15. data/lib/google/cloud/netapp/v1/storage_pool_pb.rb +1 -1
  16. data/lib/google/cloud/netapp/v1/version.rb +1 -1
  17. data/lib/google/cloud/netapp/v1/volume_pb.rb +2 -1
  18. data/proto_docs/google/api/client.rb +13 -0
  19. data/proto_docs/google/cloud/netapp/v1/active_directory.rb +2 -2
  20. data/proto_docs/google/cloud/netapp/v1/backup.rb +231 -0
  21. data/proto_docs/google/cloud/netapp/v1/backup_policy.rb +190 -0
  22. data/proto_docs/google/cloud/netapp/v1/backup_vault.rb +177 -0
  23. data/proto_docs/google/cloud/netapp/v1/common.rb +3 -0
  24. data/proto_docs/google/cloud/netapp/v1/kms.rb +2 -2
  25. data/proto_docs/google/cloud/netapp/v1/replication.rb +2 -2
  26. data/proto_docs/google/cloud/netapp/v1/snapshot.rb +2 -2
  27. data/proto_docs/google/cloud/netapp/v1/storage_pool.rb +4 -3
  28. data/proto_docs/google/cloud/netapp/v1/volume.rb +31 -2
  29. metadata +9 -3
@@ -175,6 +175,54 @@ module Google
175
175
 
176
176
  default_config.rpcs.reverse_replication_direction.timeout = 60.0
177
177
 
178
+ default_config.rpcs.create_backup_vault.timeout = 60.0
179
+
180
+ default_config.rpcs.get_backup_vault.timeout = 60.0
181
+ default_config.rpcs.get_backup_vault.retry_policy = {
182
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
183
+ }
184
+
185
+ default_config.rpcs.list_backup_vaults.timeout = 60.0
186
+ default_config.rpcs.list_backup_vaults.retry_policy = {
187
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
188
+ }
189
+
190
+ default_config.rpcs.update_backup_vault.timeout = 60.0
191
+
192
+ default_config.rpcs.delete_backup_vault.timeout = 60.0
193
+
194
+ default_config.rpcs.create_backup.timeout = 60.0
195
+
196
+ default_config.rpcs.get_backup.timeout = 60.0
197
+ default_config.rpcs.get_backup.retry_policy = {
198
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
199
+ }
200
+
201
+ default_config.rpcs.list_backups.timeout = 60.0
202
+ default_config.rpcs.list_backups.retry_policy = {
203
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
204
+ }
205
+
206
+ default_config.rpcs.delete_backup.timeout = 60.0
207
+
208
+ default_config.rpcs.update_backup.timeout = 60.0
209
+
210
+ default_config.rpcs.create_backup_policy.timeout = 60.0
211
+
212
+ default_config.rpcs.get_backup_policy.timeout = 60.0
213
+ default_config.rpcs.get_backup_policy.retry_policy = {
214
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
215
+ }
216
+
217
+ default_config.rpcs.list_backup_policies.timeout = 60.0
218
+ default_config.rpcs.list_backup_policies.retry_policy = {
219
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
220
+ }
221
+
222
+ default_config.rpcs.update_backup_policy.timeout = 60.0
223
+
224
+ default_config.rpcs.delete_backup_policy.timeout = 60.0
225
+
178
226
  default_config
179
227
  end
180
228
  yield @configure if block_given?
@@ -3440,139 +3488,1491 @@ module Google
3440
3488
  end
3441
3489
 
3442
3490
  ##
3443
- # Configuration class for the NetApp REST API.
3491
+ # Creates new backup vault
3444
3492
  #
3445
- # This class represents the configuration for NetApp REST,
3446
- # providing control over timeouts, retry behavior, logging, transport
3447
- # parameters, and other low-level controls. Certain parameters can also be
3448
- # applied individually to specific RPCs. See
3449
- # {::Google::Cloud::NetApp::V1::NetApp::Rest::Client::Configuration::Rpcs}
3450
- # for a list of RPCs that can be configured independently.
3493
+ # @overload create_backup_vault(request, options = nil)
3494
+ # Pass arguments to `create_backup_vault` via a request object, either of type
3495
+ # {::Google::Cloud::NetApp::V1::CreateBackupVaultRequest} or an equivalent Hash.
3451
3496
  #
3452
- # Configuration can be applied globally to all clients, or to a single client
3453
- # on construction.
3497
+ # @param request [::Google::Cloud::NetApp::V1::CreateBackupVaultRequest, ::Hash]
3498
+ # A request object representing the call parameters. Required. To specify no
3499
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3500
+ # @param options [::Gapic::CallOptions, ::Hash]
3501
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3454
3502
  #
3455
- # @example
3503
+ # @overload create_backup_vault(parent: nil, backup_vault_id: nil, backup_vault: nil)
3504
+ # Pass arguments to `create_backup_vault` via keyword arguments. Note that at
3505
+ # least one keyword argument is required. To specify no parameters, or to keep all
3506
+ # the default parameter values, pass an empty Hash as a request object (see above).
3456
3507
  #
3457
- # # Modify the global config, setting the timeout for
3458
- # # list_storage_pools to 20 seconds,
3459
- # # and all remaining timeouts to 10 seconds.
3460
- # ::Google::Cloud::NetApp::V1::NetApp::Rest::Client.configure do |config|
3461
- # config.timeout = 10.0
3462
- # config.rpcs.list_storage_pools.timeout = 20.0
3463
- # end
3508
+ # @param parent [::String]
3509
+ # Required. The location to create the backup vaults, in the format
3510
+ # `projects/{project_id}/locations/{location}`
3511
+ # @param backup_vault_id [::String]
3512
+ # Required. The ID to use for the backupVault.
3513
+ # The ID must be unique within the specified location.
3514
+ # The max supported length is 63 characters.
3515
+ # This value must start with a lowercase letter followed by up to 62
3516
+ # lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
3517
+ # Values that do not match this pattern will trigger an INVALID_ARGUMENT
3518
+ # error.
3519
+ # @param backup_vault [::Google::Cloud::NetApp::V1::BackupVault, ::Hash]
3520
+ # Required. A backupVault resource
3521
+ # @yield [result, operation] Access the result along with the TransportOperation object
3522
+ # @yieldparam result [::Gapic::Operation]
3523
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3464
3524
  #
3465
- # # Apply the above configuration only to a new client.
3466
- # client = ::Google::Cloud::NetApp::V1::NetApp::Rest::Client.new do |config|
3467
- # config.timeout = 10.0
3468
- # config.rpcs.list_storage_pools.timeout = 20.0
3469
- # end
3525
+ # @return [::Gapic::Operation]
3470
3526
  #
3471
- # @!attribute [rw] endpoint
3472
- # The hostname or hostname:port of the service endpoint.
3473
- # Defaults to `"netapp.googleapis.com"`.
3474
- # @return [::String]
3475
- # @!attribute [rw] credentials
3476
- # Credentials to send with calls. You may provide any of the following types:
3477
- # * (`String`) The path to a service account key file in JSON format
3478
- # * (`Hash`) A service account key as a Hash
3479
- # * (`Google::Auth::Credentials`) A googleauth credentials object
3480
- # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
3481
- # * (`Signet::OAuth2::Client`) A signet oauth2 client object
3482
- # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
3483
- # * (`nil`) indicating no credentials
3484
- # @return [::Object]
3485
- # @!attribute [rw] scope
3486
- # The OAuth scopes
3487
- # @return [::Array<::String>]
3488
- # @!attribute [rw] lib_name
3489
- # The library name as recorded in instrumentation and logging
3490
- # @return [::String]
3491
- # @!attribute [rw] lib_version
3492
- # The library version as recorded in instrumentation and logging
3493
- # @return [::String]
3494
- # @!attribute [rw] timeout
3495
- # The call timeout in seconds.
3496
- # @return [::Numeric]
3497
- # @!attribute [rw] metadata
3498
- # Additional headers to be sent with the call.
3499
- # @return [::Hash{::Symbol=>::String}]
3500
- # @!attribute [rw] retry_policy
3501
- # The retry policy. The value is a hash with the following keys:
3502
- # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3503
- # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3504
- # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3505
- # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3506
- # trigger a retry.
3507
- # @return [::Hash]
3508
- # @!attribute [rw] quota_project
3509
- # A separate project against which to charge quota.
3510
- # @return [::String]
3527
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3511
3528
  #
3512
- class Configuration
3513
- extend ::Gapic::Config
3529
+ # @example Basic example
3530
+ # require "google/cloud/netapp/v1"
3531
+ #
3532
+ # # Create a client object. The client can be reused for multiple calls.
3533
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
3534
+ #
3535
+ # # Create a request. To set request fields, pass in keyword arguments.
3536
+ # request = Google::Cloud::NetApp::V1::CreateBackupVaultRequest.new
3537
+ #
3538
+ # # Call the create_backup_vault method.
3539
+ # result = client.create_backup_vault request
3540
+ #
3541
+ # # The returned object is of type Gapic::Operation. You can use it to
3542
+ # # check the status of an operation, cancel it, or wait for results.
3543
+ # # Here is how to wait for a response.
3544
+ # result.wait_until_done! timeout: 60
3545
+ # if result.response?
3546
+ # p result.response
3547
+ # else
3548
+ # puts "No response received."
3549
+ # end
3550
+ #
3551
+ def create_backup_vault request, options = nil
3552
+ raise ::ArgumentError, "request must be provided" if request.nil?
3514
3553
 
3515
- DEFAULT_ENDPOINT = "netapp.googleapis.com"
3554
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateBackupVaultRequest
3516
3555
 
3517
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
3518
- config_attr :credentials, nil do |value|
3519
- allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
3520
- allowed.any? { |klass| klass === value }
3521
- end
3522
- config_attr :scope, nil, ::String, ::Array, nil
3523
- config_attr :lib_name, nil, ::String, nil
3524
- config_attr :lib_version, nil, ::String, nil
3525
- config_attr :timeout, nil, ::Numeric, nil
3526
- config_attr :metadata, nil, ::Hash, nil
3527
- config_attr :retry_policy, nil, ::Hash, ::Proc, nil
3528
- config_attr :quota_project, nil, ::String, nil
3556
+ # Converts hash and nil to an options object
3557
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3529
3558
 
3530
- # @private
3531
- # Overrides for http bindings for the RPCs of this service
3532
- # are only used when this service is used as mixin, and only
3533
- # by the host service.
3534
- # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
3535
- config_attr :bindings_override, {}, ::Hash, nil
3559
+ # Customize the options with defaults
3560
+ call_metadata = @config.rpcs.create_backup_vault.metadata.to_h
3536
3561
 
3537
- # @private
3538
- def initialize parent_config = nil
3539
- @parent_config = parent_config unless parent_config.nil?
3562
+ # Set x-goog-api-client and x-goog-user-project headers
3563
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3564
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3565
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
3566
+ transports_version_send: [:rest]
3540
3567
 
3541
- yield self if block_given?
3568
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3569
+
3570
+ options.apply_defaults timeout: @config.rpcs.create_backup_vault.timeout,
3571
+ metadata: call_metadata,
3572
+ retry_policy: @config.rpcs.create_backup_vault.retry_policy
3573
+
3574
+ options.apply_defaults timeout: @config.timeout,
3575
+ metadata: @config.metadata,
3576
+ retry_policy: @config.retry_policy
3577
+
3578
+ @net_app_stub.create_backup_vault request, options do |result, operation|
3579
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3580
+ yield result, operation if block_given?
3581
+ return result
3542
3582
  end
3583
+ rescue ::Gapic::Rest::Error => e
3584
+ raise ::Google::Cloud::Error.from_error(e)
3585
+ end
3543
3586
 
3544
- ##
3545
- # Configurations for individual RPCs
3546
- # @return [Rpcs]
3547
- #
3548
- def rpcs
3549
- @rpcs ||= begin
3550
- parent_rpcs = nil
3551
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
3552
- Rpcs.new parent_rpcs
3553
- end
3587
+ ##
3588
+ # Returns the description of the specified backup vault
3589
+ #
3590
+ # @overload get_backup_vault(request, options = nil)
3591
+ # Pass arguments to `get_backup_vault` via a request object, either of type
3592
+ # {::Google::Cloud::NetApp::V1::GetBackupVaultRequest} or an equivalent Hash.
3593
+ #
3594
+ # @param request [::Google::Cloud::NetApp::V1::GetBackupVaultRequest, ::Hash]
3595
+ # A request object representing the call parameters. Required. To specify no
3596
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3597
+ # @param options [::Gapic::CallOptions, ::Hash]
3598
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3599
+ #
3600
+ # @overload get_backup_vault(name: nil)
3601
+ # Pass arguments to `get_backup_vault` via keyword arguments. Note that at
3602
+ # least one keyword argument is required. To specify no parameters, or to keep all
3603
+ # the default parameter values, pass an empty Hash as a request object (see above).
3604
+ #
3605
+ # @param name [::String]
3606
+ # Required. The backupVault resource name, in the format
3607
+ # `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
3608
+ # @yield [result, operation] Access the result along with the TransportOperation object
3609
+ # @yieldparam result [::Google::Cloud::NetApp::V1::BackupVault]
3610
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3611
+ #
3612
+ # @return [::Google::Cloud::NetApp::V1::BackupVault]
3613
+ #
3614
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3615
+ #
3616
+ # @example Basic example
3617
+ # require "google/cloud/netapp/v1"
3618
+ #
3619
+ # # Create a client object. The client can be reused for multiple calls.
3620
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
3621
+ #
3622
+ # # Create a request. To set request fields, pass in keyword arguments.
3623
+ # request = Google::Cloud::NetApp::V1::GetBackupVaultRequest.new
3624
+ #
3625
+ # # Call the get_backup_vault method.
3626
+ # result = client.get_backup_vault request
3627
+ #
3628
+ # # The returned object is of type Google::Cloud::NetApp::V1::BackupVault.
3629
+ # p result
3630
+ #
3631
+ def get_backup_vault request, options = nil
3632
+ raise ::ArgumentError, "request must be provided" if request.nil?
3633
+
3634
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetBackupVaultRequest
3635
+
3636
+ # Converts hash and nil to an options object
3637
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3638
+
3639
+ # Customize the options with defaults
3640
+ call_metadata = @config.rpcs.get_backup_vault.metadata.to_h
3641
+
3642
+ # Set x-goog-api-client and x-goog-user-project headers
3643
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3644
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3645
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
3646
+ transports_version_send: [:rest]
3647
+
3648
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3649
+
3650
+ options.apply_defaults timeout: @config.rpcs.get_backup_vault.timeout,
3651
+ metadata: call_metadata,
3652
+ retry_policy: @config.rpcs.get_backup_vault.retry_policy
3653
+
3654
+ options.apply_defaults timeout: @config.timeout,
3655
+ metadata: @config.metadata,
3656
+ retry_policy: @config.retry_policy
3657
+
3658
+ @net_app_stub.get_backup_vault request, options do |result, operation|
3659
+ yield result, operation if block_given?
3660
+ return result
3554
3661
  end
3662
+ rescue ::Gapic::Rest::Error => e
3663
+ raise ::Google::Cloud::Error.from_error(e)
3664
+ end
3555
3665
 
3556
- ##
3557
- # Configuration RPC class for the NetApp API.
3558
- #
3559
- # Includes fields providing the configuration for each RPC in this service.
3560
- # Each configuration object is of type `Gapic::Config::Method` and includes
3561
- # the following configuration fields:
3562
- #
3563
- # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
3564
- # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
3565
- # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
3566
- # include the following keys:
3567
- # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3568
- # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3569
- # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3570
- # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3571
- # trigger a retry.
3572
- #
3573
- class Rpcs
3574
- ##
3575
- # RPC-specific configuration for `list_storage_pools`
3666
+ ##
3667
+ # Returns list of all available backup vaults.
3668
+ #
3669
+ # @overload list_backup_vaults(request, options = nil)
3670
+ # Pass arguments to `list_backup_vaults` via a request object, either of type
3671
+ # {::Google::Cloud::NetApp::V1::ListBackupVaultsRequest} or an equivalent Hash.
3672
+ #
3673
+ # @param request [::Google::Cloud::NetApp::V1::ListBackupVaultsRequest, ::Hash]
3674
+ # A request object representing the call parameters. Required. To specify no
3675
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3676
+ # @param options [::Gapic::CallOptions, ::Hash]
3677
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3678
+ #
3679
+ # @overload list_backup_vaults(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
3680
+ # Pass arguments to `list_backup_vaults` via keyword arguments. Note that at
3681
+ # least one keyword argument is required. To specify no parameters, or to keep all
3682
+ # the default parameter values, pass an empty Hash as a request object (see above).
3683
+ #
3684
+ # @param parent [::String]
3685
+ # Required. The location for which to retrieve backupVault information,
3686
+ # in the format
3687
+ # `projects/{project_id}/locations/{location}`.
3688
+ # @param page_size [::Integer]
3689
+ # The maximum number of items to return.
3690
+ # @param page_token [::String]
3691
+ # The next_page_token value to use if there are additional
3692
+ # results to retrieve for this list request.
3693
+ # @param order_by [::String]
3694
+ # Sort results. Supported values are "name", "name desc" or "" (unsorted).
3695
+ # @param filter [::String]
3696
+ # List filter.
3697
+ # @yield [result, operation] Access the result along with the TransportOperation object
3698
+ # @yieldparam result [::Google::Cloud::NetApp::V1::ListBackupVaultsResponse]
3699
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3700
+ #
3701
+ # @return [::Google::Cloud::NetApp::V1::ListBackupVaultsResponse]
3702
+ #
3703
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3704
+ #
3705
+ # @example Basic example
3706
+ # require "google/cloud/netapp/v1"
3707
+ #
3708
+ # # Create a client object. The client can be reused for multiple calls.
3709
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
3710
+ #
3711
+ # # Create a request. To set request fields, pass in keyword arguments.
3712
+ # request = Google::Cloud::NetApp::V1::ListBackupVaultsRequest.new
3713
+ #
3714
+ # # Call the list_backup_vaults method.
3715
+ # result = client.list_backup_vaults request
3716
+ #
3717
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3718
+ # # over elements, and API calls will be issued to fetch pages as needed.
3719
+ # result.each do |item|
3720
+ # # Each element is of type ::Google::Cloud::NetApp::V1::BackupVault.
3721
+ # p item
3722
+ # end
3723
+ #
3724
+ def list_backup_vaults request, options = nil
3725
+ raise ::ArgumentError, "request must be provided" if request.nil?
3726
+
3727
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListBackupVaultsRequest
3728
+
3729
+ # Converts hash and nil to an options object
3730
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3731
+
3732
+ # Customize the options with defaults
3733
+ call_metadata = @config.rpcs.list_backup_vaults.metadata.to_h
3734
+
3735
+ # Set x-goog-api-client and x-goog-user-project headers
3736
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3737
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3738
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
3739
+ transports_version_send: [:rest]
3740
+
3741
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3742
+
3743
+ options.apply_defaults timeout: @config.rpcs.list_backup_vaults.timeout,
3744
+ metadata: call_metadata,
3745
+ retry_policy: @config.rpcs.list_backup_vaults.retry_policy
3746
+
3747
+ options.apply_defaults timeout: @config.timeout,
3748
+ metadata: @config.metadata,
3749
+ retry_policy: @config.retry_policy
3750
+
3751
+ @net_app_stub.list_backup_vaults request, options do |result, operation|
3752
+ yield result, operation if block_given?
3753
+ return result
3754
+ end
3755
+ rescue ::Gapic::Rest::Error => e
3756
+ raise ::Google::Cloud::Error.from_error(e)
3757
+ end
3758
+
3759
+ ##
3760
+ # Updates the settings of a specific backup vault.
3761
+ #
3762
+ # @overload update_backup_vault(request, options = nil)
3763
+ # Pass arguments to `update_backup_vault` via a request object, either of type
3764
+ # {::Google::Cloud::NetApp::V1::UpdateBackupVaultRequest} or an equivalent Hash.
3765
+ #
3766
+ # @param request [::Google::Cloud::NetApp::V1::UpdateBackupVaultRequest, ::Hash]
3767
+ # A request object representing the call parameters. Required. To specify no
3768
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3769
+ # @param options [::Gapic::CallOptions, ::Hash]
3770
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3771
+ #
3772
+ # @overload update_backup_vault(update_mask: nil, backup_vault: nil)
3773
+ # Pass arguments to `update_backup_vault` via keyword arguments. Note that at
3774
+ # least one keyword argument is required. To specify no parameters, or to keep all
3775
+ # the default parameter values, pass an empty Hash as a request object (see above).
3776
+ #
3777
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3778
+ # Required. Field mask is used to specify the fields to be overwritten in the
3779
+ # Backup resource to be updated.
3780
+ # The fields specified in the update_mask are relative to the resource, not
3781
+ # the full request. A field will be overwritten if it is in the mask. If the
3782
+ # user does not provide a mask then all fields will be overwritten.
3783
+ # @param backup_vault [::Google::Cloud::NetApp::V1::BackupVault, ::Hash]
3784
+ # Required. The backupVault being updated
3785
+ # @yield [result, operation] Access the result along with the TransportOperation object
3786
+ # @yieldparam result [::Gapic::Operation]
3787
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3788
+ #
3789
+ # @return [::Gapic::Operation]
3790
+ #
3791
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3792
+ #
3793
+ # @example Basic example
3794
+ # require "google/cloud/netapp/v1"
3795
+ #
3796
+ # # Create a client object. The client can be reused for multiple calls.
3797
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
3798
+ #
3799
+ # # Create a request. To set request fields, pass in keyword arguments.
3800
+ # request = Google::Cloud::NetApp::V1::UpdateBackupVaultRequest.new
3801
+ #
3802
+ # # Call the update_backup_vault method.
3803
+ # result = client.update_backup_vault request
3804
+ #
3805
+ # # The returned object is of type Gapic::Operation. You can use it to
3806
+ # # check the status of an operation, cancel it, or wait for results.
3807
+ # # Here is how to wait for a response.
3808
+ # result.wait_until_done! timeout: 60
3809
+ # if result.response?
3810
+ # p result.response
3811
+ # else
3812
+ # puts "No response received."
3813
+ # end
3814
+ #
3815
+ def update_backup_vault request, options = nil
3816
+ raise ::ArgumentError, "request must be provided" if request.nil?
3817
+
3818
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateBackupVaultRequest
3819
+
3820
+ # Converts hash and nil to an options object
3821
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3822
+
3823
+ # Customize the options with defaults
3824
+ call_metadata = @config.rpcs.update_backup_vault.metadata.to_h
3825
+
3826
+ # Set x-goog-api-client and x-goog-user-project headers
3827
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3828
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3829
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
3830
+ transports_version_send: [:rest]
3831
+
3832
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3833
+
3834
+ options.apply_defaults timeout: @config.rpcs.update_backup_vault.timeout,
3835
+ metadata: call_metadata,
3836
+ retry_policy: @config.rpcs.update_backup_vault.retry_policy
3837
+
3838
+ options.apply_defaults timeout: @config.timeout,
3839
+ metadata: @config.metadata,
3840
+ retry_policy: @config.retry_policy
3841
+
3842
+ @net_app_stub.update_backup_vault request, options do |result, operation|
3843
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3844
+ yield result, operation if block_given?
3845
+ return result
3846
+ end
3847
+ rescue ::Gapic::Rest::Error => e
3848
+ raise ::Google::Cloud::Error.from_error(e)
3849
+ end
3850
+
3851
+ ##
3852
+ # Warning! This operation will permanently delete the backup vault.
3853
+ #
3854
+ # @overload delete_backup_vault(request, options = nil)
3855
+ # Pass arguments to `delete_backup_vault` via a request object, either of type
3856
+ # {::Google::Cloud::NetApp::V1::DeleteBackupVaultRequest} or an equivalent Hash.
3857
+ #
3858
+ # @param request [::Google::Cloud::NetApp::V1::DeleteBackupVaultRequest, ::Hash]
3859
+ # A request object representing the call parameters. Required. To specify no
3860
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3861
+ # @param options [::Gapic::CallOptions, ::Hash]
3862
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3863
+ #
3864
+ # @overload delete_backup_vault(name: nil)
3865
+ # Pass arguments to `delete_backup_vault` via keyword arguments. Note that at
3866
+ # least one keyword argument is required. To specify no parameters, or to keep all
3867
+ # the default parameter values, pass an empty Hash as a request object (see above).
3868
+ #
3869
+ # @param name [::String]
3870
+ # Required. The backupVault resource name, in the format
3871
+ # `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
3872
+ # @yield [result, operation] Access the result along with the TransportOperation object
3873
+ # @yieldparam result [::Gapic::Operation]
3874
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3875
+ #
3876
+ # @return [::Gapic::Operation]
3877
+ #
3878
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3879
+ #
3880
+ # @example Basic example
3881
+ # require "google/cloud/netapp/v1"
3882
+ #
3883
+ # # Create a client object. The client can be reused for multiple calls.
3884
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
3885
+ #
3886
+ # # Create a request. To set request fields, pass in keyword arguments.
3887
+ # request = Google::Cloud::NetApp::V1::DeleteBackupVaultRequest.new
3888
+ #
3889
+ # # Call the delete_backup_vault method.
3890
+ # result = client.delete_backup_vault request
3891
+ #
3892
+ # # The returned object is of type Gapic::Operation. You can use it to
3893
+ # # check the status of an operation, cancel it, or wait for results.
3894
+ # # Here is how to wait for a response.
3895
+ # result.wait_until_done! timeout: 60
3896
+ # if result.response?
3897
+ # p result.response
3898
+ # else
3899
+ # puts "No response received."
3900
+ # end
3901
+ #
3902
+ def delete_backup_vault request, options = nil
3903
+ raise ::ArgumentError, "request must be provided" if request.nil?
3904
+
3905
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteBackupVaultRequest
3906
+
3907
+ # Converts hash and nil to an options object
3908
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3909
+
3910
+ # Customize the options with defaults
3911
+ call_metadata = @config.rpcs.delete_backup_vault.metadata.to_h
3912
+
3913
+ # Set x-goog-api-client and x-goog-user-project headers
3914
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3915
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3916
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
3917
+ transports_version_send: [:rest]
3918
+
3919
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3920
+
3921
+ options.apply_defaults timeout: @config.rpcs.delete_backup_vault.timeout,
3922
+ metadata: call_metadata,
3923
+ retry_policy: @config.rpcs.delete_backup_vault.retry_policy
3924
+
3925
+ options.apply_defaults timeout: @config.timeout,
3926
+ metadata: @config.metadata,
3927
+ retry_policy: @config.retry_policy
3928
+
3929
+ @net_app_stub.delete_backup_vault request, options do |result, operation|
3930
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3931
+ yield result, operation if block_given?
3932
+ return result
3933
+ end
3934
+ rescue ::Gapic::Rest::Error => e
3935
+ raise ::Google::Cloud::Error.from_error(e)
3936
+ end
3937
+
3938
+ ##
3939
+ # Creates a backup from the volume specified in the request
3940
+ # The backup can be created from the given snapshot if specified in the
3941
+ # request. If no snapshot specified, there'll be a new snapshot taken to
3942
+ # initiate the backup creation.
3943
+ #
3944
+ # @overload create_backup(request, options = nil)
3945
+ # Pass arguments to `create_backup` via a request object, either of type
3946
+ # {::Google::Cloud::NetApp::V1::CreateBackupRequest} or an equivalent Hash.
3947
+ #
3948
+ # @param request [::Google::Cloud::NetApp::V1::CreateBackupRequest, ::Hash]
3949
+ # A request object representing the call parameters. Required. To specify no
3950
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3951
+ # @param options [::Gapic::CallOptions, ::Hash]
3952
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3953
+ #
3954
+ # @overload create_backup(parent: nil, backup_id: nil, backup: nil)
3955
+ # Pass arguments to `create_backup` via keyword arguments. Note that at
3956
+ # least one keyword argument is required. To specify no parameters, or to keep all
3957
+ # the default parameter values, pass an empty Hash as a request object (see above).
3958
+ #
3959
+ # @param parent [::String]
3960
+ # Required. The NetApp backupVault to create the backups of, in the format
3961
+ # `projects/*/locations/*/backupVaults/{backup_vault_id}`
3962
+ # @param backup_id [::String]
3963
+ # Required. The ID to use for the backup.
3964
+ # The ID must be unique within the specified backupVault.
3965
+ # This value must start with a lowercase letter followed by up to 62
3966
+ # lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
3967
+ # Values that do not match this pattern will trigger an INVALID_ARGUMENT
3968
+ # error.
3969
+ # @param backup [::Google::Cloud::NetApp::V1::Backup, ::Hash]
3970
+ # Required. A backup resource
3971
+ # @yield [result, operation] Access the result along with the TransportOperation object
3972
+ # @yieldparam result [::Gapic::Operation]
3973
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3974
+ #
3975
+ # @return [::Gapic::Operation]
3976
+ #
3977
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3978
+ #
3979
+ # @example Basic example
3980
+ # require "google/cloud/netapp/v1"
3981
+ #
3982
+ # # Create a client object. The client can be reused for multiple calls.
3983
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
3984
+ #
3985
+ # # Create a request. To set request fields, pass in keyword arguments.
3986
+ # request = Google::Cloud::NetApp::V1::CreateBackupRequest.new
3987
+ #
3988
+ # # Call the create_backup method.
3989
+ # result = client.create_backup request
3990
+ #
3991
+ # # The returned object is of type Gapic::Operation. You can use it to
3992
+ # # check the status of an operation, cancel it, or wait for results.
3993
+ # # Here is how to wait for a response.
3994
+ # result.wait_until_done! timeout: 60
3995
+ # if result.response?
3996
+ # p result.response
3997
+ # else
3998
+ # puts "No response received."
3999
+ # end
4000
+ #
4001
+ def create_backup request, options = nil
4002
+ raise ::ArgumentError, "request must be provided" if request.nil?
4003
+
4004
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateBackupRequest
4005
+
4006
+ # Converts hash and nil to an options object
4007
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4008
+
4009
+ # Customize the options with defaults
4010
+ call_metadata = @config.rpcs.create_backup.metadata.to_h
4011
+
4012
+ # Set x-goog-api-client and x-goog-user-project headers
4013
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4014
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4015
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
4016
+ transports_version_send: [:rest]
4017
+
4018
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4019
+
4020
+ options.apply_defaults timeout: @config.rpcs.create_backup.timeout,
4021
+ metadata: call_metadata,
4022
+ retry_policy: @config.rpcs.create_backup.retry_policy
4023
+
4024
+ options.apply_defaults timeout: @config.timeout,
4025
+ metadata: @config.metadata,
4026
+ retry_policy: @config.retry_policy
4027
+
4028
+ @net_app_stub.create_backup request, options do |result, operation|
4029
+ result = ::Gapic::Operation.new result, @operations_client, options: options
4030
+ yield result, operation if block_given?
4031
+ return result
4032
+ end
4033
+ rescue ::Gapic::Rest::Error => e
4034
+ raise ::Google::Cloud::Error.from_error(e)
4035
+ end
4036
+
4037
+ ##
4038
+ # Returns the description of the specified backup
4039
+ #
4040
+ # @overload get_backup(request, options = nil)
4041
+ # Pass arguments to `get_backup` via a request object, either of type
4042
+ # {::Google::Cloud::NetApp::V1::GetBackupRequest} or an equivalent Hash.
4043
+ #
4044
+ # @param request [::Google::Cloud::NetApp::V1::GetBackupRequest, ::Hash]
4045
+ # A request object representing the call parameters. Required. To specify no
4046
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4047
+ # @param options [::Gapic::CallOptions, ::Hash]
4048
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4049
+ #
4050
+ # @overload get_backup(name: nil)
4051
+ # Pass arguments to `get_backup` via keyword arguments. Note that at
4052
+ # least one keyword argument is required. To specify no parameters, or to keep all
4053
+ # the default parameter values, pass an empty Hash as a request object (see above).
4054
+ #
4055
+ # @param name [::String]
4056
+ # Required. The backup resource name, in the format
4057
+ # `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
4058
+ # @yield [result, operation] Access the result along with the TransportOperation object
4059
+ # @yieldparam result [::Google::Cloud::NetApp::V1::Backup]
4060
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4061
+ #
4062
+ # @return [::Google::Cloud::NetApp::V1::Backup]
4063
+ #
4064
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4065
+ #
4066
+ # @example Basic example
4067
+ # require "google/cloud/netapp/v1"
4068
+ #
4069
+ # # Create a client object. The client can be reused for multiple calls.
4070
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
4071
+ #
4072
+ # # Create a request. To set request fields, pass in keyword arguments.
4073
+ # request = Google::Cloud::NetApp::V1::GetBackupRequest.new
4074
+ #
4075
+ # # Call the get_backup method.
4076
+ # result = client.get_backup request
4077
+ #
4078
+ # # The returned object is of type Google::Cloud::NetApp::V1::Backup.
4079
+ # p result
4080
+ #
4081
+ def get_backup request, options = nil
4082
+ raise ::ArgumentError, "request must be provided" if request.nil?
4083
+
4084
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetBackupRequest
4085
+
4086
+ # Converts hash and nil to an options object
4087
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4088
+
4089
+ # Customize the options with defaults
4090
+ call_metadata = @config.rpcs.get_backup.metadata.to_h
4091
+
4092
+ # Set x-goog-api-client and x-goog-user-project headers
4093
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4094
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4095
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
4096
+ transports_version_send: [:rest]
4097
+
4098
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4099
+
4100
+ options.apply_defaults timeout: @config.rpcs.get_backup.timeout,
4101
+ metadata: call_metadata,
4102
+ retry_policy: @config.rpcs.get_backup.retry_policy
4103
+
4104
+ options.apply_defaults timeout: @config.timeout,
4105
+ metadata: @config.metadata,
4106
+ retry_policy: @config.retry_policy
4107
+
4108
+ @net_app_stub.get_backup request, options do |result, operation|
4109
+ yield result, operation if block_given?
4110
+ return result
4111
+ end
4112
+ rescue ::Gapic::Rest::Error => e
4113
+ raise ::Google::Cloud::Error.from_error(e)
4114
+ end
4115
+
4116
+ ##
4117
+ # Returns descriptions of all backups for a backupVault.
4118
+ #
4119
+ # @overload list_backups(request, options = nil)
4120
+ # Pass arguments to `list_backups` via a request object, either of type
4121
+ # {::Google::Cloud::NetApp::V1::ListBackupsRequest} or an equivalent Hash.
4122
+ #
4123
+ # @param request [::Google::Cloud::NetApp::V1::ListBackupsRequest, ::Hash]
4124
+ # A request object representing the call parameters. Required. To specify no
4125
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4126
+ # @param options [::Gapic::CallOptions, ::Hash]
4127
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4128
+ #
4129
+ # @overload list_backups(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil)
4130
+ # Pass arguments to `list_backups` via keyword arguments. Note that at
4131
+ # least one keyword argument is required. To specify no parameters, or to keep all
4132
+ # the default parameter values, pass an empty Hash as a request object (see above).
4133
+ #
4134
+ # @param parent [::String]
4135
+ # Required. The backupVault for which to retrieve backup information,
4136
+ # in the format
4137
+ # `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
4138
+ # To retrieve backup information for all locations, use "-" for the
4139
+ # `{location}` value.
4140
+ # To retrieve backup information for all backupVaults, use "-" for the
4141
+ # `{backup_vault_id}` value.
4142
+ # To retrieve backup information for a volume, use "-" for the
4143
+ # `{backup_vault_id}` value and specify volume full name with the filter.
4144
+ # @param page_size [::Integer]
4145
+ # The maximum number of items to return. The service may return fewer
4146
+ # than this value. The maximum value
4147
+ # is 1000; values above 1000 will be coerced to 1000.
4148
+ # @param page_token [::String]
4149
+ # The next_page_token value to use if there are additional
4150
+ # results to retrieve for this list request.
4151
+ # @param order_by [::String]
4152
+ # Sort results. Supported values are "name", "name desc" or "" (unsorted).
4153
+ # @param filter [::String]
4154
+ # The standard list filter.
4155
+ # If specified, backups will be returned based on the attribute name that
4156
+ # matches the filter expression. If empty, then no backups are filtered out.
4157
+ # See https://google.aip.dev/160
4158
+ # @yield [result, operation] Access the result along with the TransportOperation object
4159
+ # @yieldparam result [::Google::Cloud::NetApp::V1::ListBackupsResponse]
4160
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4161
+ #
4162
+ # @return [::Google::Cloud::NetApp::V1::ListBackupsResponse]
4163
+ #
4164
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4165
+ #
4166
+ # @example Basic example
4167
+ # require "google/cloud/netapp/v1"
4168
+ #
4169
+ # # Create a client object. The client can be reused for multiple calls.
4170
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
4171
+ #
4172
+ # # Create a request. To set request fields, pass in keyword arguments.
4173
+ # request = Google::Cloud::NetApp::V1::ListBackupsRequest.new
4174
+ #
4175
+ # # Call the list_backups method.
4176
+ # result = client.list_backups request
4177
+ #
4178
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
4179
+ # # over elements, and API calls will be issued to fetch pages as needed.
4180
+ # result.each do |item|
4181
+ # # Each element is of type ::Google::Cloud::NetApp::V1::Backup.
4182
+ # p item
4183
+ # end
4184
+ #
4185
+ def list_backups request, options = nil
4186
+ raise ::ArgumentError, "request must be provided" if request.nil?
4187
+
4188
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListBackupsRequest
4189
+
4190
+ # Converts hash and nil to an options object
4191
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4192
+
4193
+ # Customize the options with defaults
4194
+ call_metadata = @config.rpcs.list_backups.metadata.to_h
4195
+
4196
+ # Set x-goog-api-client and x-goog-user-project headers
4197
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4198
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4199
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
4200
+ transports_version_send: [:rest]
4201
+
4202
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4203
+
4204
+ options.apply_defaults timeout: @config.rpcs.list_backups.timeout,
4205
+ metadata: call_metadata,
4206
+ retry_policy: @config.rpcs.list_backups.retry_policy
4207
+
4208
+ options.apply_defaults timeout: @config.timeout,
4209
+ metadata: @config.metadata,
4210
+ retry_policy: @config.retry_policy
4211
+
4212
+ @net_app_stub.list_backups request, options do |result, operation|
4213
+ yield result, operation if block_given?
4214
+ return result
4215
+ end
4216
+ rescue ::Gapic::Rest::Error => e
4217
+ raise ::Google::Cloud::Error.from_error(e)
4218
+ end
4219
+
4220
+ ##
4221
+ # Warning! This operation will permanently delete the backup.
4222
+ #
4223
+ # @overload delete_backup(request, options = nil)
4224
+ # Pass arguments to `delete_backup` via a request object, either of type
4225
+ # {::Google::Cloud::NetApp::V1::DeleteBackupRequest} or an equivalent Hash.
4226
+ #
4227
+ # @param request [::Google::Cloud::NetApp::V1::DeleteBackupRequest, ::Hash]
4228
+ # A request object representing the call parameters. Required. To specify no
4229
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4230
+ # @param options [::Gapic::CallOptions, ::Hash]
4231
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4232
+ #
4233
+ # @overload delete_backup(name: nil)
4234
+ # Pass arguments to `delete_backup` via keyword arguments. Note that at
4235
+ # least one keyword argument is required. To specify no parameters, or to keep all
4236
+ # the default parameter values, pass an empty Hash as a request object (see above).
4237
+ #
4238
+ # @param name [::String]
4239
+ # Required. The backup resource name, in the format
4240
+ # `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
4241
+ # @yield [result, operation] Access the result along with the TransportOperation object
4242
+ # @yieldparam result [::Gapic::Operation]
4243
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4244
+ #
4245
+ # @return [::Gapic::Operation]
4246
+ #
4247
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4248
+ #
4249
+ # @example Basic example
4250
+ # require "google/cloud/netapp/v1"
4251
+ #
4252
+ # # Create a client object. The client can be reused for multiple calls.
4253
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
4254
+ #
4255
+ # # Create a request. To set request fields, pass in keyword arguments.
4256
+ # request = Google::Cloud::NetApp::V1::DeleteBackupRequest.new
4257
+ #
4258
+ # # Call the delete_backup method.
4259
+ # result = client.delete_backup request
4260
+ #
4261
+ # # The returned object is of type Gapic::Operation. You can use it to
4262
+ # # check the status of an operation, cancel it, or wait for results.
4263
+ # # Here is how to wait for a response.
4264
+ # result.wait_until_done! timeout: 60
4265
+ # if result.response?
4266
+ # p result.response
4267
+ # else
4268
+ # puts "No response received."
4269
+ # end
4270
+ #
4271
+ def delete_backup request, options = nil
4272
+ raise ::ArgumentError, "request must be provided" if request.nil?
4273
+
4274
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteBackupRequest
4275
+
4276
+ # Converts hash and nil to an options object
4277
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4278
+
4279
+ # Customize the options with defaults
4280
+ call_metadata = @config.rpcs.delete_backup.metadata.to_h
4281
+
4282
+ # Set x-goog-api-client and x-goog-user-project headers
4283
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4284
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4285
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
4286
+ transports_version_send: [:rest]
4287
+
4288
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4289
+
4290
+ options.apply_defaults timeout: @config.rpcs.delete_backup.timeout,
4291
+ metadata: call_metadata,
4292
+ retry_policy: @config.rpcs.delete_backup.retry_policy
4293
+
4294
+ options.apply_defaults timeout: @config.timeout,
4295
+ metadata: @config.metadata,
4296
+ retry_policy: @config.retry_policy
4297
+
4298
+ @net_app_stub.delete_backup request, options do |result, operation|
4299
+ result = ::Gapic::Operation.new result, @operations_client, options: options
4300
+ yield result, operation if block_given?
4301
+ return result
4302
+ end
4303
+ rescue ::Gapic::Rest::Error => e
4304
+ raise ::Google::Cloud::Error.from_error(e)
4305
+ end
4306
+
4307
+ ##
4308
+ # Update backup with full spec.
4309
+ #
4310
+ # @overload update_backup(request, options = nil)
4311
+ # Pass arguments to `update_backup` via a request object, either of type
4312
+ # {::Google::Cloud::NetApp::V1::UpdateBackupRequest} or an equivalent Hash.
4313
+ #
4314
+ # @param request [::Google::Cloud::NetApp::V1::UpdateBackupRequest, ::Hash]
4315
+ # A request object representing the call parameters. Required. To specify no
4316
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4317
+ # @param options [::Gapic::CallOptions, ::Hash]
4318
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4319
+ #
4320
+ # @overload update_backup(update_mask: nil, backup: nil)
4321
+ # Pass arguments to `update_backup` via keyword arguments. Note that at
4322
+ # least one keyword argument is required. To specify no parameters, or to keep all
4323
+ # the default parameter values, pass an empty Hash as a request object (see above).
4324
+ #
4325
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
4326
+ # Required. Field mask is used to specify the fields to be overwritten in the
4327
+ # Backup resource to be updated.
4328
+ # The fields specified in the update_mask are relative to the resource, not
4329
+ # the full request. A field will be overwritten if it is in the mask. If the
4330
+ # user does not provide a mask then all fields will be overwritten.
4331
+ # @param backup [::Google::Cloud::NetApp::V1::Backup, ::Hash]
4332
+ # Required. The backup being updated
4333
+ # @yield [result, operation] Access the result along with the TransportOperation object
4334
+ # @yieldparam result [::Gapic::Operation]
4335
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4336
+ #
4337
+ # @return [::Gapic::Operation]
4338
+ #
4339
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4340
+ #
4341
+ # @example Basic example
4342
+ # require "google/cloud/netapp/v1"
4343
+ #
4344
+ # # Create a client object. The client can be reused for multiple calls.
4345
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
4346
+ #
4347
+ # # Create a request. To set request fields, pass in keyword arguments.
4348
+ # request = Google::Cloud::NetApp::V1::UpdateBackupRequest.new
4349
+ #
4350
+ # # Call the update_backup method.
4351
+ # result = client.update_backup request
4352
+ #
4353
+ # # The returned object is of type Gapic::Operation. You can use it to
4354
+ # # check the status of an operation, cancel it, or wait for results.
4355
+ # # Here is how to wait for a response.
4356
+ # result.wait_until_done! timeout: 60
4357
+ # if result.response?
4358
+ # p result.response
4359
+ # else
4360
+ # puts "No response received."
4361
+ # end
4362
+ #
4363
+ def update_backup request, options = nil
4364
+ raise ::ArgumentError, "request must be provided" if request.nil?
4365
+
4366
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateBackupRequest
4367
+
4368
+ # Converts hash and nil to an options object
4369
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4370
+
4371
+ # Customize the options with defaults
4372
+ call_metadata = @config.rpcs.update_backup.metadata.to_h
4373
+
4374
+ # Set x-goog-api-client and x-goog-user-project headers
4375
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4376
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4377
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
4378
+ transports_version_send: [:rest]
4379
+
4380
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4381
+
4382
+ options.apply_defaults timeout: @config.rpcs.update_backup.timeout,
4383
+ metadata: call_metadata,
4384
+ retry_policy: @config.rpcs.update_backup.retry_policy
4385
+
4386
+ options.apply_defaults timeout: @config.timeout,
4387
+ metadata: @config.metadata,
4388
+ retry_policy: @config.retry_policy
4389
+
4390
+ @net_app_stub.update_backup request, options do |result, operation|
4391
+ result = ::Gapic::Operation.new result, @operations_client, options: options
4392
+ yield result, operation if block_given?
4393
+ return result
4394
+ end
4395
+ rescue ::Gapic::Rest::Error => e
4396
+ raise ::Google::Cloud::Error.from_error(e)
4397
+ end
4398
+
4399
+ ##
4400
+ # Creates new backup policy
4401
+ #
4402
+ # @overload create_backup_policy(request, options = nil)
4403
+ # Pass arguments to `create_backup_policy` via a request object, either of type
4404
+ # {::Google::Cloud::NetApp::V1::CreateBackupPolicyRequest} or an equivalent Hash.
4405
+ #
4406
+ # @param request [::Google::Cloud::NetApp::V1::CreateBackupPolicyRequest, ::Hash]
4407
+ # A request object representing the call parameters. Required. To specify no
4408
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4409
+ # @param options [::Gapic::CallOptions, ::Hash]
4410
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4411
+ #
4412
+ # @overload create_backup_policy(parent: nil, backup_policy: nil, backup_policy_id: nil)
4413
+ # Pass arguments to `create_backup_policy` via keyword arguments. Note that at
4414
+ # least one keyword argument is required. To specify no parameters, or to keep all
4415
+ # the default parameter values, pass an empty Hash as a request object (see above).
4416
+ #
4417
+ # @param parent [::String]
4418
+ # Required. The location to create the backup policies of, in the format
4419
+ # `projects/{project_id}/locations/{location}`
4420
+ # @param backup_policy [::Google::Cloud::NetApp::V1::BackupPolicy, ::Hash]
4421
+ # Required. A backupPolicy resource
4422
+ # @param backup_policy_id [::String]
4423
+ # Required. The ID to use for the backup policy.
4424
+ # The ID must be unique within the specified location.
4425
+ # This value must start with a lowercase letter followed by up to 62
4426
+ # lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
4427
+ # @yield [result, operation] Access the result along with the TransportOperation object
4428
+ # @yieldparam result [::Gapic::Operation]
4429
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4430
+ #
4431
+ # @return [::Gapic::Operation]
4432
+ #
4433
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4434
+ #
4435
+ # @example Basic example
4436
+ # require "google/cloud/netapp/v1"
4437
+ #
4438
+ # # Create a client object. The client can be reused for multiple calls.
4439
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
4440
+ #
4441
+ # # Create a request. To set request fields, pass in keyword arguments.
4442
+ # request = Google::Cloud::NetApp::V1::CreateBackupPolicyRequest.new
4443
+ #
4444
+ # # Call the create_backup_policy method.
4445
+ # result = client.create_backup_policy request
4446
+ #
4447
+ # # The returned object is of type Gapic::Operation. You can use it to
4448
+ # # check the status of an operation, cancel it, or wait for results.
4449
+ # # Here is how to wait for a response.
4450
+ # result.wait_until_done! timeout: 60
4451
+ # if result.response?
4452
+ # p result.response
4453
+ # else
4454
+ # puts "No response received."
4455
+ # end
4456
+ #
4457
+ def create_backup_policy request, options = nil
4458
+ raise ::ArgumentError, "request must be provided" if request.nil?
4459
+
4460
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateBackupPolicyRequest
4461
+
4462
+ # Converts hash and nil to an options object
4463
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4464
+
4465
+ # Customize the options with defaults
4466
+ call_metadata = @config.rpcs.create_backup_policy.metadata.to_h
4467
+
4468
+ # Set x-goog-api-client and x-goog-user-project headers
4469
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4470
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4471
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
4472
+ transports_version_send: [:rest]
4473
+
4474
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4475
+
4476
+ options.apply_defaults timeout: @config.rpcs.create_backup_policy.timeout,
4477
+ metadata: call_metadata,
4478
+ retry_policy: @config.rpcs.create_backup_policy.retry_policy
4479
+
4480
+ options.apply_defaults timeout: @config.timeout,
4481
+ metadata: @config.metadata,
4482
+ retry_policy: @config.retry_policy
4483
+
4484
+ @net_app_stub.create_backup_policy request, options do |result, operation|
4485
+ result = ::Gapic::Operation.new result, @operations_client, options: options
4486
+ yield result, operation if block_given?
4487
+ return result
4488
+ end
4489
+ rescue ::Gapic::Rest::Error => e
4490
+ raise ::Google::Cloud::Error.from_error(e)
4491
+ end
4492
+
4493
+ ##
4494
+ # Returns the description of the specified backup policy by backup_policy_id.
4495
+ #
4496
+ # @overload get_backup_policy(request, options = nil)
4497
+ # Pass arguments to `get_backup_policy` via a request object, either of type
4498
+ # {::Google::Cloud::NetApp::V1::GetBackupPolicyRequest} or an equivalent Hash.
4499
+ #
4500
+ # @param request [::Google::Cloud::NetApp::V1::GetBackupPolicyRequest, ::Hash]
4501
+ # A request object representing the call parameters. Required. To specify no
4502
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4503
+ # @param options [::Gapic::CallOptions, ::Hash]
4504
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4505
+ #
4506
+ # @overload get_backup_policy(name: nil)
4507
+ # Pass arguments to `get_backup_policy` via keyword arguments. Note that at
4508
+ # least one keyword argument is required. To specify no parameters, or to keep all
4509
+ # the default parameter values, pass an empty Hash as a request object (see above).
4510
+ #
4511
+ # @param name [::String]
4512
+ # Required. The backupPolicy resource name, in the format
4513
+ # `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
4514
+ # @yield [result, operation] Access the result along with the TransportOperation object
4515
+ # @yieldparam result [::Google::Cloud::NetApp::V1::BackupPolicy]
4516
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4517
+ #
4518
+ # @return [::Google::Cloud::NetApp::V1::BackupPolicy]
4519
+ #
4520
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4521
+ #
4522
+ # @example Basic example
4523
+ # require "google/cloud/netapp/v1"
4524
+ #
4525
+ # # Create a client object. The client can be reused for multiple calls.
4526
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
4527
+ #
4528
+ # # Create a request. To set request fields, pass in keyword arguments.
4529
+ # request = Google::Cloud::NetApp::V1::GetBackupPolicyRequest.new
4530
+ #
4531
+ # # Call the get_backup_policy method.
4532
+ # result = client.get_backup_policy request
4533
+ #
4534
+ # # The returned object is of type Google::Cloud::NetApp::V1::BackupPolicy.
4535
+ # p result
4536
+ #
4537
+ def get_backup_policy request, options = nil
4538
+ raise ::ArgumentError, "request must be provided" if request.nil?
4539
+
4540
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetBackupPolicyRequest
4541
+
4542
+ # Converts hash and nil to an options object
4543
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4544
+
4545
+ # Customize the options with defaults
4546
+ call_metadata = @config.rpcs.get_backup_policy.metadata.to_h
4547
+
4548
+ # Set x-goog-api-client and x-goog-user-project headers
4549
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4550
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4551
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
4552
+ transports_version_send: [:rest]
4553
+
4554
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4555
+
4556
+ options.apply_defaults timeout: @config.rpcs.get_backup_policy.timeout,
4557
+ metadata: call_metadata,
4558
+ retry_policy: @config.rpcs.get_backup_policy.retry_policy
4559
+
4560
+ options.apply_defaults timeout: @config.timeout,
4561
+ metadata: @config.metadata,
4562
+ retry_policy: @config.retry_policy
4563
+
4564
+ @net_app_stub.get_backup_policy request, options do |result, operation|
4565
+ yield result, operation if block_given?
4566
+ return result
4567
+ end
4568
+ rescue ::Gapic::Rest::Error => e
4569
+ raise ::Google::Cloud::Error.from_error(e)
4570
+ end
4571
+
4572
+ ##
4573
+ # Returns list of all available backup policies.
4574
+ #
4575
+ # @overload list_backup_policies(request, options = nil)
4576
+ # Pass arguments to `list_backup_policies` via a request object, either of type
4577
+ # {::Google::Cloud::NetApp::V1::ListBackupPoliciesRequest} or an equivalent Hash.
4578
+ #
4579
+ # @param request [::Google::Cloud::NetApp::V1::ListBackupPoliciesRequest, ::Hash]
4580
+ # A request object representing the call parameters. Required. To specify no
4581
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4582
+ # @param options [::Gapic::CallOptions, ::Hash]
4583
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4584
+ #
4585
+ # @overload list_backup_policies(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
4586
+ # Pass arguments to `list_backup_policies` via keyword arguments. Note that at
4587
+ # least one keyword argument is required. To specify no parameters, or to keep all
4588
+ # the default parameter values, pass an empty Hash as a request object (see above).
4589
+ #
4590
+ # @param parent [::String]
4591
+ # Required. Parent value for ListBackupPoliciesRequest
4592
+ # @param page_size [::Integer]
4593
+ # Requested page size. Server may return fewer items than requested.
4594
+ # If unspecified, the server will pick an appropriate default.
4595
+ # @param page_token [::String]
4596
+ # A token identifying a page of results the server should return.
4597
+ # @param filter [::String]
4598
+ # Filtering results
4599
+ # @param order_by [::String]
4600
+ # Hint for how to order the results
4601
+ # @yield [result, operation] Access the result along with the TransportOperation object
4602
+ # @yieldparam result [::Google::Cloud::NetApp::V1::ListBackupPoliciesResponse]
4603
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4604
+ #
4605
+ # @return [::Google::Cloud::NetApp::V1::ListBackupPoliciesResponse]
4606
+ #
4607
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4608
+ #
4609
+ # @example Basic example
4610
+ # require "google/cloud/netapp/v1"
4611
+ #
4612
+ # # Create a client object. The client can be reused for multiple calls.
4613
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
4614
+ #
4615
+ # # Create a request. To set request fields, pass in keyword arguments.
4616
+ # request = Google::Cloud::NetApp::V1::ListBackupPoliciesRequest.new
4617
+ #
4618
+ # # Call the list_backup_policies method.
4619
+ # result = client.list_backup_policies request
4620
+ #
4621
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
4622
+ # # over elements, and API calls will be issued to fetch pages as needed.
4623
+ # result.each do |item|
4624
+ # # Each element is of type ::Google::Cloud::NetApp::V1::BackupPolicy.
4625
+ # p item
4626
+ # end
4627
+ #
4628
+ def list_backup_policies request, options = nil
4629
+ raise ::ArgumentError, "request must be provided" if request.nil?
4630
+
4631
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListBackupPoliciesRequest
4632
+
4633
+ # Converts hash and nil to an options object
4634
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4635
+
4636
+ # Customize the options with defaults
4637
+ call_metadata = @config.rpcs.list_backup_policies.metadata.to_h
4638
+
4639
+ # Set x-goog-api-client and x-goog-user-project headers
4640
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4641
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4642
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
4643
+ transports_version_send: [:rest]
4644
+
4645
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4646
+
4647
+ options.apply_defaults timeout: @config.rpcs.list_backup_policies.timeout,
4648
+ metadata: call_metadata,
4649
+ retry_policy: @config.rpcs.list_backup_policies.retry_policy
4650
+
4651
+ options.apply_defaults timeout: @config.timeout,
4652
+ metadata: @config.metadata,
4653
+ retry_policy: @config.retry_policy
4654
+
4655
+ @net_app_stub.list_backup_policies request, options do |result, operation|
4656
+ yield result, operation if block_given?
4657
+ return result
4658
+ end
4659
+ rescue ::Gapic::Rest::Error => e
4660
+ raise ::Google::Cloud::Error.from_error(e)
4661
+ end
4662
+
4663
+ ##
4664
+ # Updates settings of a specific backup policy.
4665
+ #
4666
+ # @overload update_backup_policy(request, options = nil)
4667
+ # Pass arguments to `update_backup_policy` via a request object, either of type
4668
+ # {::Google::Cloud::NetApp::V1::UpdateBackupPolicyRequest} or an equivalent Hash.
4669
+ #
4670
+ # @param request [::Google::Cloud::NetApp::V1::UpdateBackupPolicyRequest, ::Hash]
4671
+ # A request object representing the call parameters. Required. To specify no
4672
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4673
+ # @param options [::Gapic::CallOptions, ::Hash]
4674
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4675
+ #
4676
+ # @overload update_backup_policy(update_mask: nil, backup_policy: nil)
4677
+ # Pass arguments to `update_backup_policy` via keyword arguments. Note that at
4678
+ # least one keyword argument is required. To specify no parameters, or to keep all
4679
+ # the default parameter values, pass an empty Hash as a request object (see above).
4680
+ #
4681
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
4682
+ # Required. Field mask is used to specify the fields to be overwritten in the
4683
+ # Backup Policy resource by the update.
4684
+ # The fields specified in the update_mask are relative to the resource, not
4685
+ # the full request. A field will be overwritten if it is in the mask. If the
4686
+ # user does not provide a mask then all fields will be overwritten.
4687
+ # @param backup_policy [::Google::Cloud::NetApp::V1::BackupPolicy, ::Hash]
4688
+ # Required. The backup policy being updated
4689
+ # @yield [result, operation] Access the result along with the TransportOperation object
4690
+ # @yieldparam result [::Gapic::Operation]
4691
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4692
+ #
4693
+ # @return [::Gapic::Operation]
4694
+ #
4695
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4696
+ #
4697
+ # @example Basic example
4698
+ # require "google/cloud/netapp/v1"
4699
+ #
4700
+ # # Create a client object. The client can be reused for multiple calls.
4701
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
4702
+ #
4703
+ # # Create a request. To set request fields, pass in keyword arguments.
4704
+ # request = Google::Cloud::NetApp::V1::UpdateBackupPolicyRequest.new
4705
+ #
4706
+ # # Call the update_backup_policy method.
4707
+ # result = client.update_backup_policy request
4708
+ #
4709
+ # # The returned object is of type Gapic::Operation. You can use it to
4710
+ # # check the status of an operation, cancel it, or wait for results.
4711
+ # # Here is how to wait for a response.
4712
+ # result.wait_until_done! timeout: 60
4713
+ # if result.response?
4714
+ # p result.response
4715
+ # else
4716
+ # puts "No response received."
4717
+ # end
4718
+ #
4719
+ def update_backup_policy request, options = nil
4720
+ raise ::ArgumentError, "request must be provided" if request.nil?
4721
+
4722
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateBackupPolicyRequest
4723
+
4724
+ # Converts hash and nil to an options object
4725
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4726
+
4727
+ # Customize the options with defaults
4728
+ call_metadata = @config.rpcs.update_backup_policy.metadata.to_h
4729
+
4730
+ # Set x-goog-api-client and x-goog-user-project headers
4731
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4732
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4733
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
4734
+ transports_version_send: [:rest]
4735
+
4736
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4737
+
4738
+ options.apply_defaults timeout: @config.rpcs.update_backup_policy.timeout,
4739
+ metadata: call_metadata,
4740
+ retry_policy: @config.rpcs.update_backup_policy.retry_policy
4741
+
4742
+ options.apply_defaults timeout: @config.timeout,
4743
+ metadata: @config.metadata,
4744
+ retry_policy: @config.retry_policy
4745
+
4746
+ @net_app_stub.update_backup_policy request, options do |result, operation|
4747
+ result = ::Gapic::Operation.new result, @operations_client, options: options
4748
+ yield result, operation if block_given?
4749
+ return result
4750
+ end
4751
+ rescue ::Gapic::Rest::Error => e
4752
+ raise ::Google::Cloud::Error.from_error(e)
4753
+ end
4754
+
4755
+ ##
4756
+ # Warning! This operation will permanently delete the backup policy.
4757
+ #
4758
+ # @overload delete_backup_policy(request, options = nil)
4759
+ # Pass arguments to `delete_backup_policy` via a request object, either of type
4760
+ # {::Google::Cloud::NetApp::V1::DeleteBackupPolicyRequest} or an equivalent Hash.
4761
+ #
4762
+ # @param request [::Google::Cloud::NetApp::V1::DeleteBackupPolicyRequest, ::Hash]
4763
+ # A request object representing the call parameters. Required. To specify no
4764
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4765
+ # @param options [::Gapic::CallOptions, ::Hash]
4766
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4767
+ #
4768
+ # @overload delete_backup_policy(name: nil)
4769
+ # Pass arguments to `delete_backup_policy` via keyword arguments. Note that at
4770
+ # least one keyword argument is required. To specify no parameters, or to keep all
4771
+ # the default parameter values, pass an empty Hash as a request object (see above).
4772
+ #
4773
+ # @param name [::String]
4774
+ # Required. The backup policy resource name, in the format
4775
+ # `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
4776
+ # @yield [result, operation] Access the result along with the TransportOperation object
4777
+ # @yieldparam result [::Gapic::Operation]
4778
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4779
+ #
4780
+ # @return [::Gapic::Operation]
4781
+ #
4782
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4783
+ #
4784
+ # @example Basic example
4785
+ # require "google/cloud/netapp/v1"
4786
+ #
4787
+ # # Create a client object. The client can be reused for multiple calls.
4788
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
4789
+ #
4790
+ # # Create a request. To set request fields, pass in keyword arguments.
4791
+ # request = Google::Cloud::NetApp::V1::DeleteBackupPolicyRequest.new
4792
+ #
4793
+ # # Call the delete_backup_policy method.
4794
+ # result = client.delete_backup_policy request
4795
+ #
4796
+ # # The returned object is of type Gapic::Operation. You can use it to
4797
+ # # check the status of an operation, cancel it, or wait for results.
4798
+ # # Here is how to wait for a response.
4799
+ # result.wait_until_done! timeout: 60
4800
+ # if result.response?
4801
+ # p result.response
4802
+ # else
4803
+ # puts "No response received."
4804
+ # end
4805
+ #
4806
+ def delete_backup_policy request, options = nil
4807
+ raise ::ArgumentError, "request must be provided" if request.nil?
4808
+
4809
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteBackupPolicyRequest
4810
+
4811
+ # Converts hash and nil to an options object
4812
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4813
+
4814
+ # Customize the options with defaults
4815
+ call_metadata = @config.rpcs.delete_backup_policy.metadata.to_h
4816
+
4817
+ # Set x-goog-api-client and x-goog-user-project headers
4818
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4819
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4820
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
4821
+ transports_version_send: [:rest]
4822
+
4823
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4824
+
4825
+ options.apply_defaults timeout: @config.rpcs.delete_backup_policy.timeout,
4826
+ metadata: call_metadata,
4827
+ retry_policy: @config.rpcs.delete_backup_policy.retry_policy
4828
+
4829
+ options.apply_defaults timeout: @config.timeout,
4830
+ metadata: @config.metadata,
4831
+ retry_policy: @config.retry_policy
4832
+
4833
+ @net_app_stub.delete_backup_policy request, options do |result, operation|
4834
+ result = ::Gapic::Operation.new result, @operations_client, options: options
4835
+ yield result, operation if block_given?
4836
+ return result
4837
+ end
4838
+ rescue ::Gapic::Rest::Error => e
4839
+ raise ::Google::Cloud::Error.from_error(e)
4840
+ end
4841
+
4842
+ ##
4843
+ # Configuration class for the NetApp REST API.
4844
+ #
4845
+ # This class represents the configuration for NetApp REST,
4846
+ # providing control over timeouts, retry behavior, logging, transport
4847
+ # parameters, and other low-level controls. Certain parameters can also be
4848
+ # applied individually to specific RPCs. See
4849
+ # {::Google::Cloud::NetApp::V1::NetApp::Rest::Client::Configuration::Rpcs}
4850
+ # for a list of RPCs that can be configured independently.
4851
+ #
4852
+ # Configuration can be applied globally to all clients, or to a single client
4853
+ # on construction.
4854
+ #
4855
+ # @example
4856
+ #
4857
+ # # Modify the global config, setting the timeout for
4858
+ # # list_storage_pools to 20 seconds,
4859
+ # # and all remaining timeouts to 10 seconds.
4860
+ # ::Google::Cloud::NetApp::V1::NetApp::Rest::Client.configure do |config|
4861
+ # config.timeout = 10.0
4862
+ # config.rpcs.list_storage_pools.timeout = 20.0
4863
+ # end
4864
+ #
4865
+ # # Apply the above configuration only to a new client.
4866
+ # client = ::Google::Cloud::NetApp::V1::NetApp::Rest::Client.new do |config|
4867
+ # config.timeout = 10.0
4868
+ # config.rpcs.list_storage_pools.timeout = 20.0
4869
+ # end
4870
+ #
4871
+ # @!attribute [rw] endpoint
4872
+ # The hostname or hostname:port of the service endpoint.
4873
+ # Defaults to `"netapp.googleapis.com"`.
4874
+ # @return [::String]
4875
+ # @!attribute [rw] credentials
4876
+ # Credentials to send with calls. You may provide any of the following types:
4877
+ # * (`String`) The path to a service account key file in JSON format
4878
+ # * (`Hash`) A service account key as a Hash
4879
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
4880
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
4881
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
4882
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
4883
+ # * (`nil`) indicating no credentials
4884
+ # @return [::Object]
4885
+ # @!attribute [rw] scope
4886
+ # The OAuth scopes
4887
+ # @return [::Array<::String>]
4888
+ # @!attribute [rw] lib_name
4889
+ # The library name as recorded in instrumentation and logging
4890
+ # @return [::String]
4891
+ # @!attribute [rw] lib_version
4892
+ # The library version as recorded in instrumentation and logging
4893
+ # @return [::String]
4894
+ # @!attribute [rw] timeout
4895
+ # The call timeout in seconds.
4896
+ # @return [::Numeric]
4897
+ # @!attribute [rw] metadata
4898
+ # Additional headers to be sent with the call.
4899
+ # @return [::Hash{::Symbol=>::String}]
4900
+ # @!attribute [rw] retry_policy
4901
+ # The retry policy. The value is a hash with the following keys:
4902
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
4903
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
4904
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
4905
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
4906
+ # trigger a retry.
4907
+ # @return [::Hash]
4908
+ # @!attribute [rw] quota_project
4909
+ # A separate project against which to charge quota.
4910
+ # @return [::String]
4911
+ #
4912
+ class Configuration
4913
+ extend ::Gapic::Config
4914
+
4915
+ DEFAULT_ENDPOINT = "netapp.googleapis.com"
4916
+
4917
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
4918
+ config_attr :credentials, nil do |value|
4919
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
4920
+ allowed.any? { |klass| klass === value }
4921
+ end
4922
+ config_attr :scope, nil, ::String, ::Array, nil
4923
+ config_attr :lib_name, nil, ::String, nil
4924
+ config_attr :lib_version, nil, ::String, nil
4925
+ config_attr :timeout, nil, ::Numeric, nil
4926
+ config_attr :metadata, nil, ::Hash, nil
4927
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
4928
+ config_attr :quota_project, nil, ::String, nil
4929
+
4930
+ # @private
4931
+ # Overrides for http bindings for the RPCs of this service
4932
+ # are only used when this service is used as mixin, and only
4933
+ # by the host service.
4934
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
4935
+ config_attr :bindings_override, {}, ::Hash, nil
4936
+
4937
+ # @private
4938
+ def initialize parent_config = nil
4939
+ @parent_config = parent_config unless parent_config.nil?
4940
+
4941
+ yield self if block_given?
4942
+ end
4943
+
4944
+ ##
4945
+ # Configurations for individual RPCs
4946
+ # @return [Rpcs]
4947
+ #
4948
+ def rpcs
4949
+ @rpcs ||= begin
4950
+ parent_rpcs = nil
4951
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
4952
+ Rpcs.new parent_rpcs
4953
+ end
4954
+ end
4955
+
4956
+ ##
4957
+ # Configuration RPC class for the NetApp API.
4958
+ #
4959
+ # Includes fields providing the configuration for each RPC in this service.
4960
+ # Each configuration object is of type `Gapic::Config::Method` and includes
4961
+ # the following configuration fields:
4962
+ #
4963
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
4964
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
4965
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
4966
+ # include the following keys:
4967
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
4968
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
4969
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
4970
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
4971
+ # trigger a retry.
4972
+ #
4973
+ class Rpcs
4974
+ ##
4975
+ # RPC-specific configuration for `list_storage_pools`
3576
4976
  # @return [::Gapic::Config::Method]
3577
4977
  #
3578
4978
  attr_reader :list_storage_pools
@@ -3751,6 +5151,81 @@ module Google
3751
5151
  # @return [::Gapic::Config::Method]
3752
5152
  #
3753
5153
  attr_reader :reverse_replication_direction
5154
+ ##
5155
+ # RPC-specific configuration for `create_backup_vault`
5156
+ # @return [::Gapic::Config::Method]
5157
+ #
5158
+ attr_reader :create_backup_vault
5159
+ ##
5160
+ # RPC-specific configuration for `get_backup_vault`
5161
+ # @return [::Gapic::Config::Method]
5162
+ #
5163
+ attr_reader :get_backup_vault
5164
+ ##
5165
+ # RPC-specific configuration for `list_backup_vaults`
5166
+ # @return [::Gapic::Config::Method]
5167
+ #
5168
+ attr_reader :list_backup_vaults
5169
+ ##
5170
+ # RPC-specific configuration for `update_backup_vault`
5171
+ # @return [::Gapic::Config::Method]
5172
+ #
5173
+ attr_reader :update_backup_vault
5174
+ ##
5175
+ # RPC-specific configuration for `delete_backup_vault`
5176
+ # @return [::Gapic::Config::Method]
5177
+ #
5178
+ attr_reader :delete_backup_vault
5179
+ ##
5180
+ # RPC-specific configuration for `create_backup`
5181
+ # @return [::Gapic::Config::Method]
5182
+ #
5183
+ attr_reader :create_backup
5184
+ ##
5185
+ # RPC-specific configuration for `get_backup`
5186
+ # @return [::Gapic::Config::Method]
5187
+ #
5188
+ attr_reader :get_backup
5189
+ ##
5190
+ # RPC-specific configuration for `list_backups`
5191
+ # @return [::Gapic::Config::Method]
5192
+ #
5193
+ attr_reader :list_backups
5194
+ ##
5195
+ # RPC-specific configuration for `delete_backup`
5196
+ # @return [::Gapic::Config::Method]
5197
+ #
5198
+ attr_reader :delete_backup
5199
+ ##
5200
+ # RPC-specific configuration for `update_backup`
5201
+ # @return [::Gapic::Config::Method]
5202
+ #
5203
+ attr_reader :update_backup
5204
+ ##
5205
+ # RPC-specific configuration for `create_backup_policy`
5206
+ # @return [::Gapic::Config::Method]
5207
+ #
5208
+ attr_reader :create_backup_policy
5209
+ ##
5210
+ # RPC-specific configuration for `get_backup_policy`
5211
+ # @return [::Gapic::Config::Method]
5212
+ #
5213
+ attr_reader :get_backup_policy
5214
+ ##
5215
+ # RPC-specific configuration for `list_backup_policies`
5216
+ # @return [::Gapic::Config::Method]
5217
+ #
5218
+ attr_reader :list_backup_policies
5219
+ ##
5220
+ # RPC-specific configuration for `update_backup_policy`
5221
+ # @return [::Gapic::Config::Method]
5222
+ #
5223
+ attr_reader :update_backup_policy
5224
+ ##
5225
+ # RPC-specific configuration for `delete_backup_policy`
5226
+ # @return [::Gapic::Config::Method]
5227
+ #
5228
+ attr_reader :delete_backup_policy
3754
5229
 
3755
5230
  # @private
3756
5231
  def initialize parent_rpcs = nil
@@ -3826,6 +5301,36 @@ module Google
3826
5301
  @resume_replication = ::Gapic::Config::Method.new resume_replication_config
3827
5302
  reverse_replication_direction_config = parent_rpcs.reverse_replication_direction if parent_rpcs.respond_to? :reverse_replication_direction
3828
5303
  @reverse_replication_direction = ::Gapic::Config::Method.new reverse_replication_direction_config
5304
+ create_backup_vault_config = parent_rpcs.create_backup_vault if parent_rpcs.respond_to? :create_backup_vault
5305
+ @create_backup_vault = ::Gapic::Config::Method.new create_backup_vault_config
5306
+ get_backup_vault_config = parent_rpcs.get_backup_vault if parent_rpcs.respond_to? :get_backup_vault
5307
+ @get_backup_vault = ::Gapic::Config::Method.new get_backup_vault_config
5308
+ list_backup_vaults_config = parent_rpcs.list_backup_vaults if parent_rpcs.respond_to? :list_backup_vaults
5309
+ @list_backup_vaults = ::Gapic::Config::Method.new list_backup_vaults_config
5310
+ update_backup_vault_config = parent_rpcs.update_backup_vault if parent_rpcs.respond_to? :update_backup_vault
5311
+ @update_backup_vault = ::Gapic::Config::Method.new update_backup_vault_config
5312
+ delete_backup_vault_config = parent_rpcs.delete_backup_vault if parent_rpcs.respond_to? :delete_backup_vault
5313
+ @delete_backup_vault = ::Gapic::Config::Method.new delete_backup_vault_config
5314
+ create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup
5315
+ @create_backup = ::Gapic::Config::Method.new create_backup_config
5316
+ get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup
5317
+ @get_backup = ::Gapic::Config::Method.new get_backup_config
5318
+ list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups
5319
+ @list_backups = ::Gapic::Config::Method.new list_backups_config
5320
+ delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup
5321
+ @delete_backup = ::Gapic::Config::Method.new delete_backup_config
5322
+ update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup
5323
+ @update_backup = ::Gapic::Config::Method.new update_backup_config
5324
+ create_backup_policy_config = parent_rpcs.create_backup_policy if parent_rpcs.respond_to? :create_backup_policy
5325
+ @create_backup_policy = ::Gapic::Config::Method.new create_backup_policy_config
5326
+ get_backup_policy_config = parent_rpcs.get_backup_policy if parent_rpcs.respond_to? :get_backup_policy
5327
+ @get_backup_policy = ::Gapic::Config::Method.new get_backup_policy_config
5328
+ list_backup_policies_config = parent_rpcs.list_backup_policies if parent_rpcs.respond_to? :list_backup_policies
5329
+ @list_backup_policies = ::Gapic::Config::Method.new list_backup_policies_config
5330
+ update_backup_policy_config = parent_rpcs.update_backup_policy if parent_rpcs.respond_to? :update_backup_policy
5331
+ @update_backup_policy = ::Gapic::Config::Method.new update_backup_policy_config
5332
+ delete_backup_policy_config = parent_rpcs.delete_backup_policy if parent_rpcs.respond_to? :delete_backup_policy
5333
+ @delete_backup_policy = ::Gapic::Config::Method.new delete_backup_policy_config
3829
5334
 
3830
5335
  yield self if block_given?
3831
5336
  end