google-cloud-backupdr-v1 1.1.0 → 1.2.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.
@@ -1089,7 +1089,7 @@ module Google
1089
1089
  # @param options [::Gapic::CallOptions, ::Hash]
1090
1090
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1091
1091
  #
1092
- # @overload update_backup_vault(update_mask: nil, backup_vault: nil, request_id: nil, validate_only: nil, force: nil)
1092
+ # @overload update_backup_vault(update_mask: nil, backup_vault: nil, request_id: nil, validate_only: nil, force: nil, force_update_access_restriction: nil)
1093
1093
  # Pass arguments to `update_backup_vault` via keyword arguments. Note that at
1094
1094
  # least one keyword argument is required. To specify no parameters, or to keep all
1095
1095
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1122,6 +1122,9 @@ module Google
1122
1122
  # @param force [::Boolean]
1123
1123
  # Optional. If set to true, will not check plan duration against backup vault
1124
1124
  # enforcement duration.
1125
+ # @param force_update_access_restriction [::Boolean]
1126
+ # Optional. If set to true, we will force update access restriction even if
1127
+ # some non compliant data sources are present. The default is 'false'.
1125
1128
  # @yield [result, operation] Access the result along with the TransportOperation object
1126
1129
  # @yieldparam result [::Gapic::Operation]
1127
1130
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1996,7 +1999,7 @@ module Google
1996
1999
  # @param options [::Gapic::CallOptions, ::Hash]
1997
2000
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1998
2001
  #
1999
- # @overload restore_backup(name: nil, request_id: nil, compute_instance_target_environment: nil, compute_instance_restore_properties: nil)
2002
+ # @overload restore_backup(name: nil, request_id: nil, compute_instance_target_environment: nil, disk_target_environment: nil, region_disk_target_environment: nil, compute_instance_restore_properties: nil, disk_restore_properties: nil)
2000
2003
  # Pass arguments to `restore_backup` via keyword arguments. Note that at
2001
2004
  # least one keyword argument is required. To specify no parameters, or to keep all
2002
2005
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -2020,8 +2023,24 @@ module Google
2020
2023
  # not supported (00000000-0000-0000-0000-000000000000).
2021
2024
  # @param compute_instance_target_environment [::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment, ::Hash]
2022
2025
  # Compute Engine target environment to be used during restore.
2026
+ #
2027
+ # Note: The following parameters are mutually exclusive: `compute_instance_target_environment`, `disk_target_environment`, `region_disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
2028
+ # @param disk_target_environment [::Google::Cloud::BackupDR::V1::DiskTargetEnvironment, ::Hash]
2029
+ # Disk target environment to be used during restore.
2030
+ #
2031
+ # Note: The following parameters are mutually exclusive: `disk_target_environment`, `compute_instance_target_environment`, `region_disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
2032
+ # @param region_disk_target_environment [::Google::Cloud::BackupDR::V1::RegionDiskTargetEnvironment, ::Hash]
2033
+ # Region disk target environment to be used during restore.
2034
+ #
2035
+ # Note: The following parameters are mutually exclusive: `region_disk_target_environment`, `compute_instance_target_environment`, `disk_target_environment`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
2023
2036
  # @param compute_instance_restore_properties [::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties, ::Hash]
2024
2037
  # Compute Engine instance properties to be overridden during restore.
2038
+ #
2039
+ # Note: The following parameters are mutually exclusive: `compute_instance_restore_properties`, `disk_restore_properties`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
2040
+ # @param disk_restore_properties [::Google::Cloud::BackupDR::V1::DiskRestoreProperties, ::Hash]
2041
+ # Disk properties to be overridden during restore.
2042
+ #
2043
+ # Note: The following parameters are mutually exclusive: `disk_restore_properties`, `compute_instance_restore_properties`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
2025
2044
  # @yield [result, operation] Access the result along with the TransportOperation object
2026
2045
  # @yieldparam result [::Gapic::Operation]
2027
2046
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -2199,6 +2218,116 @@ module Google
2199
2218
  raise ::Google::Cloud::Error.from_error(e)
2200
2219
  end
2201
2220
 
2221
+ ##
2222
+ # Update a BackupPlan.
2223
+ #
2224
+ # @overload update_backup_plan(request, options = nil)
2225
+ # Pass arguments to `update_backup_plan` via a request object, either of type
2226
+ # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest} or an equivalent Hash.
2227
+ #
2228
+ # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest, ::Hash]
2229
+ # A request object representing the call parameters. Required. To specify no
2230
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2231
+ # @param options [::Gapic::CallOptions, ::Hash]
2232
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2233
+ #
2234
+ # @overload update_backup_plan(backup_plan: nil, update_mask: nil, request_id: nil)
2235
+ # Pass arguments to `update_backup_plan` via keyword arguments. Note that at
2236
+ # least one keyword argument is required. To specify no parameters, or to keep all
2237
+ # the default parameter values, pass an empty Hash as a request object (see above).
2238
+ #
2239
+ # @param backup_plan [::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash]
2240
+ # Required. The resource being updated
2241
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2242
+ # Required. The list of fields to update.
2243
+ # Field mask is used to specify the fields to be overwritten in the
2244
+ # BackupPlan resource by the update.
2245
+ # The fields specified in the update_mask are relative to the resource, not
2246
+ # the full request. A field will be overwritten if it is in the mask. If the
2247
+ # user does not provide a mask then the request will fail.
2248
+ # Currently, these fields are supported in update: description, schedules,
2249
+ # retention period, adding and removing Backup Rules.
2250
+ # @param request_id [::String]
2251
+ # Optional. An optional request ID to identify requests. Specify a unique
2252
+ # request ID so that if you must retry your request, the server will know to
2253
+ # ignore the request if it has already been completed. The server will
2254
+ # guarantee that for at least 60 minutes since the first request.
2255
+ #
2256
+ # For example, consider a situation where you make an initial request and t
2257
+ # he request times out. If you make the request again with the same request
2258
+ # ID, the server can check if original operation with the same request ID
2259
+ # was received, and if so, will ignore the second request. This prevents
2260
+ # clients from accidentally creating duplicate commitments.
2261
+ #
2262
+ # The request ID must be a valid UUID with the exception that zero UUID is
2263
+ # not supported (00000000-0000-0000-0000-000000000000).
2264
+ # @yield [result, operation] Access the result along with the TransportOperation object
2265
+ # @yieldparam result [::Gapic::Operation]
2266
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2267
+ #
2268
+ # @return [::Gapic::Operation]
2269
+ #
2270
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2271
+ #
2272
+ # @example Basic example
2273
+ # require "google/cloud/backupdr/v1"
2274
+ #
2275
+ # # Create a client object. The client can be reused for multiple calls.
2276
+ # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
2277
+ #
2278
+ # # Create a request. To set request fields, pass in keyword arguments.
2279
+ # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest.new
2280
+ #
2281
+ # # Call the update_backup_plan method.
2282
+ # result = client.update_backup_plan request
2283
+ #
2284
+ # # The returned object is of type Gapic::Operation. You can use it to
2285
+ # # check the status of an operation, cancel it, or wait for results.
2286
+ # # Here is how to wait for a response.
2287
+ # result.wait_until_done! timeout: 60
2288
+ # if result.response?
2289
+ # p result.response
2290
+ # else
2291
+ # puts "No response received."
2292
+ # end
2293
+ #
2294
+ def update_backup_plan request, options = nil
2295
+ raise ::ArgumentError, "request must be provided" if request.nil?
2296
+
2297
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanRequest
2298
+
2299
+ # Converts hash and nil to an options object
2300
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2301
+
2302
+ # Customize the options with defaults
2303
+ call_metadata = @config.rpcs.update_backup_plan.metadata.to_h
2304
+
2305
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2306
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2307
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2308
+ gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
2309
+ transports_version_send: [:rest]
2310
+
2311
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2312
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2313
+
2314
+ options.apply_defaults timeout: @config.rpcs.update_backup_plan.timeout,
2315
+ metadata: call_metadata,
2316
+ retry_policy: @config.rpcs.update_backup_plan.retry_policy
2317
+
2318
+ options.apply_defaults timeout: @config.timeout,
2319
+ metadata: @config.metadata,
2320
+ retry_policy: @config.retry_policy
2321
+
2322
+ @backup_dr_stub.update_backup_plan request, options do |result, operation|
2323
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2324
+ yield result, operation if block_given?
2325
+ throw :response, result
2326
+ end
2327
+ rescue ::Gapic::Rest::Error => e
2328
+ raise ::Google::Cloud::Error.from_error(e)
2329
+ end
2330
+
2202
2331
  ##
2203
2332
  # Gets details of a single BackupPlan.
2204
2333
  #
@@ -2473,13 +2602,303 @@ module Google
2473
2602
 
2474
2603
  options.apply_defaults timeout: @config.rpcs.delete_backup_plan.timeout,
2475
2604
  metadata: call_metadata,
2476
- retry_policy: @config.rpcs.delete_backup_plan.retry_policy
2605
+ retry_policy: @config.rpcs.delete_backup_plan.retry_policy
2606
+
2607
+ options.apply_defaults timeout: @config.timeout,
2608
+ metadata: @config.metadata,
2609
+ retry_policy: @config.retry_policy
2610
+
2611
+ @backup_dr_stub.delete_backup_plan request, options do |result, operation|
2612
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2613
+ yield result, operation if block_given?
2614
+ throw :response, result
2615
+ end
2616
+ rescue ::Gapic::Rest::Error => e
2617
+ raise ::Google::Cloud::Error.from_error(e)
2618
+ end
2619
+
2620
+ ##
2621
+ # Gets details of a single BackupPlanRevision.
2622
+ #
2623
+ # @overload get_backup_plan_revision(request, options = nil)
2624
+ # Pass arguments to `get_backup_plan_revision` via a request object, either of type
2625
+ # {::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest} or an equivalent Hash.
2626
+ #
2627
+ # @param request [::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest, ::Hash]
2628
+ # A request object representing the call parameters. Required. To specify no
2629
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2630
+ # @param options [::Gapic::CallOptions, ::Hash]
2631
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2632
+ #
2633
+ # @overload get_backup_plan_revision(name: nil)
2634
+ # Pass arguments to `get_backup_plan_revision` via keyword arguments. Note that at
2635
+ # least one keyword argument is required. To specify no parameters, or to keep all
2636
+ # the default parameter values, pass an empty Hash as a request object (see above).
2637
+ #
2638
+ # @param name [::String]
2639
+ # Required. The resource name of the `BackupPlanRevision` to retrieve.
2640
+ #
2641
+ # Format:
2642
+ # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}`
2643
+ # @yield [result, operation] Access the result along with the TransportOperation object
2644
+ # @yieldparam result [::Google::Cloud::BackupDR::V1::BackupPlanRevision]
2645
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2646
+ #
2647
+ # @return [::Google::Cloud::BackupDR::V1::BackupPlanRevision]
2648
+ #
2649
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2650
+ #
2651
+ # @example Basic example
2652
+ # require "google/cloud/backupdr/v1"
2653
+ #
2654
+ # # Create a client object. The client can be reused for multiple calls.
2655
+ # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
2656
+ #
2657
+ # # Create a request. To set request fields, pass in keyword arguments.
2658
+ # request = Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest.new
2659
+ #
2660
+ # # Call the get_backup_plan_revision method.
2661
+ # result = client.get_backup_plan_revision request
2662
+ #
2663
+ # # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanRevision.
2664
+ # p result
2665
+ #
2666
+ def get_backup_plan_revision request, options = nil
2667
+ raise ::ArgumentError, "request must be provided" if request.nil?
2668
+
2669
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetBackupPlanRevisionRequest
2670
+
2671
+ # Converts hash and nil to an options object
2672
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2673
+
2674
+ # Customize the options with defaults
2675
+ call_metadata = @config.rpcs.get_backup_plan_revision.metadata.to_h
2676
+
2677
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2678
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2679
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2680
+ gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
2681
+ transports_version_send: [:rest]
2682
+
2683
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2684
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2685
+
2686
+ options.apply_defaults timeout: @config.rpcs.get_backup_plan_revision.timeout,
2687
+ metadata: call_metadata,
2688
+ retry_policy: @config.rpcs.get_backup_plan_revision.retry_policy
2689
+
2690
+ options.apply_defaults timeout: @config.timeout,
2691
+ metadata: @config.metadata,
2692
+ retry_policy: @config.retry_policy
2693
+
2694
+ @backup_dr_stub.get_backup_plan_revision request, options do |result, operation|
2695
+ yield result, operation if block_given?
2696
+ end
2697
+ rescue ::Gapic::Rest::Error => e
2698
+ raise ::Google::Cloud::Error.from_error(e)
2699
+ end
2700
+
2701
+ ##
2702
+ # Lists BackupPlanRevisions in a given project and location.
2703
+ #
2704
+ # @overload list_backup_plan_revisions(request, options = nil)
2705
+ # Pass arguments to `list_backup_plan_revisions` via a request object, either of type
2706
+ # {::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest} or an equivalent Hash.
2707
+ #
2708
+ # @param request [::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest, ::Hash]
2709
+ # A request object representing the call parameters. Required. To specify no
2710
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2711
+ # @param options [::Gapic::CallOptions, ::Hash]
2712
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2713
+ #
2714
+ # @overload list_backup_plan_revisions(parent: nil, page_size: nil, page_token: nil)
2715
+ # Pass arguments to `list_backup_plan_revisions` via keyword arguments. Note that at
2716
+ # least one keyword argument is required. To specify no parameters, or to keep all
2717
+ # the default parameter values, pass an empty Hash as a request object (see above).
2718
+ #
2719
+ # @param parent [::String]
2720
+ # Required. The project and location for which to retrieve
2721
+ # `BackupPlanRevisions` information. Format:
2722
+ # `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In
2723
+ # Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**.
2724
+ # @param page_size [::Integer]
2725
+ # Optional. The maximum number of `BackupPlans` to return in a single
2726
+ # response. If not specified, a default value will be chosen by the service.
2727
+ # Note that the response may include a partial list and a caller should
2728
+ # only rely on the response's
2729
+ # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token}
2730
+ # to determine if there are more instances left to be queried.
2731
+ # @param page_token [::String]
2732
+ # Optional. The value of
2733
+ # {::Google::Cloud::BackupDR::V1::ListBackupPlansResponse#next_page_token next_page_token}
2734
+ # received from a previous `ListBackupPlans` call.
2735
+ # Provide this to retrieve the subsequent page in a multi-page list of
2736
+ # results. When paginating, all other parameters provided to
2737
+ # `ListBackupPlans` must match the call that provided the page token.
2738
+ # @yield [result, operation] Access the result along with the TransportOperation object
2739
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanRevision>]
2740
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2741
+ #
2742
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanRevision>]
2743
+ #
2744
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2745
+ #
2746
+ # @example Basic example
2747
+ # require "google/cloud/backupdr/v1"
2748
+ #
2749
+ # # Create a client object. The client can be reused for multiple calls.
2750
+ # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
2751
+ #
2752
+ # # Create a request. To set request fields, pass in keyword arguments.
2753
+ # request = Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest.new
2754
+ #
2755
+ # # Call the list_backup_plan_revisions method.
2756
+ # result = client.list_backup_plan_revisions request
2757
+ #
2758
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2759
+ # # over elements, and API calls will be issued to fetch pages as needed.
2760
+ # result.each do |item|
2761
+ # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanRevision.
2762
+ # p item
2763
+ # end
2764
+ #
2765
+ def list_backup_plan_revisions request, options = nil
2766
+ raise ::ArgumentError, "request must be provided" if request.nil?
2767
+
2768
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::ListBackupPlanRevisionsRequest
2769
+
2770
+ # Converts hash and nil to an options object
2771
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2772
+
2773
+ # Customize the options with defaults
2774
+ call_metadata = @config.rpcs.list_backup_plan_revisions.metadata.to_h
2775
+
2776
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2777
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2778
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2779
+ gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
2780
+ transports_version_send: [:rest]
2781
+
2782
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2783
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2784
+
2785
+ options.apply_defaults timeout: @config.rpcs.list_backup_plan_revisions.timeout,
2786
+ metadata: call_metadata,
2787
+ retry_policy: @config.rpcs.list_backup_plan_revisions.retry_policy
2788
+
2789
+ options.apply_defaults timeout: @config.timeout,
2790
+ metadata: @config.metadata,
2791
+ retry_policy: @config.retry_policy
2792
+
2793
+ @backup_dr_stub.list_backup_plan_revisions request, options do |result, operation|
2794
+ result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :list_backup_plan_revisions, "backup_plan_revisions", request, result, options
2795
+ yield result, operation if block_given?
2796
+ throw :response, result
2797
+ end
2798
+ rescue ::Gapic::Rest::Error => e
2799
+ raise ::Google::Cloud::Error.from_error(e)
2800
+ end
2801
+
2802
+ ##
2803
+ # Create a BackupPlanAssociation
2804
+ #
2805
+ # @overload create_backup_plan_association(request, options = nil)
2806
+ # Pass arguments to `create_backup_plan_association` via a request object, either of type
2807
+ # {::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest} or an equivalent Hash.
2808
+ #
2809
+ # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::Hash]
2810
+ # A request object representing the call parameters. Required. To specify no
2811
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2812
+ # @param options [::Gapic::CallOptions, ::Hash]
2813
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2814
+ #
2815
+ # @overload create_backup_plan_association(parent: nil, backup_plan_association_id: nil, backup_plan_association: nil, request_id: nil)
2816
+ # Pass arguments to `create_backup_plan_association` via keyword arguments. Note that at
2817
+ # least one keyword argument is required. To specify no parameters, or to keep all
2818
+ # the default parameter values, pass an empty Hash as a request object (see above).
2819
+ #
2820
+ # @param parent [::String]
2821
+ # Required. The backup plan association project and location in the format
2822
+ # `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations
2823
+ # map to GCP regions, for example **us-central1**.
2824
+ # @param backup_plan_association_id [::String]
2825
+ # Required. The name of the backup plan association to create. The name must
2826
+ # be unique for the specified project and location.
2827
+ # @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash]
2828
+ # Required. The resource being created
2829
+ # @param request_id [::String]
2830
+ # Optional. An optional request ID to identify requests. Specify a unique
2831
+ # request ID so that if you must retry your request, the server will know to
2832
+ # ignore the request if it has already been completed. The server will
2833
+ # guarantee that for at least 60 minutes since the first request.
2834
+ #
2835
+ # For example, consider a situation where you make an initial request and t
2836
+ # he request times out. If you make the request again with the same request
2837
+ # ID, the server can check if original operation with the same request ID
2838
+ # was received, and if so, will ignore the second request. This prevents
2839
+ # clients from accidentally creating duplicate commitments.
2840
+ #
2841
+ # The request ID must be a valid UUID with the exception that zero UUID is
2842
+ # not supported (00000000-0000-0000-0000-000000000000).
2843
+ # @yield [result, operation] Access the result along with the TransportOperation object
2844
+ # @yieldparam result [::Gapic::Operation]
2845
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2846
+ #
2847
+ # @return [::Gapic::Operation]
2848
+ #
2849
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2850
+ #
2851
+ # @example Basic example
2852
+ # require "google/cloud/backupdr/v1"
2853
+ #
2854
+ # # Create a client object. The client can be reused for multiple calls.
2855
+ # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
2856
+ #
2857
+ # # Create a request. To set request fields, pass in keyword arguments.
2858
+ # request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new
2859
+ #
2860
+ # # Call the create_backup_plan_association method.
2861
+ # result = client.create_backup_plan_association request
2862
+ #
2863
+ # # The returned object is of type Gapic::Operation. You can use it to
2864
+ # # check the status of an operation, cancel it, or wait for results.
2865
+ # # Here is how to wait for a response.
2866
+ # result.wait_until_done! timeout: 60
2867
+ # if result.response?
2868
+ # p result.response
2869
+ # else
2870
+ # puts "No response received."
2871
+ # end
2872
+ #
2873
+ def create_backup_plan_association request, options = nil
2874
+ raise ::ArgumentError, "request must be provided" if request.nil?
2875
+
2876
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest
2877
+
2878
+ # Converts hash and nil to an options object
2879
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2880
+
2881
+ # Customize the options with defaults
2882
+ call_metadata = @config.rpcs.create_backup_plan_association.metadata.to_h
2883
+
2884
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2885
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2886
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2887
+ gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
2888
+ transports_version_send: [:rest]
2889
+
2890
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2891
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2892
+
2893
+ options.apply_defaults timeout: @config.rpcs.create_backup_plan_association.timeout,
2894
+ metadata: call_metadata,
2895
+ retry_policy: @config.rpcs.create_backup_plan_association.retry_policy
2477
2896
 
2478
2897
  options.apply_defaults timeout: @config.timeout,
2479
2898
  metadata: @config.metadata,
2480
2899
  retry_policy: @config.retry_policy
2481
2900
 
2482
- @backup_dr_stub.delete_backup_plan request, options do |result, operation|
2901
+ @backup_dr_stub.create_backup_plan_association request, options do |result, operation|
2483
2902
  result = ::Gapic::Operation.new result, @operations_client, options: options
2484
2903
  yield result, operation if block_given?
2485
2904
  throw :response, result
@@ -2489,32 +2908,33 @@ module Google
2489
2908
  end
2490
2909
 
2491
2910
  ##
2492
- # Create a BackupPlanAssociation
2911
+ # Update a BackupPlanAssociation.
2493
2912
  #
2494
- # @overload create_backup_plan_association(request, options = nil)
2495
- # Pass arguments to `create_backup_plan_association` via a request object, either of type
2496
- # {::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest} or an equivalent Hash.
2913
+ # @overload update_backup_plan_association(request, options = nil)
2914
+ # Pass arguments to `update_backup_plan_association` via a request object, either of type
2915
+ # {::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest} or an equivalent Hash.
2497
2916
  #
2498
- # @param request [::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::Hash]
2917
+ # @param request [::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest, ::Hash]
2499
2918
  # A request object representing the call parameters. Required. To specify no
2500
2919
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2501
2920
  # @param options [::Gapic::CallOptions, ::Hash]
2502
2921
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2503
2922
  #
2504
- # @overload create_backup_plan_association(parent: nil, backup_plan_association_id: nil, backup_plan_association: nil, request_id: nil)
2505
- # Pass arguments to `create_backup_plan_association` via keyword arguments. Note that at
2923
+ # @overload update_backup_plan_association(backup_plan_association: nil, update_mask: nil, request_id: nil)
2924
+ # Pass arguments to `update_backup_plan_association` via keyword arguments. Note that at
2506
2925
  # least one keyword argument is required. To specify no parameters, or to keep all
2507
2926
  # the default parameter values, pass an empty Hash as a request object (see above).
2508
2927
  #
2509
- # @param parent [::String]
2510
- # Required. The backup plan association project and location in the format
2511
- # `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations
2512
- # map to GCP regions, for example **us-central1**.
2513
- # @param backup_plan_association_id [::String]
2514
- # Required. The name of the backup plan association to create. The name must
2515
- # be unique for the specified project and location.
2516
2928
  # @param backup_plan_association [::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash]
2517
- # Required. The resource being created
2929
+ # Required. The resource being updated
2930
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2931
+ # Required. The list of fields to update.
2932
+ # Field mask is used to specify the fields to be overwritten in the
2933
+ # BackupPlanAssociation resource by the update.
2934
+ # The fields specified in the update_mask are relative to the resource, not
2935
+ # the full request. A field will be overwritten if it is in the mask. If the
2936
+ # user does not provide a mask then the request will fail.
2937
+ # Currently backup_plan_association.backup_plan is the only supported field.
2518
2938
  # @param request_id [::String]
2519
2939
  # Optional. An optional request ID to identify requests. Specify a unique
2520
2940
  # request ID so that if you must retry your request, the server will know to
@@ -2544,10 +2964,10 @@ module Google
2544
2964
  # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
2545
2965
  #
2546
2966
  # # Create a request. To set request fields, pass in keyword arguments.
2547
- # request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new
2967
+ # request = Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest.new
2548
2968
  #
2549
- # # Call the create_backup_plan_association method.
2550
- # result = client.create_backup_plan_association request
2969
+ # # Call the update_backup_plan_association method.
2970
+ # result = client.update_backup_plan_association request
2551
2971
  #
2552
2972
  # # The returned object is of type Gapic::Operation. You can use it to
2553
2973
  # # check the status of an operation, cancel it, or wait for results.
@@ -2559,16 +2979,16 @@ module Google
2559
2979
  # puts "No response received."
2560
2980
  # end
2561
2981
  #
2562
- def create_backup_plan_association request, options = nil
2982
+ def update_backup_plan_association request, options = nil
2563
2983
  raise ::ArgumentError, "request must be provided" if request.nil?
2564
2984
 
2565
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest
2985
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::UpdateBackupPlanAssociationRequest
2566
2986
 
2567
2987
  # Converts hash and nil to an options object
2568
2988
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2569
2989
 
2570
2990
  # Customize the options with defaults
2571
- call_metadata = @config.rpcs.create_backup_plan_association.metadata.to_h
2991
+ call_metadata = @config.rpcs.update_backup_plan_association.metadata.to_h
2572
2992
 
2573
2993
  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2574
2994
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2579,15 +2999,15 @@ module Google
2579
2999
  call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2580
3000
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2581
3001
 
2582
- options.apply_defaults timeout: @config.rpcs.create_backup_plan_association.timeout,
3002
+ options.apply_defaults timeout: @config.rpcs.update_backup_plan_association.timeout,
2583
3003
  metadata: call_metadata,
2584
- retry_policy: @config.rpcs.create_backup_plan_association.retry_policy
3004
+ retry_policy: @config.rpcs.update_backup_plan_association.retry_policy
2585
3005
 
2586
3006
  options.apply_defaults timeout: @config.timeout,
2587
3007
  metadata: @config.metadata,
2588
3008
  retry_policy: @config.retry_policy
2589
3009
 
2590
- @backup_dr_stub.create_backup_plan_association request, options do |result, operation|
3010
+ @backup_dr_stub.update_backup_plan_association request, options do |result, operation|
2591
3011
  result = ::Gapic::Operation.new result, @operations_client, options: options
2592
3012
  yield result, operation if block_given?
2593
3013
  throw :response, result
@@ -2771,6 +3191,123 @@ module Google
2771
3191
  raise ::Google::Cloud::Error.from_error(e)
2772
3192
  end
2773
3193
 
3194
+ ##
3195
+ # List BackupPlanAssociations for a given resource type.
3196
+ #
3197
+ # @overload fetch_backup_plan_associations_for_resource_type(request, options = nil)
3198
+ # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via a request object, either of type
3199
+ # {::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest} or an equivalent Hash.
3200
+ #
3201
+ # @param request [::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest, ::Hash]
3202
+ # A request object representing the call parameters. Required. To specify no
3203
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3204
+ # @param options [::Gapic::CallOptions, ::Hash]
3205
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3206
+ #
3207
+ # @overload fetch_backup_plan_associations_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
3208
+ # Pass arguments to `fetch_backup_plan_associations_for_resource_type` via keyword arguments. Note that at
3209
+ # least one keyword argument is required. To specify no parameters, or to keep all
3210
+ # the default parameter values, pass an empty Hash as a request object (see above).
3211
+ #
3212
+ # @param parent [::String]
3213
+ # Required. The parent resource name.
3214
+ # Format: projects/\\{project}/locations/\\{location}
3215
+ # @param resource_type [::String]
3216
+ # Required. The type of the GCP resource.
3217
+ # Ex: sql.googleapis.com/Instance
3218
+ # @param page_size [::Integer]
3219
+ # Optional. The maximum number of BackupPlanAssociations to return. The
3220
+ # service may return fewer than this value. If unspecified, at most 50
3221
+ # BackupPlanAssociations will be returned. The maximum value is 100; values
3222
+ # above 100 will be coerced to 100.
3223
+ # @param page_token [::String]
3224
+ # Optional. A page token, received from a previous call of
3225
+ # `FetchBackupPlanAssociationsForResourceType`.
3226
+ # Provide this to retrieve the subsequent page.
3227
+ #
3228
+ # When paginating, all other parameters provided to
3229
+ # `FetchBackupPlanAssociationsForResourceType` must match
3230
+ # the call that provided the page token.
3231
+ # @param filter [::String]
3232
+ # Optional. A filter expression that filters the results fetched in the
3233
+ # response. The expression must specify the field name, a comparison
3234
+ # operator, and the value that you want to use for filtering. Supported
3235
+ # fields:
3236
+ # * resource
3237
+ # * backup_plan
3238
+ # * state
3239
+ # * data_source
3240
+ # * cloud_sql_instance_backup_plan_association_properties.instance_create_time
3241
+ # @param order_by [::String]
3242
+ # Optional. A comma-separated list of fields to order by, sorted in ascending
3243
+ # order. Use "desc" after a field name for descending.
3244
+ #
3245
+ # Supported fields:
3246
+ # * name
3247
+ # @yield [result, operation] Access the result along with the TransportOperation object
3248
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>]
3249
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3250
+ #
3251
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>]
3252
+ #
3253
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3254
+ #
3255
+ # @example Basic example
3256
+ # require "google/cloud/backupdr/v1"
3257
+ #
3258
+ # # Create a client object. The client can be reused for multiple calls.
3259
+ # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
3260
+ #
3261
+ # # Create a request. To set request fields, pass in keyword arguments.
3262
+ # request = Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest.new
3263
+ #
3264
+ # # Call the fetch_backup_plan_associations_for_resource_type method.
3265
+ # result = client.fetch_backup_plan_associations_for_resource_type request
3266
+ #
3267
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3268
+ # # over elements, and API calls will be issued to fetch pages as needed.
3269
+ # result.each do |item|
3270
+ # # Each element is of type ::Google::Cloud::BackupDR::V1::BackupPlanAssociation.
3271
+ # p item
3272
+ # end
3273
+ #
3274
+ def fetch_backup_plan_associations_for_resource_type request, options = nil
3275
+ raise ::ArgumentError, "request must be provided" if request.nil?
3276
+
3277
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchBackupPlanAssociationsForResourceTypeRequest
3278
+
3279
+ # Converts hash and nil to an options object
3280
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3281
+
3282
+ # Customize the options with defaults
3283
+ call_metadata = @config.rpcs.fetch_backup_plan_associations_for_resource_type.metadata.to_h
3284
+
3285
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3286
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3287
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3288
+ gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
3289
+ transports_version_send: [:rest]
3290
+
3291
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3292
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3293
+
3294
+ options.apply_defaults timeout: @config.rpcs.fetch_backup_plan_associations_for_resource_type.timeout,
3295
+ metadata: call_metadata,
3296
+ retry_policy: @config.rpcs.fetch_backup_plan_associations_for_resource_type.retry_policy
3297
+
3298
+ options.apply_defaults timeout: @config.timeout,
3299
+ metadata: @config.metadata,
3300
+ retry_policy: @config.retry_policy
3301
+
3302
+ @backup_dr_stub.fetch_backup_plan_associations_for_resource_type request, options do |result, operation|
3303
+ result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_backup_plan_associations_for_resource_type, "backup_plan_associations", request, result, options
3304
+ yield result, operation if block_given?
3305
+ throw :response, result
3306
+ end
3307
+ rescue ::Gapic::Rest::Error => e
3308
+ raise ::Google::Cloud::Error.from_error(e)
3309
+ end
3310
+
2774
3311
  ##
2775
3312
  # Deletes a single BackupPlanAssociation.
2776
3313
  #
@@ -2977,6 +3514,207 @@ module Google
2977
3514
  raise ::Google::Cloud::Error.from_error(e)
2978
3515
  end
2979
3516
 
3517
+ ##
3518
+ # Gets details of a single DataSourceReference.
3519
+ #
3520
+ # @overload get_data_source_reference(request, options = nil)
3521
+ # Pass arguments to `get_data_source_reference` via a request object, either of type
3522
+ # {::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest} or an equivalent Hash.
3523
+ #
3524
+ # @param request [::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest, ::Hash]
3525
+ # A request object representing the call parameters. Required. To specify no
3526
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3527
+ # @param options [::Gapic::CallOptions, ::Hash]
3528
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3529
+ #
3530
+ # @overload get_data_source_reference(name: nil)
3531
+ # Pass arguments to `get_data_source_reference` via keyword arguments. Note that at
3532
+ # least one keyword argument is required. To specify no parameters, or to keep all
3533
+ # the default parameter values, pass an empty Hash as a request object (see above).
3534
+ #
3535
+ # @param name [::String]
3536
+ # Required. The name of the DataSourceReference to retrieve.
3537
+ # Format:
3538
+ # projects/\\{project}/locations/\\{location}/dataSourceReferences/\\{data_source_reference}
3539
+ # @yield [result, operation] Access the result along with the TransportOperation object
3540
+ # @yieldparam result [::Google::Cloud::BackupDR::V1::DataSourceReference]
3541
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3542
+ #
3543
+ # @return [::Google::Cloud::BackupDR::V1::DataSourceReference]
3544
+ #
3545
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3546
+ #
3547
+ # @example Basic example
3548
+ # require "google/cloud/backupdr/v1"
3549
+ #
3550
+ # # Create a client object. The client can be reused for multiple calls.
3551
+ # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
3552
+ #
3553
+ # # Create a request. To set request fields, pass in keyword arguments.
3554
+ # request = Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest.new
3555
+ #
3556
+ # # Call the get_data_source_reference method.
3557
+ # result = client.get_data_source_reference request
3558
+ #
3559
+ # # The returned object is of type Google::Cloud::BackupDR::V1::DataSourceReference.
3560
+ # p result
3561
+ #
3562
+ def get_data_source_reference request, options = nil
3563
+ raise ::ArgumentError, "request must be provided" if request.nil?
3564
+
3565
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::GetDataSourceReferenceRequest
3566
+
3567
+ # Converts hash and nil to an options object
3568
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3569
+
3570
+ # Customize the options with defaults
3571
+ call_metadata = @config.rpcs.get_data_source_reference.metadata.to_h
3572
+
3573
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3574
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3575
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3576
+ gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
3577
+ transports_version_send: [:rest]
3578
+
3579
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3580
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3581
+
3582
+ options.apply_defaults timeout: @config.rpcs.get_data_source_reference.timeout,
3583
+ metadata: call_metadata,
3584
+ retry_policy: @config.rpcs.get_data_source_reference.retry_policy
3585
+
3586
+ options.apply_defaults timeout: @config.timeout,
3587
+ metadata: @config.metadata,
3588
+ retry_policy: @config.retry_policy
3589
+
3590
+ @backup_dr_stub.get_data_source_reference request, options do |result, operation|
3591
+ yield result, operation if block_given?
3592
+ end
3593
+ rescue ::Gapic::Rest::Error => e
3594
+ raise ::Google::Cloud::Error.from_error(e)
3595
+ end
3596
+
3597
+ ##
3598
+ # Fetch DataSourceReferences for a given project, location and resource type.
3599
+ #
3600
+ # @overload fetch_data_source_references_for_resource_type(request, options = nil)
3601
+ # Pass arguments to `fetch_data_source_references_for_resource_type` via a request object, either of type
3602
+ # {::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest} or an equivalent Hash.
3603
+ #
3604
+ # @param request [::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest, ::Hash]
3605
+ # A request object representing the call parameters. Required. To specify no
3606
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3607
+ # @param options [::Gapic::CallOptions, ::Hash]
3608
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3609
+ #
3610
+ # @overload fetch_data_source_references_for_resource_type(parent: nil, resource_type: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
3611
+ # Pass arguments to `fetch_data_source_references_for_resource_type` via keyword arguments. Note that at
3612
+ # least one keyword argument is required. To specify no parameters, or to keep all
3613
+ # the default parameter values, pass an empty Hash as a request object (see above).
3614
+ #
3615
+ # @param parent [::String]
3616
+ # Required. The parent resource name.
3617
+ # Format: projects/\\{project}/locations/\\{location}
3618
+ # @param resource_type [::String]
3619
+ # Required. The type of the GCP resource.
3620
+ # Ex: sql.googleapis.com/Instance
3621
+ # @param page_size [::Integer]
3622
+ # Optional. The maximum number of DataSourceReferences to return. The service
3623
+ # may return fewer than this value. If unspecified, at most 50
3624
+ # DataSourceReferences will be returned. The maximum value is 100; values
3625
+ # above 100 will be coerced to 100.
3626
+ # @param page_token [::String]
3627
+ # Optional. A page token, received from a previous call of
3628
+ # `FetchDataSourceReferencesForResourceType`.
3629
+ # Provide this to retrieve the subsequent page.
3630
+ #
3631
+ # When paginating, all other parameters provided to
3632
+ # `FetchDataSourceReferencesForResourceType` must match
3633
+ # the call that provided the page token.
3634
+ # @param filter [::String]
3635
+ # Optional. A filter expression that filters the results fetched in the
3636
+ # response. The expression must specify the field name, a comparison
3637
+ # operator, and the value that you want to use for filtering. Supported
3638
+ # fields:
3639
+ # * data_source
3640
+ # * data_source_gcp_resource_info.gcp_resourcename
3641
+ # * data_source_backup_config_state
3642
+ # * data_source_backup_count
3643
+ # * data_source_backup_config_info.last_backup_state
3644
+ # * data_source_gcp_resource_info.gcp_resourcename
3645
+ # * data_source_gcp_resource_info.type
3646
+ # * data_source_gcp_resource_info.location
3647
+ # * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time
3648
+ # @param order_by [::String]
3649
+ # Optional. A comma-separated list of fields to order by, sorted in ascending
3650
+ # order. Use "desc" after a field name for descending.
3651
+ #
3652
+ # Supported fields:
3653
+ # * name
3654
+ # @yield [result, operation] Access the result along with the TransportOperation object
3655
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>]
3656
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3657
+ #
3658
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSourceReference>]
3659
+ #
3660
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3661
+ #
3662
+ # @example Basic example
3663
+ # require "google/cloud/backupdr/v1"
3664
+ #
3665
+ # # Create a client object. The client can be reused for multiple calls.
3666
+ # client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new
3667
+ #
3668
+ # # Create a request. To set request fields, pass in keyword arguments.
3669
+ # request = Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest.new
3670
+ #
3671
+ # # Call the fetch_data_source_references_for_resource_type method.
3672
+ # result = client.fetch_data_source_references_for_resource_type request
3673
+ #
3674
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3675
+ # # over elements, and API calls will be issued to fetch pages as needed.
3676
+ # result.each do |item|
3677
+ # # Each element is of type ::Google::Cloud::BackupDR::V1::DataSourceReference.
3678
+ # p item
3679
+ # end
3680
+ #
3681
+ def fetch_data_source_references_for_resource_type request, options = nil
3682
+ raise ::ArgumentError, "request must be provided" if request.nil?
3683
+
3684
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BackupDR::V1::FetchDataSourceReferencesForResourceTypeRequest
3685
+
3686
+ # Converts hash and nil to an options object
3687
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3688
+
3689
+ # Customize the options with defaults
3690
+ call_metadata = @config.rpcs.fetch_data_source_references_for_resource_type.metadata.to_h
3691
+
3692
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3693
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3694
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3695
+ gapic_version: ::Google::Cloud::BackupDR::V1::VERSION,
3696
+ transports_version_send: [:rest]
3697
+
3698
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3699
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3700
+
3701
+ options.apply_defaults timeout: @config.rpcs.fetch_data_source_references_for_resource_type.timeout,
3702
+ metadata: call_metadata,
3703
+ retry_policy: @config.rpcs.fetch_data_source_references_for_resource_type.retry_policy
3704
+
3705
+ options.apply_defaults timeout: @config.timeout,
3706
+ metadata: @config.metadata,
3707
+ retry_policy: @config.retry_policy
3708
+
3709
+ @backup_dr_stub.fetch_data_source_references_for_resource_type request, options do |result, operation|
3710
+ result = ::Gapic::Rest::PagedEnumerable.new @backup_dr_stub, :fetch_data_source_references_for_resource_type, "data_source_references", request, result, options
3711
+ yield result, operation if block_given?
3712
+ throw :response, result
3713
+ end
3714
+ rescue ::Gapic::Rest::Error => e
3715
+ raise ::Google::Cloud::Error.from_error(e)
3716
+ end
3717
+
2980
3718
  ##
2981
3719
  # Initializes the service related config for a project.
2982
3720
  #
@@ -2990,7 +3728,7 @@ module Google
2990
3728
  # @param options [::Gapic::CallOptions, ::Hash]
2991
3729
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2992
3730
  #
2993
- # @overload initialize_service(name: nil, resource_type: nil, request_id: nil)
3731
+ # @overload initialize_service(name: nil, resource_type: nil, request_id: nil, cloud_sql_instance_initialization_config: nil)
2994
3732
  # Pass arguments to `initialize_service` via keyword arguments. Note that at
2995
3733
  # least one keyword argument is required. To specify no parameters, or to keep all
2996
3734
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -3017,6 +3755,8 @@ module Google
3017
3755
  #
3018
3756
  # The request ID must be a valid UUID with the exception that zero UUID is
3019
3757
  # not supported (00000000-0000-0000-0000-000000000000).
3758
+ # @param cloud_sql_instance_initialization_config [::Google::Cloud::BackupDR::V1::CloudSqlInstanceInitializationConfig, ::Hash]
3759
+ # Optional. The configuration for initializing a Cloud SQL instance.
3020
3760
  # @yield [result, operation] Access the result along with the TransportOperation object
3021
3761
  # @yieldparam result [::Gapic::Operation]
3022
3762
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -3333,6 +4073,11 @@ module Google
3333
4073
  #
3334
4074
  attr_reader :create_backup_plan
3335
4075
  ##
4076
+ # RPC-specific configuration for `update_backup_plan`
4077
+ # @return [::Gapic::Config::Method]
4078
+ #
4079
+ attr_reader :update_backup_plan
4080
+ ##
3336
4081
  # RPC-specific configuration for `get_backup_plan`
3337
4082
  # @return [::Gapic::Config::Method]
3338
4083
  #
@@ -3348,11 +4093,26 @@ module Google
3348
4093
  #
3349
4094
  attr_reader :delete_backup_plan
3350
4095
  ##
4096
+ # RPC-specific configuration for `get_backup_plan_revision`
4097
+ # @return [::Gapic::Config::Method]
4098
+ #
4099
+ attr_reader :get_backup_plan_revision
4100
+ ##
4101
+ # RPC-specific configuration for `list_backup_plan_revisions`
4102
+ # @return [::Gapic::Config::Method]
4103
+ #
4104
+ attr_reader :list_backup_plan_revisions
4105
+ ##
3351
4106
  # RPC-specific configuration for `create_backup_plan_association`
3352
4107
  # @return [::Gapic::Config::Method]
3353
4108
  #
3354
4109
  attr_reader :create_backup_plan_association
3355
4110
  ##
4111
+ # RPC-specific configuration for `update_backup_plan_association`
4112
+ # @return [::Gapic::Config::Method]
4113
+ #
4114
+ attr_reader :update_backup_plan_association
4115
+ ##
3356
4116
  # RPC-specific configuration for `get_backup_plan_association`
3357
4117
  # @return [::Gapic::Config::Method]
3358
4118
  #
@@ -3363,6 +4123,11 @@ module Google
3363
4123
  #
3364
4124
  attr_reader :list_backup_plan_associations
3365
4125
  ##
4126
+ # RPC-specific configuration for `fetch_backup_plan_associations_for_resource_type`
4127
+ # @return [::Gapic::Config::Method]
4128
+ #
4129
+ attr_reader :fetch_backup_plan_associations_for_resource_type
4130
+ ##
3366
4131
  # RPC-specific configuration for `delete_backup_plan_association`
3367
4132
  # @return [::Gapic::Config::Method]
3368
4133
  #
@@ -3373,6 +4138,16 @@ module Google
3373
4138
  #
3374
4139
  attr_reader :trigger_backup
3375
4140
  ##
4141
+ # RPC-specific configuration for `get_data_source_reference`
4142
+ # @return [::Gapic::Config::Method]
4143
+ #
4144
+ attr_reader :get_data_source_reference
4145
+ ##
4146
+ # RPC-specific configuration for `fetch_data_source_references_for_resource_type`
4147
+ # @return [::Gapic::Config::Method]
4148
+ #
4149
+ attr_reader :fetch_data_source_references_for_resource_type
4150
+ ##
3376
4151
  # RPC-specific configuration for `initialize_service`
3377
4152
  # @return [::Gapic::Config::Method]
3378
4153
  #
@@ -3418,22 +4193,36 @@ module Google
3418
4193
  @restore_backup = ::Gapic::Config::Method.new restore_backup_config
3419
4194
  create_backup_plan_config = parent_rpcs.create_backup_plan if parent_rpcs.respond_to? :create_backup_plan
3420
4195
  @create_backup_plan = ::Gapic::Config::Method.new create_backup_plan_config
4196
+ update_backup_plan_config = parent_rpcs.update_backup_plan if parent_rpcs.respond_to? :update_backup_plan
4197
+ @update_backup_plan = ::Gapic::Config::Method.new update_backup_plan_config
3421
4198
  get_backup_plan_config = parent_rpcs.get_backup_plan if parent_rpcs.respond_to? :get_backup_plan
3422
4199
  @get_backup_plan = ::Gapic::Config::Method.new get_backup_plan_config
3423
4200
  list_backup_plans_config = parent_rpcs.list_backup_plans if parent_rpcs.respond_to? :list_backup_plans
3424
4201
  @list_backup_plans = ::Gapic::Config::Method.new list_backup_plans_config
3425
4202
  delete_backup_plan_config = parent_rpcs.delete_backup_plan if parent_rpcs.respond_to? :delete_backup_plan
3426
4203
  @delete_backup_plan = ::Gapic::Config::Method.new delete_backup_plan_config
4204
+ get_backup_plan_revision_config = parent_rpcs.get_backup_plan_revision if parent_rpcs.respond_to? :get_backup_plan_revision
4205
+ @get_backup_plan_revision = ::Gapic::Config::Method.new get_backup_plan_revision_config
4206
+ list_backup_plan_revisions_config = parent_rpcs.list_backup_plan_revisions if parent_rpcs.respond_to? :list_backup_plan_revisions
4207
+ @list_backup_plan_revisions = ::Gapic::Config::Method.new list_backup_plan_revisions_config
3427
4208
  create_backup_plan_association_config = parent_rpcs.create_backup_plan_association if parent_rpcs.respond_to? :create_backup_plan_association
3428
4209
  @create_backup_plan_association = ::Gapic::Config::Method.new create_backup_plan_association_config
4210
+ update_backup_plan_association_config = parent_rpcs.update_backup_plan_association if parent_rpcs.respond_to? :update_backup_plan_association
4211
+ @update_backup_plan_association = ::Gapic::Config::Method.new update_backup_plan_association_config
3429
4212
  get_backup_plan_association_config = parent_rpcs.get_backup_plan_association if parent_rpcs.respond_to? :get_backup_plan_association
3430
4213
  @get_backup_plan_association = ::Gapic::Config::Method.new get_backup_plan_association_config
3431
4214
  list_backup_plan_associations_config = parent_rpcs.list_backup_plan_associations if parent_rpcs.respond_to? :list_backup_plan_associations
3432
4215
  @list_backup_plan_associations = ::Gapic::Config::Method.new list_backup_plan_associations_config
4216
+ fetch_backup_plan_associations_for_resource_type_config = parent_rpcs.fetch_backup_plan_associations_for_resource_type if parent_rpcs.respond_to? :fetch_backup_plan_associations_for_resource_type
4217
+ @fetch_backup_plan_associations_for_resource_type = ::Gapic::Config::Method.new fetch_backup_plan_associations_for_resource_type_config
3433
4218
  delete_backup_plan_association_config = parent_rpcs.delete_backup_plan_association if parent_rpcs.respond_to? :delete_backup_plan_association
3434
4219
  @delete_backup_plan_association = ::Gapic::Config::Method.new delete_backup_plan_association_config
3435
4220
  trigger_backup_config = parent_rpcs.trigger_backup if parent_rpcs.respond_to? :trigger_backup
3436
4221
  @trigger_backup = ::Gapic::Config::Method.new trigger_backup_config
4222
+ get_data_source_reference_config = parent_rpcs.get_data_source_reference if parent_rpcs.respond_to? :get_data_source_reference
4223
+ @get_data_source_reference = ::Gapic::Config::Method.new get_data_source_reference_config
4224
+ fetch_data_source_references_for_resource_type_config = parent_rpcs.fetch_data_source_references_for_resource_type if parent_rpcs.respond_to? :fetch_data_source_references_for_resource_type
4225
+ @fetch_data_source_references_for_resource_type = ::Gapic::Config::Method.new fetch_data_source_references_for_resource_type_config
3437
4226
  initialize_service_config = parent_rpcs.initialize_service if parent_rpcs.respond_to? :initialize_service
3438
4227
  @initialize_service = ::Gapic::Config::Method.new initialize_service_config
3439
4228