google-cloud-vm_migration-v1 2.1.1 → 2.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.
@@ -20,7 +20,6 @@ require "google/cloud/errors"
20
20
  require "google/cloud/vmmigration/v1/vmmigration_pb"
21
21
  require "google/cloud/vm_migration/v1/vm_migration/rest/service_stub"
22
22
  require "google/cloud/location/rest"
23
- require "google/iam/v1/rest"
24
23
 
25
24
  module Google
26
25
  module Cloud
@@ -189,14 +188,6 @@ module Google
189
188
  config.bindings_override = @config.bindings_override
190
189
  config.logger = @vm_migration_stub.logger if config.respond_to? :logger=
191
190
  end
192
-
193
- @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
194
- config.credentials = credentials
195
- config.quota_project = @quota_project_id
196
- config.endpoint = @vm_migration_stub.endpoint
197
- config.universe_domain = @vm_migration_stub.universe_domain
198
- config.logger = @vm_migration_stub.logger if config.respond_to? :logger=
199
- end
200
191
  end
201
192
 
202
193
  ##
@@ -213,13 +204,6 @@ module Google
213
204
  #
214
205
  attr_reader :location_client
215
206
 
216
- ##
217
- # Get the associated client for mix-in of the IAMPolicy.
218
- #
219
- # @return [Google::Iam::V1::IAMPolicy::Rest::Client]
220
- #
221
- attr_reader :iam_policy_client
222
-
223
207
  ##
224
208
  # The logger used for request/response debug logging.
225
209
  #
@@ -438,8 +422,8 @@ module Google
438
422
  # the request if it has already been completed. The server will guarantee
439
423
  # that for at least 60 minutes since the first request.
440
424
  #
441
- # For example, consider a situation where you make an initial request and t
442
- # he request times out. If you make the request again with the same request
425
+ # For example, consider a situation where you make an initial request and
426
+ # the request times out. If you make the request again with the same request
443
427
  # ID, the server can check if original operation with the same request ID
444
428
  # was received, and if so, will ignore the second request. This prevents
445
429
  # clients from accidentally creating duplicate commitments.
@@ -545,8 +529,8 @@ module Google
545
529
  # the request if it has already been completed. The server will guarantee
546
530
  # that for at least 60 minutes since the first request.
547
531
  #
548
- # For example, consider a situation where you make an initial request and t
549
- # he request times out. If you make the request again with the same request
532
+ # For example, consider a situation where you make an initial request and
533
+ # the request times out. If you make the request again with the same request
550
534
  # ID, the server can check if original operation with the same request ID
551
535
  # was received, and if so, will ignore the second request. This prevents
552
536
  # clients from accidentally creating duplicate commitments.
@@ -646,8 +630,8 @@ module Google
646
630
  # the request if it has already been completed. The server will guarantee
647
631
  # that for at least 60 minutes after the first request.
648
632
  #
649
- # For example, consider a situation where you make an initial request and t
650
- # he request times out. If you make the request again with the same request
633
+ # For example, consider a situation where you make an initial request and
634
+ # the request times out. If you make the request again with the same request
651
635
  # ID, the server can check if original operation with the same request ID
652
636
  # was received, and if so, will ignore the second request. This prevents
653
637
  # clients from accidentally creating duplicate commitments.
@@ -806,6 +790,108 @@ module Google
806
790
  raise ::Google::Cloud::Error.from_error(e)
807
791
  end
808
792
 
793
+ ##
794
+ # List remote source's inventory of storage resources.
795
+ # The remote source is another cloud vendor (e.g. AWS, Azure).
796
+ # The inventory describes the list of existing storage resources in that
797
+ # source. Note that this operation lists the resources on the remote source,
798
+ # as opposed to listing the MigratingVms resources in the vmmigration
799
+ # service.
800
+ #
801
+ # @overload fetch_storage_inventory(request, options = nil)
802
+ # Pass arguments to `fetch_storage_inventory` via a request object, either of type
803
+ # {::Google::Cloud::VMMigration::V1::FetchStorageInventoryRequest} or an equivalent Hash.
804
+ #
805
+ # @param request [::Google::Cloud::VMMigration::V1::FetchStorageInventoryRequest, ::Hash]
806
+ # A request object representing the call parameters. Required. To specify no
807
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
808
+ # @param options [::Gapic::CallOptions, ::Hash]
809
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
810
+ #
811
+ # @overload fetch_storage_inventory(source: nil, type: nil, force_refresh: nil, page_size: nil, page_token: nil)
812
+ # Pass arguments to `fetch_storage_inventory` via keyword arguments. Note that at
813
+ # least one keyword argument is required. To specify no parameters, or to keep all
814
+ # the default parameter values, pass an empty Hash as a request object (see above).
815
+ #
816
+ # @param source [::String]
817
+ # Required. The name of the Source.
818
+ # @param type [::Google::Cloud::VMMigration::V1::FetchStorageInventoryRequest::StorageType]
819
+ # Required. The type of the storage inventory to fetch.
820
+ # @param force_refresh [::Boolean]
821
+ # Optional. If this flag is set to true, the source will be queried instead
822
+ # of using cached results. Using this flag will make the call slower.
823
+ # @param page_size [::Integer]
824
+ # Optional. The maximum number of VMs to return. The service may return
825
+ # fewer than this value.
826
+ # @param page_token [::String]
827
+ # Optional. A page token, received from a previous `FetchStorageInventory`
828
+ # call. Provide this to retrieve the subsequent page. When paginating, all
829
+ # other parameters provided to `FetchStorageInventory` must match the call
830
+ # that provided the page token.
831
+ # @yield [result, operation] Access the result along with the TransportOperation object
832
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::VMMigration::V1::SourceStorageResource>]
833
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
834
+ #
835
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::VMMigration::V1::SourceStorageResource>]
836
+ #
837
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
838
+ #
839
+ # @example Basic example
840
+ # require "google/cloud/vm_migration/v1"
841
+ #
842
+ # # Create a client object. The client can be reused for multiple calls.
843
+ # client = Google::Cloud::VMMigration::V1::VMMigration::Rest::Client.new
844
+ #
845
+ # # Create a request. To set request fields, pass in keyword arguments.
846
+ # request = Google::Cloud::VMMigration::V1::FetchStorageInventoryRequest.new
847
+ #
848
+ # # Call the fetch_storage_inventory method.
849
+ # result = client.fetch_storage_inventory request
850
+ #
851
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
852
+ # # over elements, and API calls will be issued to fetch pages as needed.
853
+ # result.each do |item|
854
+ # # Each element is of type ::Google::Cloud::VMMigration::V1::SourceStorageResource.
855
+ # p item
856
+ # end
857
+ #
858
+ def fetch_storage_inventory request, options = nil
859
+ raise ::ArgumentError, "request must be provided" if request.nil?
860
+
861
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VMMigration::V1::FetchStorageInventoryRequest
862
+
863
+ # Converts hash and nil to an options object
864
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
865
+
866
+ # Customize the options with defaults
867
+ call_metadata = @config.rpcs.fetch_storage_inventory.metadata.to_h
868
+
869
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
870
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
871
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
872
+ gapic_version: ::Google::Cloud::VMMigration::V1::VERSION,
873
+ transports_version_send: [:rest]
874
+
875
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
876
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
877
+
878
+ options.apply_defaults timeout: @config.rpcs.fetch_storage_inventory.timeout,
879
+ metadata: call_metadata,
880
+ retry_policy: @config.rpcs.fetch_storage_inventory.retry_policy
881
+
882
+ options.apply_defaults timeout: @config.timeout,
883
+ metadata: @config.metadata,
884
+ retry_policy: @config.retry_policy
885
+
886
+ @vm_migration_stub.fetch_storage_inventory request, options do |result, operation|
887
+ result = ::Gapic::Rest::PagedEnumerable.new @vm_migration_stub, :fetch_storage_inventory, "resources", request, result, options
888
+ yield result, operation if block_given?
889
+ throw :response, result
890
+ end
891
+ rescue ::Gapic::Rest::Error => e
892
+ raise ::Google::Cloud::Error.from_error(e)
893
+ end
894
+
809
895
  ##
810
896
  # Lists Utilization Reports of the given Source.
811
897
  #
@@ -1024,8 +1110,8 @@ module Google
1024
1110
  # the request if it has already been completed. The server will guarantee
1025
1111
  # that for at least 60 minutes since the first request.
1026
1112
  #
1027
- # For example, consider a situation where you make an initial request and t
1028
- # he request times out. If you make the request again with the same request
1113
+ # For example, consider a situation where you make an initial request and
1114
+ # the request times out. If you make the request again with the same request
1029
1115
  # ID, the server can check if original operation with the same request ID
1030
1116
  # was received, and if so, will ignore the second request. This prevents
1031
1117
  # clients from accidentally creating duplicate commitments.
@@ -1125,8 +1211,8 @@ module Google
1125
1211
  # the request if it has already been completed. The server will guarantee
1126
1212
  # that for at least 60 minutes after the first request.
1127
1213
  #
1128
- # For example, consider a situation where you make an initial request and t
1129
- # he request times out. If you make the request again with the same request
1214
+ # For example, consider a situation where you make an initial request and
1215
+ # the request times out. If you make the request again with the same request
1130
1216
  # ID, the server can check if original operation with the same request ID
1131
1217
  # was received, and if so, will ignore the second request. This prevents
1132
1218
  # clients from accidentally creating duplicate commitments.
@@ -1411,8 +1497,8 @@ module Google
1411
1497
  # the request if it has already been completed. The server will guarantee
1412
1498
  # that for at least 60 minutes since the first request.
1413
1499
  #
1414
- # For example, consider a situation where you make an initial request and t
1415
- # he request times out. If you make the request again with the same request
1500
+ # For example, consider a situation where you make an initial request and
1501
+ # the request times out. If you make the request again with the same request
1416
1502
  # ID, the server can check if original operation with the same request ID
1417
1503
  # was received, and if so, will ignore the second request. This prevents
1418
1504
  # clients from accidentally creating duplicate commitments.
@@ -1512,8 +1598,8 @@ module Google
1512
1598
  # the request if it has already been completed. The server will guarantee
1513
1599
  # that for at least 60 minutes after the first request.
1514
1600
  #
1515
- # For example, consider a situation where you make an initial request and t
1516
- # he request times out. If you make the request again with the same request
1601
+ # For example, consider a situation where you make an initial request and
1602
+ # the request times out. If you make the request again with the same request
1517
1603
  # ID, the server can check if original operation with the same request ID
1518
1604
  # was received, and if so, will ignore the second request. This prevents
1519
1605
  # clients from accidentally creating duplicate commitments.
@@ -1614,8 +1700,8 @@ module Google
1614
1700
  # the request if it has already been completed. The server will guarantee
1615
1701
  # that for at least 60 minutes after the first request.
1616
1702
  #
1617
- # For example, consider a situation where you make an initial request and t
1618
- # he request times out. If you make the request again with the same request
1703
+ # For example, consider a situation where you make an initial request and
1704
+ # the request times out. If you make the request again with the same request
1619
1705
  # ID, the server can check if original operation with the same request ID
1620
1706
  # was received, and if so, will ignore the second request. This prevents
1621
1707
  # clients from accidentally creating duplicate commitments.
@@ -1719,8 +1805,8 @@ module Google
1719
1805
  # the request if it has already been completed. The server will guarantee
1720
1806
  # that for at least 60 minutes since the first request.
1721
1807
  #
1722
- # For example, consider a situation where you make an initial request and t
1723
- # he request times out. If you make the request again with the same request
1808
+ # For example, consider a situation where you make an initial request and
1809
+ # the request times out. If you make the request again with the same request
1724
1810
  # ID, the server can check if original operation with the same request ID
1725
1811
  # was received, and if so, will ignore the second request. This prevents
1726
1812
  # clients from accidentally creating duplicate commitments.
@@ -2007,8 +2093,8 @@ module Google
2007
2093
  # the request if it has already been completed. The server will guarantee
2008
2094
  # that for at least 60 minutes since the first request.
2009
2095
  #
2010
- # For example, consider a situation where you make an initial request and t
2011
- # he request times out. If you make the request again with the same request
2096
+ # For example, consider a situation where you make an initial request and
2097
+ # the request times out. If you make the request again with the same request
2012
2098
  # ID, the server can check if original operation with the same request ID
2013
2099
  # was received, and if so, will ignore the second request. This prevents
2014
2100
  # clients from accidentally creating duplicate commitments.
@@ -2524,6 +2610,93 @@ module Google
2524
2610
  raise ::Google::Cloud::Error.from_error(e)
2525
2611
  end
2526
2612
 
2613
+ ##
2614
+ # Extend the migrating VM time to live.
2615
+ #
2616
+ # @overload extend_migration(request, options = nil)
2617
+ # Pass arguments to `extend_migration` via a request object, either of type
2618
+ # {::Google::Cloud::VMMigration::V1::ExtendMigrationRequest} or an equivalent Hash.
2619
+ #
2620
+ # @param request [::Google::Cloud::VMMigration::V1::ExtendMigrationRequest, ::Hash]
2621
+ # A request object representing the call parameters. Required. To specify no
2622
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2623
+ # @param options [::Gapic::CallOptions, ::Hash]
2624
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2625
+ #
2626
+ # @overload extend_migration(migrating_vm: nil)
2627
+ # Pass arguments to `extend_migration` via keyword arguments. Note that at
2628
+ # least one keyword argument is required. To specify no parameters, or to keep all
2629
+ # the default parameter values, pass an empty Hash as a request object (see above).
2630
+ #
2631
+ # @param migrating_vm [::String]
2632
+ # Required. The name of the MigratingVm.
2633
+ # @yield [result, operation] Access the result along with the TransportOperation object
2634
+ # @yieldparam result [::Gapic::Operation]
2635
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2636
+ #
2637
+ # @return [::Gapic::Operation]
2638
+ #
2639
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2640
+ #
2641
+ # @example Basic example
2642
+ # require "google/cloud/vm_migration/v1"
2643
+ #
2644
+ # # Create a client object. The client can be reused for multiple calls.
2645
+ # client = Google::Cloud::VMMigration::V1::VMMigration::Rest::Client.new
2646
+ #
2647
+ # # Create a request. To set request fields, pass in keyword arguments.
2648
+ # request = Google::Cloud::VMMigration::V1::ExtendMigrationRequest.new
2649
+ #
2650
+ # # Call the extend_migration method.
2651
+ # result = client.extend_migration request
2652
+ #
2653
+ # # The returned object is of type Gapic::Operation. You can use it to
2654
+ # # check the status of an operation, cancel it, or wait for results.
2655
+ # # Here is how to wait for a response.
2656
+ # result.wait_until_done! timeout: 60
2657
+ # if result.response?
2658
+ # p result.response
2659
+ # else
2660
+ # puts "No response received."
2661
+ # end
2662
+ #
2663
+ def extend_migration request, options = nil
2664
+ raise ::ArgumentError, "request must be provided" if request.nil?
2665
+
2666
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VMMigration::V1::ExtendMigrationRequest
2667
+
2668
+ # Converts hash and nil to an options object
2669
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2670
+
2671
+ # Customize the options with defaults
2672
+ call_metadata = @config.rpcs.extend_migration.metadata.to_h
2673
+
2674
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2675
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2676
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2677
+ gapic_version: ::Google::Cloud::VMMigration::V1::VERSION,
2678
+ transports_version_send: [:rest]
2679
+
2680
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2681
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2682
+
2683
+ options.apply_defaults timeout: @config.rpcs.extend_migration.timeout,
2684
+ metadata: call_metadata,
2685
+ retry_policy: @config.rpcs.extend_migration.retry_policy
2686
+
2687
+ options.apply_defaults timeout: @config.timeout,
2688
+ metadata: @config.metadata,
2689
+ retry_policy: @config.retry_policy
2690
+
2691
+ @vm_migration_stub.extend_migration request, options do |result, operation|
2692
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2693
+ yield result, operation if block_given?
2694
+ throw :response, result
2695
+ end
2696
+ rescue ::Gapic::Rest::Error => e
2697
+ raise ::Google::Cloud::Error.from_error(e)
2698
+ end
2699
+
2527
2700
  ##
2528
2701
  # Initiates a Clone of a specific migrating VM.
2529
2702
  #
@@ -2554,8 +2727,8 @@ module Google
2554
2727
  # the request if it has already been completed. The server will guarantee
2555
2728
  # that for at least 60 minutes since the first request.
2556
2729
  #
2557
- # For example, consider a situation where you make an initial request and t
2558
- # he request times out. If you make the request again with the same request
2730
+ # For example, consider a situation where you make an initial request and
2731
+ # the request times out. If you make the request again with the same request
2559
2732
  # ID, the server can check if original operation with the same request ID
2560
2733
  # was received, and if so, will ignore the second request. This prevents
2561
2734
  # clients from accidentally creating duplicate commitments.
@@ -2717,7 +2890,8 @@ module Google
2717
2890
  end
2718
2891
 
2719
2892
  ##
2720
- # Lists CloneJobs of a given migrating VM.
2893
+ # Lists the CloneJobs of a migrating VM. Only 25 most recent CloneJobs are
2894
+ # listed.
2721
2895
  #
2722
2896
  # @overload list_clone_jobs(request, options = nil)
2723
2897
  # Pass arguments to `list_clone_jobs` via a request object, either of type
@@ -2925,8 +3099,8 @@ module Google
2925
3099
  # the request if it has already been completed. The server will guarantee
2926
3100
  # that for at least 60 minutes since the first request.
2927
3101
  #
2928
- # For example, consider a situation where you make an initial request and t
2929
- # he request times out. If you make the request again with the same request
3102
+ # For example, consider a situation where you make an initial request and
3103
+ # the request times out. If you make the request again with the same request
2930
3104
  # ID, the server can check if original operation with the same request ID
2931
3105
  # was received, and if so, will ignore the second request. This prevents
2932
3106
  # clients from accidentally creating duplicate commitments.
@@ -3088,7 +3262,8 @@ module Google
3088
3262
  end
3089
3263
 
3090
3264
  ##
3091
- # Lists CutoverJobs of a given migrating VM.
3265
+ # Lists the CutoverJobs of a migrating VM. Only 25 most recent CutoverJobs
3266
+ # are listed.
3092
3267
  #
3093
3268
  # @overload list_cutover_jobs(request, options = nil)
3094
3269
  # Pass arguments to `list_cutover_jobs` via a request object, either of type
@@ -3471,8 +3646,8 @@ module Google
3471
3646
  # the request if it has already been completed. The server will guarantee
3472
3647
  # that for at least 60 minutes since the first request.
3473
3648
  #
3474
- # For example, consider a situation where you make an initial request and t
3475
- # he request times out. If you make the request again with the same request
3649
+ # For example, consider a situation where you make an initial request and
3650
+ # the request times out. If you make the request again with the same request
3476
3651
  # ID, the server can check if original operation with the same request ID
3477
3652
  # was received, and if so, will ignore the second request. This prevents
3478
3653
  # clients from accidentally creating duplicate commitments.
@@ -3578,8 +3753,8 @@ module Google
3578
3753
  # the request if it has already been completed. The server will guarantee
3579
3754
  # that for at least 60 minutes since the first request.
3580
3755
  #
3581
- # For example, consider a situation where you make an initial request and t
3582
- # he request times out. If you make the request again with the same request
3756
+ # For example, consider a situation where you make an initial request and
3757
+ # the request times out. If you make the request again with the same request
3583
3758
  # ID, the server can check if original operation with the same request ID
3584
3759
  # was received, and if so, will ignore the second request. This prevents
3585
3760
  # clients from accidentally creating duplicate commitments.
@@ -3679,8 +3854,8 @@ module Google
3679
3854
  # the request if it has already been completed. The server will guarantee
3680
3855
  # that for at least 60 minutes after the first request.
3681
3856
  #
3682
- # For example, consider a situation where you make an initial request and t
3683
- # he request times out. If you make the request again with the same request
3857
+ # For example, consider a situation where you make an initial request and
3858
+ # the request times out. If you make the request again with the same request
3684
3859
  # ID, the server can check if original operation with the same request ID
3685
3860
  # was received, and if so, will ignore the second request. This prevents
3686
3861
  # clients from accidentally creating duplicate commitments.
@@ -4148,8 +4323,8 @@ module Google
4148
4323
  # the request if it has already been completed. The server will guarantee
4149
4324
  # that for at least 60 minutes since the first request.
4150
4325
  #
4151
- # For example, consider a situation where you make an initial request and t
4152
- # he request times out. If you make the request again with the same request
4326
+ # For example, consider a situation where you make an initial request and
4327
+ # the request times out. If you make the request again with the same request
4153
4328
  # ID, the server can check if original operation with the same request ID
4154
4329
  # was received, and if so, will ignore the second request. This prevents
4155
4330
  # clients from accidentally creating duplicate commitments.
@@ -4258,8 +4433,8 @@ module Google
4258
4433
  # the request if it has already been completed. The server will guarantee
4259
4434
  # that for at least 60 minutes since the first request.
4260
4435
  #
4261
- # For example, consider a situation where you make an initial request and t
4262
- # he request times out. If you make the request again with the same request
4436
+ # For example, consider a situation where you make an initial request and
4437
+ # the request times out. If you make the request again with the same request
4263
4438
  # ID, the server can check if original operation with the same request ID
4264
4439
  # was received, and if so, will ignore the second request. This prevents
4265
4440
  # clients from accidentally creating duplicate commitments.
@@ -4362,8 +4537,8 @@ module Google
4362
4537
  # the request if it has already been completed. The server will guarantee
4363
4538
  # that for at least 60 minutes after the first request.
4364
4539
  #
4365
- # For example, consider a situation where you make an initial request and t
4366
- # he request times out. If you make the request again with the same request
4540
+ # For example, consider a situation where you make an initial request and
4541
+ # the request times out. If you make the request again with the same request
4367
4542
  # ID, the server can check if original operation with the same request ID
4368
4543
  # was received, and if so, will ignore the second request. This prevents
4369
4544
  # clients from accidentally creating duplicate commitments.
@@ -4615,66 +4790,1377 @@ module Google
4615
4790
  end
4616
4791
 
4617
4792
  ##
4618
- # Configuration class for the VmMigration REST API.
4793
+ # Lists ImageImports in a given project.
4619
4794
  #
4620
- # This class represents the configuration for VmMigration REST,
4621
- # providing control over timeouts, retry behavior, logging, transport
4622
- # parameters, and other low-level controls. Certain parameters can also be
4623
- # applied individually to specific RPCs. See
4624
- # {::Google::Cloud::VMMigration::V1::VMMigration::Rest::Client::Configuration::Rpcs}
4625
- # for a list of RPCs that can be configured independently.
4795
+ # @overload list_image_imports(request, options = nil)
4796
+ # Pass arguments to `list_image_imports` via a request object, either of type
4797
+ # {::Google::Cloud::VMMigration::V1::ListImageImportsRequest} or an equivalent Hash.
4626
4798
  #
4627
- # Configuration can be applied globally to all clients, or to a single client
4628
- # on construction.
4799
+ # @param request [::Google::Cloud::VMMigration::V1::ListImageImportsRequest, ::Hash]
4800
+ # A request object representing the call parameters. Required. To specify no
4801
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4802
+ # @param options [::Gapic::CallOptions, ::Hash]
4803
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4629
4804
  #
4630
- # @example
4805
+ # @overload list_image_imports(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
4806
+ # Pass arguments to `list_image_imports` via keyword arguments. Note that at
4807
+ # least one keyword argument is required. To specify no parameters, or to keep all
4808
+ # the default parameter values, pass an empty Hash as a request object (see above).
4631
4809
  #
4632
- # # Modify the global config, setting the timeout for
4633
- # # list_sources to 20 seconds,
4634
- # # and all remaining timeouts to 10 seconds.
4635
- # ::Google::Cloud::VMMigration::V1::VMMigration::Rest::Client.configure do |config|
4636
- # config.timeout = 10.0
4637
- # config.rpcs.list_sources.timeout = 20.0
4638
- # end
4810
+ # @param parent [::String]
4811
+ # Required. The parent, which owns this collection of targets.
4812
+ # @param page_size [::Integer]
4813
+ # Optional. The maximum number of targets to return. The service may return
4814
+ # fewer than this value. If unspecified, at most 500 targets will be
4815
+ # returned. The maximum value is 1000; values above 1000 will be coerced to
4816
+ # 1000.
4817
+ # @param page_token [::String]
4818
+ # Optional. A page token, received from a previous `ListImageImports` call.
4819
+ # Provide this to retrieve the subsequent page.
4639
4820
  #
4640
- # # Apply the above configuration only to a new client.
4641
- # client = ::Google::Cloud::VMMigration::V1::VMMigration::Rest::Client.new do |config|
4642
- # config.timeout = 10.0
4643
- # config.rpcs.list_sources.timeout = 20.0
4644
- # end
4821
+ # When paginating, all other parameters provided to `ListImageImports` must
4822
+ # match the call that provided the page token.
4823
+ # @param filter [::String]
4824
+ # Optional. The filter request (according to <a
4825
+ # href="https://google.aip.dev/160" target="_blank">AIP-160</a>).
4826
+ # @param order_by [::String]
4827
+ # Optional. The order by fields for the result (according to <a
4828
+ # href="https://google.aip.dev/132#ordering" target="_blank">AIP-132</a>).
4829
+ # Currently ordering is only possible by "name" field.
4830
+ # @yield [result, operation] Access the result along with the TransportOperation object
4831
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::VMMigration::V1::ImageImport>]
4832
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4645
4833
  #
4646
- # @!attribute [rw] endpoint
4647
- # A custom service endpoint, as a hostname or hostname:port. The default is
4648
- # nil, indicating to use the default endpoint in the current universe domain.
4649
- # @return [::String,nil]
4650
- # @!attribute [rw] credentials
4651
- # Credentials to send with calls. You may provide any of the following types:
4652
- # * (`String`) The path to a service account key file in JSON format
4653
- # * (`Hash`) A service account key as a Hash
4654
- # * (`Google::Auth::Credentials`) A googleauth credentials object
4655
- # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
4656
- # * (`Signet::OAuth2::Client`) A signet oauth2 client object
4657
- # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
4658
- # * (`nil`) indicating no credentials
4834
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::VMMigration::V1::ImageImport>]
4659
4835
  #
4660
- # Warning: If you accept a credential configuration (JSON file or Hash) from an
4661
- # external source for authentication to Google Cloud, you must validate it before
4662
- # providing it to a Google API client library. Providing an unvalidated credential
4663
- # configuration to Google APIs can compromise the security of your systems and data.
4664
- # For more information, refer to [Validate credential configurations from external
4665
- # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
4666
- # @return [::Object]
4667
- # @!attribute [rw] scope
4668
- # The OAuth scopes
4669
- # @return [::Array<::String>]
4670
- # @!attribute [rw] lib_name
4671
- # The library name as recorded in instrumentation and logging
4672
- # @return [::String]
4673
- # @!attribute [rw] lib_version
4674
- # The library version as recorded in instrumentation and logging
4675
- # @return [::String]
4676
- # @!attribute [rw] timeout
4677
- # The call timeout in seconds.
4836
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4837
+ #
4838
+ # @example Basic example
4839
+ # require "google/cloud/vm_migration/v1"
4840
+ #
4841
+ # # Create a client object. The client can be reused for multiple calls.
4842
+ # client = Google::Cloud::VMMigration::V1::VMMigration::Rest::Client.new
4843
+ #
4844
+ # # Create a request. To set request fields, pass in keyword arguments.
4845
+ # request = Google::Cloud::VMMigration::V1::ListImageImportsRequest.new
4846
+ #
4847
+ # # Call the list_image_imports method.
4848
+ # result = client.list_image_imports request
4849
+ #
4850
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
4851
+ # # over elements, and API calls will be issued to fetch pages as needed.
4852
+ # result.each do |item|
4853
+ # # Each element is of type ::Google::Cloud::VMMigration::V1::ImageImport.
4854
+ # p item
4855
+ # end
4856
+ #
4857
+ def list_image_imports request, options = nil
4858
+ raise ::ArgumentError, "request must be provided" if request.nil?
4859
+
4860
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VMMigration::V1::ListImageImportsRequest
4861
+
4862
+ # Converts hash and nil to an options object
4863
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4864
+
4865
+ # Customize the options with defaults
4866
+ call_metadata = @config.rpcs.list_image_imports.metadata.to_h
4867
+
4868
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4869
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4870
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4871
+ gapic_version: ::Google::Cloud::VMMigration::V1::VERSION,
4872
+ transports_version_send: [:rest]
4873
+
4874
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4875
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4876
+
4877
+ options.apply_defaults timeout: @config.rpcs.list_image_imports.timeout,
4878
+ metadata: call_metadata,
4879
+ retry_policy: @config.rpcs.list_image_imports.retry_policy
4880
+
4881
+ options.apply_defaults timeout: @config.timeout,
4882
+ metadata: @config.metadata,
4883
+ retry_policy: @config.retry_policy
4884
+
4885
+ @vm_migration_stub.list_image_imports request, options do |result, operation|
4886
+ result = ::Gapic::Rest::PagedEnumerable.new @vm_migration_stub, :list_image_imports, "image_imports", request, result, options
4887
+ yield result, operation if block_given?
4888
+ throw :response, result
4889
+ end
4890
+ rescue ::Gapic::Rest::Error => e
4891
+ raise ::Google::Cloud::Error.from_error(e)
4892
+ end
4893
+
4894
+ ##
4895
+ # Gets details of a single ImageImport.
4896
+ #
4897
+ # @overload get_image_import(request, options = nil)
4898
+ # Pass arguments to `get_image_import` via a request object, either of type
4899
+ # {::Google::Cloud::VMMigration::V1::GetImageImportRequest} or an equivalent Hash.
4900
+ #
4901
+ # @param request [::Google::Cloud::VMMigration::V1::GetImageImportRequest, ::Hash]
4902
+ # A request object representing the call parameters. Required. To specify no
4903
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4904
+ # @param options [::Gapic::CallOptions, ::Hash]
4905
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4906
+ #
4907
+ # @overload get_image_import(name: nil)
4908
+ # Pass arguments to `get_image_import` via keyword arguments. Note that at
4909
+ # least one keyword argument is required. To specify no parameters, or to keep all
4910
+ # the default parameter values, pass an empty Hash as a request object (see above).
4911
+ #
4912
+ # @param name [::String]
4913
+ # Required. The ImageImport name.
4914
+ # @yield [result, operation] Access the result along with the TransportOperation object
4915
+ # @yieldparam result [::Google::Cloud::VMMigration::V1::ImageImport]
4916
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
4917
+ #
4918
+ # @return [::Google::Cloud::VMMigration::V1::ImageImport]
4919
+ #
4920
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
4921
+ #
4922
+ # @example Basic example
4923
+ # require "google/cloud/vm_migration/v1"
4924
+ #
4925
+ # # Create a client object. The client can be reused for multiple calls.
4926
+ # client = Google::Cloud::VMMigration::V1::VMMigration::Rest::Client.new
4927
+ #
4928
+ # # Create a request. To set request fields, pass in keyword arguments.
4929
+ # request = Google::Cloud::VMMigration::V1::GetImageImportRequest.new
4930
+ #
4931
+ # # Call the get_image_import method.
4932
+ # result = client.get_image_import request
4933
+ #
4934
+ # # The returned object is of type Google::Cloud::VMMigration::V1::ImageImport.
4935
+ # p result
4936
+ #
4937
+ def get_image_import request, options = nil
4938
+ raise ::ArgumentError, "request must be provided" if request.nil?
4939
+
4940
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VMMigration::V1::GetImageImportRequest
4941
+
4942
+ # Converts hash and nil to an options object
4943
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4944
+
4945
+ # Customize the options with defaults
4946
+ call_metadata = @config.rpcs.get_image_import.metadata.to_h
4947
+
4948
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4949
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4950
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4951
+ gapic_version: ::Google::Cloud::VMMigration::V1::VERSION,
4952
+ transports_version_send: [:rest]
4953
+
4954
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4955
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4956
+
4957
+ options.apply_defaults timeout: @config.rpcs.get_image_import.timeout,
4958
+ metadata: call_metadata,
4959
+ retry_policy: @config.rpcs.get_image_import.retry_policy
4960
+
4961
+ options.apply_defaults timeout: @config.timeout,
4962
+ metadata: @config.metadata,
4963
+ retry_policy: @config.retry_policy
4964
+
4965
+ @vm_migration_stub.get_image_import request, options do |result, operation|
4966
+ yield result, operation if block_given?
4967
+ end
4968
+ rescue ::Gapic::Rest::Error => e
4969
+ raise ::Google::Cloud::Error.from_error(e)
4970
+ end
4971
+
4972
+ ##
4973
+ # Creates a new ImageImport in a given project.
4974
+ #
4975
+ # @overload create_image_import(request, options = nil)
4976
+ # Pass arguments to `create_image_import` via a request object, either of type
4977
+ # {::Google::Cloud::VMMigration::V1::CreateImageImportRequest} or an equivalent Hash.
4978
+ #
4979
+ # @param request [::Google::Cloud::VMMigration::V1::CreateImageImportRequest, ::Hash]
4980
+ # A request object representing the call parameters. Required. To specify no
4981
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4982
+ # @param options [::Gapic::CallOptions, ::Hash]
4983
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
4984
+ #
4985
+ # @overload create_image_import(parent: nil, image_import_id: nil, image_import: nil, request_id: nil)
4986
+ # Pass arguments to `create_image_import` via keyword arguments. Note that at
4987
+ # least one keyword argument is required. To specify no parameters, or to keep all
4988
+ # the default parameter values, pass an empty Hash as a request object (see above).
4989
+ #
4990
+ # @param parent [::String]
4991
+ # Required. The ImageImport's parent.
4992
+ # @param image_import_id [::String]
4993
+ # Required. The image import identifier.
4994
+ # This value maximum length is 63 characters, and valid characters are
4995
+ # /[a-z][0-9]-/. It must start with an english letter and must not end with a
4996
+ # hyphen.
4997
+ # @param image_import [::Google::Cloud::VMMigration::V1::ImageImport, ::Hash]
4998
+ # Required. The create request body.
4999
+ # @param request_id [::String]
5000
+ # Optional. A request ID to identify requests. Specify a unique request ID
5001
+ # so that if you must retry your request, the server will know to ignore
5002
+ # the request if it has already been completed. The server will guarantee
5003
+ # that for at least 60 minutes since the first request.
5004
+ #
5005
+ # For example, consider a situation where you make an initial request and
5006
+ # the request times out. If you make the request again with the same request
5007
+ # ID, the server can check if original operation with the same request ID
5008
+ # was received, and if so, will ignore the second request. This prevents
5009
+ # clients from accidentally creating duplicate commitments.
5010
+ #
5011
+ # The request ID must be a valid UUID with the exception that zero UUID is
5012
+ # not supported (00000000-0000-0000-0000-000000000000).
5013
+ # @yield [result, operation] Access the result along with the TransportOperation object
5014
+ # @yieldparam result [::Gapic::Operation]
5015
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5016
+ #
5017
+ # @return [::Gapic::Operation]
5018
+ #
5019
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5020
+ #
5021
+ # @example Basic example
5022
+ # require "google/cloud/vm_migration/v1"
5023
+ #
5024
+ # # Create a client object. The client can be reused for multiple calls.
5025
+ # client = Google::Cloud::VMMigration::V1::VMMigration::Rest::Client.new
5026
+ #
5027
+ # # Create a request. To set request fields, pass in keyword arguments.
5028
+ # request = Google::Cloud::VMMigration::V1::CreateImageImportRequest.new
5029
+ #
5030
+ # # Call the create_image_import method.
5031
+ # result = client.create_image_import request
5032
+ #
5033
+ # # The returned object is of type Gapic::Operation. You can use it to
5034
+ # # check the status of an operation, cancel it, or wait for results.
5035
+ # # Here is how to wait for a response.
5036
+ # result.wait_until_done! timeout: 60
5037
+ # if result.response?
5038
+ # p result.response
5039
+ # else
5040
+ # puts "No response received."
5041
+ # end
5042
+ #
5043
+ def create_image_import request, options = nil
5044
+ raise ::ArgumentError, "request must be provided" if request.nil?
5045
+
5046
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VMMigration::V1::CreateImageImportRequest
5047
+
5048
+ # Converts hash and nil to an options object
5049
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5050
+
5051
+ # Customize the options with defaults
5052
+ call_metadata = @config.rpcs.create_image_import.metadata.to_h
5053
+
5054
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5055
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5056
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5057
+ gapic_version: ::Google::Cloud::VMMigration::V1::VERSION,
5058
+ transports_version_send: [:rest]
5059
+
5060
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5061
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5062
+
5063
+ options.apply_defaults timeout: @config.rpcs.create_image_import.timeout,
5064
+ metadata: call_metadata,
5065
+ retry_policy: @config.rpcs.create_image_import.retry_policy
5066
+
5067
+ options.apply_defaults timeout: @config.timeout,
5068
+ metadata: @config.metadata,
5069
+ retry_policy: @config.retry_policy
5070
+
5071
+ @vm_migration_stub.create_image_import request, options do |result, operation|
5072
+ result = ::Gapic::Operation.new result, @operations_client, options: options
5073
+ yield result, operation if block_given?
5074
+ throw :response, result
5075
+ end
5076
+ rescue ::Gapic::Rest::Error => e
5077
+ raise ::Google::Cloud::Error.from_error(e)
5078
+ end
5079
+
5080
+ ##
5081
+ # Deletes a single ImageImport.
5082
+ #
5083
+ # @overload delete_image_import(request, options = nil)
5084
+ # Pass arguments to `delete_image_import` via a request object, either of type
5085
+ # {::Google::Cloud::VMMigration::V1::DeleteImageImportRequest} or an equivalent Hash.
5086
+ #
5087
+ # @param request [::Google::Cloud::VMMigration::V1::DeleteImageImportRequest, ::Hash]
5088
+ # A request object representing the call parameters. Required. To specify no
5089
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5090
+ # @param options [::Gapic::CallOptions, ::Hash]
5091
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
5092
+ #
5093
+ # @overload delete_image_import(name: nil, request_id: nil)
5094
+ # Pass arguments to `delete_image_import` via keyword arguments. Note that at
5095
+ # least one keyword argument is required. To specify no parameters, or to keep all
5096
+ # the default parameter values, pass an empty Hash as a request object (see above).
5097
+ #
5098
+ # @param name [::String]
5099
+ # Required. The ImageImport name.
5100
+ # @param request_id [::String]
5101
+ # Optional. A request ID to identify requests. Specify a unique request ID
5102
+ # so that if you must retry your request, the server will know to ignore
5103
+ # the request if it has already been completed. The server will guarantee
5104
+ # that for at least 60 minutes after the first request.
5105
+ #
5106
+ # For example, consider a situation where you make an initial request and t
5107
+ # he request times out. If you make the request again with the same request
5108
+ # ID, the server can check if original operation with the same request ID
5109
+ # was received, and if so, will ignore the second request. This prevents
5110
+ # clients from accidentally creating duplicate commitments.
5111
+ #
5112
+ # The request ID must be a valid UUID with the exception that zero UUID is
5113
+ # not supported (00000000-0000-0000-0000-000000000000).
5114
+ # @yield [result, operation] Access the result along with the TransportOperation object
5115
+ # @yieldparam result [::Gapic::Operation]
5116
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5117
+ #
5118
+ # @return [::Gapic::Operation]
5119
+ #
5120
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5121
+ #
5122
+ # @example Basic example
5123
+ # require "google/cloud/vm_migration/v1"
5124
+ #
5125
+ # # Create a client object. The client can be reused for multiple calls.
5126
+ # client = Google::Cloud::VMMigration::V1::VMMigration::Rest::Client.new
5127
+ #
5128
+ # # Create a request. To set request fields, pass in keyword arguments.
5129
+ # request = Google::Cloud::VMMigration::V1::DeleteImageImportRequest.new
5130
+ #
5131
+ # # Call the delete_image_import method.
5132
+ # result = client.delete_image_import request
5133
+ #
5134
+ # # The returned object is of type Gapic::Operation. You can use it to
5135
+ # # check the status of an operation, cancel it, or wait for results.
5136
+ # # Here is how to wait for a response.
5137
+ # result.wait_until_done! timeout: 60
5138
+ # if result.response?
5139
+ # p result.response
5140
+ # else
5141
+ # puts "No response received."
5142
+ # end
5143
+ #
5144
+ def delete_image_import request, options = nil
5145
+ raise ::ArgumentError, "request must be provided" if request.nil?
5146
+
5147
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VMMigration::V1::DeleteImageImportRequest
5148
+
5149
+ # Converts hash and nil to an options object
5150
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5151
+
5152
+ # Customize the options with defaults
5153
+ call_metadata = @config.rpcs.delete_image_import.metadata.to_h
5154
+
5155
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5156
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5157
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5158
+ gapic_version: ::Google::Cloud::VMMigration::V1::VERSION,
5159
+ transports_version_send: [:rest]
5160
+
5161
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5162
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5163
+
5164
+ options.apply_defaults timeout: @config.rpcs.delete_image_import.timeout,
5165
+ metadata: call_metadata,
5166
+ retry_policy: @config.rpcs.delete_image_import.retry_policy
5167
+
5168
+ options.apply_defaults timeout: @config.timeout,
5169
+ metadata: @config.metadata,
5170
+ retry_policy: @config.retry_policy
5171
+
5172
+ @vm_migration_stub.delete_image_import request, options do |result, operation|
5173
+ result = ::Gapic::Operation.new result, @operations_client, options: options
5174
+ yield result, operation if block_given?
5175
+ throw :response, result
5176
+ end
5177
+ rescue ::Gapic::Rest::Error => e
5178
+ raise ::Google::Cloud::Error.from_error(e)
5179
+ end
5180
+
5181
+ ##
5182
+ # Lists ImageImportJobs in a given project.
5183
+ #
5184
+ # @overload list_image_import_jobs(request, options = nil)
5185
+ # Pass arguments to `list_image_import_jobs` via a request object, either of type
5186
+ # {::Google::Cloud::VMMigration::V1::ListImageImportJobsRequest} or an equivalent Hash.
5187
+ #
5188
+ # @param request [::Google::Cloud::VMMigration::V1::ListImageImportJobsRequest, ::Hash]
5189
+ # A request object representing the call parameters. Required. To specify no
5190
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5191
+ # @param options [::Gapic::CallOptions, ::Hash]
5192
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
5193
+ #
5194
+ # @overload list_image_import_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
5195
+ # Pass arguments to `list_image_import_jobs` via keyword arguments. Note that at
5196
+ # least one keyword argument is required. To specify no parameters, or to keep all
5197
+ # the default parameter values, pass an empty Hash as a request object (see above).
5198
+ #
5199
+ # @param parent [::String]
5200
+ # Required. The parent, which owns this collection of targets.
5201
+ # @param page_size [::Integer]
5202
+ # Optional. The maximum number of targets to return. The service may return
5203
+ # fewer than this value. If unspecified, at most 500 targets will be
5204
+ # returned. The maximum value is 1000; values above 1000 will be coerced to
5205
+ # 1000.
5206
+ # @param page_token [::String]
5207
+ # Optional. A page token, received from a previous `ListImageImportJobs`
5208
+ # call. Provide this to retrieve the subsequent page.
5209
+ #
5210
+ # When paginating, all other parameters provided to `ListImageImportJobs`
5211
+ # must match the call that provided the page token.
5212
+ # @param filter [::String]
5213
+ # Optional. The filter request (according to <a
5214
+ # href="https://google.aip.dev/160" target="_blank">AIP-160</a>).
5215
+ # @param order_by [::String]
5216
+ # Optional. The order by fields for the result (according to <a
5217
+ # href="https://google.aip.dev/132#ordering" target="_blank">AIP-132</a>).
5218
+ # Currently ordering is only possible by "name" field.
5219
+ # @yield [result, operation] Access the result along with the TransportOperation object
5220
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::VMMigration::V1::ImageImportJob>]
5221
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5222
+ #
5223
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::VMMigration::V1::ImageImportJob>]
5224
+ #
5225
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5226
+ #
5227
+ # @example Basic example
5228
+ # require "google/cloud/vm_migration/v1"
5229
+ #
5230
+ # # Create a client object. The client can be reused for multiple calls.
5231
+ # client = Google::Cloud::VMMigration::V1::VMMigration::Rest::Client.new
5232
+ #
5233
+ # # Create a request. To set request fields, pass in keyword arguments.
5234
+ # request = Google::Cloud::VMMigration::V1::ListImageImportJobsRequest.new
5235
+ #
5236
+ # # Call the list_image_import_jobs method.
5237
+ # result = client.list_image_import_jobs request
5238
+ #
5239
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
5240
+ # # over elements, and API calls will be issued to fetch pages as needed.
5241
+ # result.each do |item|
5242
+ # # Each element is of type ::Google::Cloud::VMMigration::V1::ImageImportJob.
5243
+ # p item
5244
+ # end
5245
+ #
5246
+ def list_image_import_jobs request, options = nil
5247
+ raise ::ArgumentError, "request must be provided" if request.nil?
5248
+
5249
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VMMigration::V1::ListImageImportJobsRequest
5250
+
5251
+ # Converts hash and nil to an options object
5252
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5253
+
5254
+ # Customize the options with defaults
5255
+ call_metadata = @config.rpcs.list_image_import_jobs.metadata.to_h
5256
+
5257
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5258
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5259
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5260
+ gapic_version: ::Google::Cloud::VMMigration::V1::VERSION,
5261
+ transports_version_send: [:rest]
5262
+
5263
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5264
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5265
+
5266
+ options.apply_defaults timeout: @config.rpcs.list_image_import_jobs.timeout,
5267
+ metadata: call_metadata,
5268
+ retry_policy: @config.rpcs.list_image_import_jobs.retry_policy
5269
+
5270
+ options.apply_defaults timeout: @config.timeout,
5271
+ metadata: @config.metadata,
5272
+ retry_policy: @config.retry_policy
5273
+
5274
+ @vm_migration_stub.list_image_import_jobs request, options do |result, operation|
5275
+ result = ::Gapic::Rest::PagedEnumerable.new @vm_migration_stub, :list_image_import_jobs, "image_import_jobs", request, result, options
5276
+ yield result, operation if block_given?
5277
+ throw :response, result
5278
+ end
5279
+ rescue ::Gapic::Rest::Error => e
5280
+ raise ::Google::Cloud::Error.from_error(e)
5281
+ end
5282
+
5283
+ ##
5284
+ # Gets details of a single ImageImportJob.
5285
+ #
5286
+ # @overload get_image_import_job(request, options = nil)
5287
+ # Pass arguments to `get_image_import_job` via a request object, either of type
5288
+ # {::Google::Cloud::VMMigration::V1::GetImageImportJobRequest} or an equivalent Hash.
5289
+ #
5290
+ # @param request [::Google::Cloud::VMMigration::V1::GetImageImportJobRequest, ::Hash]
5291
+ # A request object representing the call parameters. Required. To specify no
5292
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5293
+ # @param options [::Gapic::CallOptions, ::Hash]
5294
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
5295
+ #
5296
+ # @overload get_image_import_job(name: nil)
5297
+ # Pass arguments to `get_image_import_job` via keyword arguments. Note that at
5298
+ # least one keyword argument is required. To specify no parameters, or to keep all
5299
+ # the default parameter values, pass an empty Hash as a request object (see above).
5300
+ #
5301
+ # @param name [::String]
5302
+ # Required. The ImageImportJob name.
5303
+ # @yield [result, operation] Access the result along with the TransportOperation object
5304
+ # @yieldparam result [::Google::Cloud::VMMigration::V1::ImageImportJob]
5305
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5306
+ #
5307
+ # @return [::Google::Cloud::VMMigration::V1::ImageImportJob]
5308
+ #
5309
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5310
+ #
5311
+ # @example Basic example
5312
+ # require "google/cloud/vm_migration/v1"
5313
+ #
5314
+ # # Create a client object. The client can be reused for multiple calls.
5315
+ # client = Google::Cloud::VMMigration::V1::VMMigration::Rest::Client.new
5316
+ #
5317
+ # # Create a request. To set request fields, pass in keyword arguments.
5318
+ # request = Google::Cloud::VMMigration::V1::GetImageImportJobRequest.new
5319
+ #
5320
+ # # Call the get_image_import_job method.
5321
+ # result = client.get_image_import_job request
5322
+ #
5323
+ # # The returned object is of type Google::Cloud::VMMigration::V1::ImageImportJob.
5324
+ # p result
5325
+ #
5326
+ def get_image_import_job request, options = nil
5327
+ raise ::ArgumentError, "request must be provided" if request.nil?
5328
+
5329
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VMMigration::V1::GetImageImportJobRequest
5330
+
5331
+ # Converts hash and nil to an options object
5332
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5333
+
5334
+ # Customize the options with defaults
5335
+ call_metadata = @config.rpcs.get_image_import_job.metadata.to_h
5336
+
5337
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5338
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5339
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5340
+ gapic_version: ::Google::Cloud::VMMigration::V1::VERSION,
5341
+ transports_version_send: [:rest]
5342
+
5343
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5344
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5345
+
5346
+ options.apply_defaults timeout: @config.rpcs.get_image_import_job.timeout,
5347
+ metadata: call_metadata,
5348
+ retry_policy: @config.rpcs.get_image_import_job.retry_policy
5349
+
5350
+ options.apply_defaults timeout: @config.timeout,
5351
+ metadata: @config.metadata,
5352
+ retry_policy: @config.retry_policy
5353
+
5354
+ @vm_migration_stub.get_image_import_job request, options do |result, operation|
5355
+ yield result, operation if block_given?
5356
+ end
5357
+ rescue ::Gapic::Rest::Error => e
5358
+ raise ::Google::Cloud::Error.from_error(e)
5359
+ end
5360
+
5361
+ ##
5362
+ # Initiates the cancellation of a running clone job.
5363
+ #
5364
+ # @overload cancel_image_import_job(request, options = nil)
5365
+ # Pass arguments to `cancel_image_import_job` via a request object, either of type
5366
+ # {::Google::Cloud::VMMigration::V1::CancelImageImportJobRequest} or an equivalent Hash.
5367
+ #
5368
+ # @param request [::Google::Cloud::VMMigration::V1::CancelImageImportJobRequest, ::Hash]
5369
+ # A request object representing the call parameters. Required. To specify no
5370
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5371
+ # @param options [::Gapic::CallOptions, ::Hash]
5372
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
5373
+ #
5374
+ # @overload cancel_image_import_job(name: nil)
5375
+ # Pass arguments to `cancel_image_import_job` via keyword arguments. Note that at
5376
+ # least one keyword argument is required. To specify no parameters, or to keep all
5377
+ # the default parameter values, pass an empty Hash as a request object (see above).
5378
+ #
5379
+ # @param name [::String]
5380
+ # Required. The image import job id.
5381
+ # @yield [result, operation] Access the result along with the TransportOperation object
5382
+ # @yieldparam result [::Gapic::Operation]
5383
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5384
+ #
5385
+ # @return [::Gapic::Operation]
5386
+ #
5387
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5388
+ #
5389
+ # @example Basic example
5390
+ # require "google/cloud/vm_migration/v1"
5391
+ #
5392
+ # # Create a client object. The client can be reused for multiple calls.
5393
+ # client = Google::Cloud::VMMigration::V1::VMMigration::Rest::Client.new
5394
+ #
5395
+ # # Create a request. To set request fields, pass in keyword arguments.
5396
+ # request = Google::Cloud::VMMigration::V1::CancelImageImportJobRequest.new
5397
+ #
5398
+ # # Call the cancel_image_import_job method.
5399
+ # result = client.cancel_image_import_job request
5400
+ #
5401
+ # # The returned object is of type Gapic::Operation. You can use it to
5402
+ # # check the status of an operation, cancel it, or wait for results.
5403
+ # # Here is how to wait for a response.
5404
+ # result.wait_until_done! timeout: 60
5405
+ # if result.response?
5406
+ # p result.response
5407
+ # else
5408
+ # puts "No response received."
5409
+ # end
5410
+ #
5411
+ def cancel_image_import_job request, options = nil
5412
+ raise ::ArgumentError, "request must be provided" if request.nil?
5413
+
5414
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VMMigration::V1::CancelImageImportJobRequest
5415
+
5416
+ # Converts hash and nil to an options object
5417
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5418
+
5419
+ # Customize the options with defaults
5420
+ call_metadata = @config.rpcs.cancel_image_import_job.metadata.to_h
5421
+
5422
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5423
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5424
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5425
+ gapic_version: ::Google::Cloud::VMMigration::V1::VERSION,
5426
+ transports_version_send: [:rest]
5427
+
5428
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5429
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5430
+
5431
+ options.apply_defaults timeout: @config.rpcs.cancel_image_import_job.timeout,
5432
+ metadata: call_metadata,
5433
+ retry_policy: @config.rpcs.cancel_image_import_job.retry_policy
5434
+
5435
+ options.apply_defaults timeout: @config.timeout,
5436
+ metadata: @config.metadata,
5437
+ retry_policy: @config.retry_policy
5438
+
5439
+ @vm_migration_stub.cancel_image_import_job request, options do |result, operation|
5440
+ result = ::Gapic::Operation.new result, @operations_client, options: options
5441
+ yield result, operation if block_given?
5442
+ throw :response, result
5443
+ end
5444
+ rescue ::Gapic::Rest::Error => e
5445
+ raise ::Google::Cloud::Error.from_error(e)
5446
+ end
5447
+
5448
+ ##
5449
+ # Creates a new disk migration job in a given Source.
5450
+ #
5451
+ # @overload create_disk_migration_job(request, options = nil)
5452
+ # Pass arguments to `create_disk_migration_job` via a request object, either of type
5453
+ # {::Google::Cloud::VMMigration::V1::CreateDiskMigrationJobRequest} or an equivalent Hash.
5454
+ #
5455
+ # @param request [::Google::Cloud::VMMigration::V1::CreateDiskMigrationJobRequest, ::Hash]
5456
+ # A request object representing the call parameters. Required. To specify no
5457
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5458
+ # @param options [::Gapic::CallOptions, ::Hash]
5459
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
5460
+ #
5461
+ # @overload create_disk_migration_job(parent: nil, disk_migration_job_id: nil, disk_migration_job: nil, request_id: nil)
5462
+ # Pass arguments to `create_disk_migration_job` via keyword arguments. Note that at
5463
+ # least one keyword argument is required. To specify no parameters, or to keep all
5464
+ # the default parameter values, pass an empty Hash as a request object (see above).
5465
+ #
5466
+ # @param parent [::String]
5467
+ # Required. The DiskMigrationJob's parent.
5468
+ # @param disk_migration_job_id [::String]
5469
+ # Required. The DiskMigrationJob identifier.
5470
+ # The maximum length of this value is 63 characters.
5471
+ # Valid characters are lower case Latin letters, digits and hyphen.
5472
+ # It must start with a Latin letter and must not end with a hyphen.
5473
+ # @param disk_migration_job [::Google::Cloud::VMMigration::V1::DiskMigrationJob, ::Hash]
5474
+ # Required. The create request body.
5475
+ # @param request_id [::String]
5476
+ # Optional. A request ID to identify requests. Specify a unique request ID
5477
+ # so that if you must retry your request, the server will know to ignore
5478
+ # the request if it has already been completed. The server will guarantee
5479
+ # that for at least 60 minutes since the first request.
5480
+ #
5481
+ # For example, consider a situation where you make an initial request and
5482
+ # the request timed out. If you make the request again with the same request
5483
+ # ID, the server can check if original operation with the same request ID
5484
+ # was received, and if so, will ignore the second request. This prevents
5485
+ # clients from accidentally creating duplicate commitments.
5486
+ #
5487
+ # The request ID must be a valid UUID with the exception that zero UUID is
5488
+ # not supported (00000000-0000-0000-0000-000000000000).
5489
+ # @yield [result, operation] Access the result along with the TransportOperation object
5490
+ # @yieldparam result [::Gapic::Operation]
5491
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5492
+ #
5493
+ # @return [::Gapic::Operation]
5494
+ #
5495
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5496
+ #
5497
+ # @example Basic example
5498
+ # require "google/cloud/vm_migration/v1"
5499
+ #
5500
+ # # Create a client object. The client can be reused for multiple calls.
5501
+ # client = Google::Cloud::VMMigration::V1::VMMigration::Rest::Client.new
5502
+ #
5503
+ # # Create a request. To set request fields, pass in keyword arguments.
5504
+ # request = Google::Cloud::VMMigration::V1::CreateDiskMigrationJobRequest.new
5505
+ #
5506
+ # # Call the create_disk_migration_job method.
5507
+ # result = client.create_disk_migration_job request
5508
+ #
5509
+ # # The returned object is of type Gapic::Operation. You can use it to
5510
+ # # check the status of an operation, cancel it, or wait for results.
5511
+ # # Here is how to wait for a response.
5512
+ # result.wait_until_done! timeout: 60
5513
+ # if result.response?
5514
+ # p result.response
5515
+ # else
5516
+ # puts "No response received."
5517
+ # end
5518
+ #
5519
+ def create_disk_migration_job request, options = nil
5520
+ raise ::ArgumentError, "request must be provided" if request.nil?
5521
+
5522
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VMMigration::V1::CreateDiskMigrationJobRequest
5523
+
5524
+ # Converts hash and nil to an options object
5525
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5526
+
5527
+ # Customize the options with defaults
5528
+ call_metadata = @config.rpcs.create_disk_migration_job.metadata.to_h
5529
+
5530
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5531
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5532
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5533
+ gapic_version: ::Google::Cloud::VMMigration::V1::VERSION,
5534
+ transports_version_send: [:rest]
5535
+
5536
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5537
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5538
+
5539
+ options.apply_defaults timeout: @config.rpcs.create_disk_migration_job.timeout,
5540
+ metadata: call_metadata,
5541
+ retry_policy: @config.rpcs.create_disk_migration_job.retry_policy
5542
+
5543
+ options.apply_defaults timeout: @config.timeout,
5544
+ metadata: @config.metadata,
5545
+ retry_policy: @config.retry_policy
5546
+
5547
+ @vm_migration_stub.create_disk_migration_job request, options do |result, operation|
5548
+ result = ::Gapic::Operation.new result, @operations_client, options: options
5549
+ yield result, operation if block_given?
5550
+ throw :response, result
5551
+ end
5552
+ rescue ::Gapic::Rest::Error => e
5553
+ raise ::Google::Cloud::Error.from_error(e)
5554
+ end
5555
+
5556
+ ##
5557
+ # Lists DiskMigrationJobs in a given Source.
5558
+ #
5559
+ # @overload list_disk_migration_jobs(request, options = nil)
5560
+ # Pass arguments to `list_disk_migration_jobs` via a request object, either of type
5561
+ # {::Google::Cloud::VMMigration::V1::ListDiskMigrationJobsRequest} or an equivalent Hash.
5562
+ #
5563
+ # @param request [::Google::Cloud::VMMigration::V1::ListDiskMigrationJobsRequest, ::Hash]
5564
+ # A request object representing the call parameters. Required. To specify no
5565
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5566
+ # @param options [::Gapic::CallOptions, ::Hash]
5567
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
5568
+ #
5569
+ # @overload list_disk_migration_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
5570
+ # Pass arguments to `list_disk_migration_jobs` via keyword arguments. Note that at
5571
+ # least one keyword argument is required. To specify no parameters, or to keep all
5572
+ # the default parameter values, pass an empty Hash as a request object (see above).
5573
+ #
5574
+ # @param parent [::String]
5575
+ # Required. The parent, which owns this collection of DiskMigrationJobs.
5576
+ # @param page_size [::Integer]
5577
+ # Optional. The maximum number of disk migration jobs to return. The service
5578
+ # may return fewer than this value. If unspecified, at most 500
5579
+ # disk migration jobs will be returned.
5580
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
5581
+ # @param page_token [::String]
5582
+ # Optional. A page token, received from a previous `ListDiskMigrationJobs`
5583
+ # call. Provide this to retrieve the subsequent page.
5584
+ #
5585
+ # When paginating, all parameters provided to `ListDiskMigrationJobs`
5586
+ # except `page_size` must match the call that provided the page token.
5587
+ # @param filter [::String]
5588
+ # Optional. The filter request (according to <a
5589
+ # href="https://google.aip.dev/160" target="_blank">AIP-160</a>).
5590
+ # @param order_by [::String]
5591
+ # Optional. Ordering of the result list.
5592
+ # @yield [result, operation] Access the result along with the TransportOperation object
5593
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::VMMigration::V1::DiskMigrationJob>]
5594
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5595
+ #
5596
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::VMMigration::V1::DiskMigrationJob>]
5597
+ #
5598
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5599
+ #
5600
+ # @example Basic example
5601
+ # require "google/cloud/vm_migration/v1"
5602
+ #
5603
+ # # Create a client object. The client can be reused for multiple calls.
5604
+ # client = Google::Cloud::VMMigration::V1::VMMigration::Rest::Client.new
5605
+ #
5606
+ # # Create a request. To set request fields, pass in keyword arguments.
5607
+ # request = Google::Cloud::VMMigration::V1::ListDiskMigrationJobsRequest.new
5608
+ #
5609
+ # # Call the list_disk_migration_jobs method.
5610
+ # result = client.list_disk_migration_jobs request
5611
+ #
5612
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
5613
+ # # over elements, and API calls will be issued to fetch pages as needed.
5614
+ # result.each do |item|
5615
+ # # Each element is of type ::Google::Cloud::VMMigration::V1::DiskMigrationJob.
5616
+ # p item
5617
+ # end
5618
+ #
5619
+ def list_disk_migration_jobs request, options = nil
5620
+ raise ::ArgumentError, "request must be provided" if request.nil?
5621
+
5622
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VMMigration::V1::ListDiskMigrationJobsRequest
5623
+
5624
+ # Converts hash and nil to an options object
5625
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5626
+
5627
+ # Customize the options with defaults
5628
+ call_metadata = @config.rpcs.list_disk_migration_jobs.metadata.to_h
5629
+
5630
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5631
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5632
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5633
+ gapic_version: ::Google::Cloud::VMMigration::V1::VERSION,
5634
+ transports_version_send: [:rest]
5635
+
5636
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5637
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5638
+
5639
+ options.apply_defaults timeout: @config.rpcs.list_disk_migration_jobs.timeout,
5640
+ metadata: call_metadata,
5641
+ retry_policy: @config.rpcs.list_disk_migration_jobs.retry_policy
5642
+
5643
+ options.apply_defaults timeout: @config.timeout,
5644
+ metadata: @config.metadata,
5645
+ retry_policy: @config.retry_policy
5646
+
5647
+ @vm_migration_stub.list_disk_migration_jobs request, options do |result, operation|
5648
+ result = ::Gapic::Rest::PagedEnumerable.new @vm_migration_stub, :list_disk_migration_jobs, "disk_migration_jobs", request, result, options
5649
+ yield result, operation if block_given?
5650
+ throw :response, result
5651
+ end
5652
+ rescue ::Gapic::Rest::Error => e
5653
+ raise ::Google::Cloud::Error.from_error(e)
5654
+ end
5655
+
5656
+ ##
5657
+ # Gets details of a single DiskMigrationJob.
5658
+ #
5659
+ # @overload get_disk_migration_job(request, options = nil)
5660
+ # Pass arguments to `get_disk_migration_job` via a request object, either of type
5661
+ # {::Google::Cloud::VMMigration::V1::GetDiskMigrationJobRequest} or an equivalent Hash.
5662
+ #
5663
+ # @param request [::Google::Cloud::VMMigration::V1::GetDiskMigrationJobRequest, ::Hash]
5664
+ # A request object representing the call parameters. Required. To specify no
5665
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5666
+ # @param options [::Gapic::CallOptions, ::Hash]
5667
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
5668
+ #
5669
+ # @overload get_disk_migration_job(name: nil)
5670
+ # Pass arguments to `get_disk_migration_job` via keyword arguments. Note that at
5671
+ # least one keyword argument is required. To specify no parameters, or to keep all
5672
+ # the default parameter values, pass an empty Hash as a request object (see above).
5673
+ #
5674
+ # @param name [::String]
5675
+ # Required. The name of the DiskMigrationJob.
5676
+ # @yield [result, operation] Access the result along with the TransportOperation object
5677
+ # @yieldparam result [::Google::Cloud::VMMigration::V1::DiskMigrationJob]
5678
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5679
+ #
5680
+ # @return [::Google::Cloud::VMMigration::V1::DiskMigrationJob]
5681
+ #
5682
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5683
+ #
5684
+ # @example Basic example
5685
+ # require "google/cloud/vm_migration/v1"
5686
+ #
5687
+ # # Create a client object. The client can be reused for multiple calls.
5688
+ # client = Google::Cloud::VMMigration::V1::VMMigration::Rest::Client.new
5689
+ #
5690
+ # # Create a request. To set request fields, pass in keyword arguments.
5691
+ # request = Google::Cloud::VMMigration::V1::GetDiskMigrationJobRequest.new
5692
+ #
5693
+ # # Call the get_disk_migration_job method.
5694
+ # result = client.get_disk_migration_job request
5695
+ #
5696
+ # # The returned object is of type Google::Cloud::VMMigration::V1::DiskMigrationJob.
5697
+ # p result
5698
+ #
5699
+ def get_disk_migration_job request, options = nil
5700
+ raise ::ArgumentError, "request must be provided" if request.nil?
5701
+
5702
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VMMigration::V1::GetDiskMigrationJobRequest
5703
+
5704
+ # Converts hash and nil to an options object
5705
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5706
+
5707
+ # Customize the options with defaults
5708
+ call_metadata = @config.rpcs.get_disk_migration_job.metadata.to_h
5709
+
5710
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5711
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5712
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5713
+ gapic_version: ::Google::Cloud::VMMigration::V1::VERSION,
5714
+ transports_version_send: [:rest]
5715
+
5716
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5717
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5718
+
5719
+ options.apply_defaults timeout: @config.rpcs.get_disk_migration_job.timeout,
5720
+ metadata: call_metadata,
5721
+ retry_policy: @config.rpcs.get_disk_migration_job.retry_policy
5722
+
5723
+ options.apply_defaults timeout: @config.timeout,
5724
+ metadata: @config.metadata,
5725
+ retry_policy: @config.retry_policy
5726
+
5727
+ @vm_migration_stub.get_disk_migration_job request, options do |result, operation|
5728
+ yield result, operation if block_given?
5729
+ end
5730
+ rescue ::Gapic::Rest::Error => e
5731
+ raise ::Google::Cloud::Error.from_error(e)
5732
+ end
5733
+
5734
+ ##
5735
+ # Updates the parameters of a single DiskMigrationJob.
5736
+ #
5737
+ # @overload update_disk_migration_job(request, options = nil)
5738
+ # Pass arguments to `update_disk_migration_job` via a request object, either of type
5739
+ # {::Google::Cloud::VMMigration::V1::UpdateDiskMigrationJobRequest} or an equivalent Hash.
5740
+ #
5741
+ # @param request [::Google::Cloud::VMMigration::V1::UpdateDiskMigrationJobRequest, ::Hash]
5742
+ # A request object representing the call parameters. Required. To specify no
5743
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5744
+ # @param options [::Gapic::CallOptions, ::Hash]
5745
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
5746
+ #
5747
+ # @overload update_disk_migration_job(update_mask: nil, disk_migration_job: nil, request_id: nil)
5748
+ # Pass arguments to `update_disk_migration_job` via keyword arguments. Note that at
5749
+ # least one keyword argument is required. To specify no parameters, or to keep all
5750
+ # the default parameter values, pass an empty Hash as a request object (see above).
5751
+ #
5752
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
5753
+ # Optional. Field mask is used to specify the fields to be overwritten in the
5754
+ # DiskMigrationJob resource by the update.
5755
+ # The fields specified in the update_mask are relative to the resource, not
5756
+ # the full request. A field will be overwritten if it is in the mask. If the
5757
+ # user does not provide a mask, then a mask equivalent to all fields that are
5758
+ # populated (have a non-empty value), will be implied.
5759
+ # @param disk_migration_job [::Google::Cloud::VMMigration::V1::DiskMigrationJob, ::Hash]
5760
+ # Required. The update request body.
5761
+ # @param request_id [::String]
5762
+ # Optional. A request ID to identify requests. Specify a unique request ID
5763
+ # so that if you must retry your request, the server will know to ignore
5764
+ # the request if it has already been completed. The server will guarantee
5765
+ # that for at least 60 minutes since the first request.
5766
+ #
5767
+ # For example, consider a situation where you make an initial request and
5768
+ # the request timed out. If you make the request again with the same request
5769
+ # ID, the server can check if original operation with the same request ID
5770
+ # was received, and if so, will ignore the second request. This prevents
5771
+ # clients from accidentally creating duplicate commitments.
5772
+ #
5773
+ # The request ID must be a valid UUID with the exception that zero UUID is
5774
+ # not supported (00000000-0000-0000-0000-000000000000).
5775
+ # @yield [result, operation] Access the result along with the TransportOperation object
5776
+ # @yieldparam result [::Gapic::Operation]
5777
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5778
+ #
5779
+ # @return [::Gapic::Operation]
5780
+ #
5781
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5782
+ #
5783
+ # @example Basic example
5784
+ # require "google/cloud/vm_migration/v1"
5785
+ #
5786
+ # # Create a client object. The client can be reused for multiple calls.
5787
+ # client = Google::Cloud::VMMigration::V1::VMMigration::Rest::Client.new
5788
+ #
5789
+ # # Create a request. To set request fields, pass in keyword arguments.
5790
+ # request = Google::Cloud::VMMigration::V1::UpdateDiskMigrationJobRequest.new
5791
+ #
5792
+ # # Call the update_disk_migration_job method.
5793
+ # result = client.update_disk_migration_job request
5794
+ #
5795
+ # # The returned object is of type Gapic::Operation. You can use it to
5796
+ # # check the status of an operation, cancel it, or wait for results.
5797
+ # # Here is how to wait for a response.
5798
+ # result.wait_until_done! timeout: 60
5799
+ # if result.response?
5800
+ # p result.response
5801
+ # else
5802
+ # puts "No response received."
5803
+ # end
5804
+ #
5805
+ def update_disk_migration_job request, options = nil
5806
+ raise ::ArgumentError, "request must be provided" if request.nil?
5807
+
5808
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VMMigration::V1::UpdateDiskMigrationJobRequest
5809
+
5810
+ # Converts hash and nil to an options object
5811
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5812
+
5813
+ # Customize the options with defaults
5814
+ call_metadata = @config.rpcs.update_disk_migration_job.metadata.to_h
5815
+
5816
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5817
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5818
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5819
+ gapic_version: ::Google::Cloud::VMMigration::V1::VERSION,
5820
+ transports_version_send: [:rest]
5821
+
5822
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5823
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5824
+
5825
+ options.apply_defaults timeout: @config.rpcs.update_disk_migration_job.timeout,
5826
+ metadata: call_metadata,
5827
+ retry_policy: @config.rpcs.update_disk_migration_job.retry_policy
5828
+
5829
+ options.apply_defaults timeout: @config.timeout,
5830
+ metadata: @config.metadata,
5831
+ retry_policy: @config.retry_policy
5832
+
5833
+ @vm_migration_stub.update_disk_migration_job request, options do |result, operation|
5834
+ result = ::Gapic::Operation.new result, @operations_client, options: options
5835
+ yield result, operation if block_given?
5836
+ throw :response, result
5837
+ end
5838
+ rescue ::Gapic::Rest::Error => e
5839
+ raise ::Google::Cloud::Error.from_error(e)
5840
+ end
5841
+
5842
+ ##
5843
+ # Deletes a single DiskMigrationJob.
5844
+ #
5845
+ # @overload delete_disk_migration_job(request, options = nil)
5846
+ # Pass arguments to `delete_disk_migration_job` via a request object, either of type
5847
+ # {::Google::Cloud::VMMigration::V1::DeleteDiskMigrationJobRequest} or an equivalent Hash.
5848
+ #
5849
+ # @param request [::Google::Cloud::VMMigration::V1::DeleteDiskMigrationJobRequest, ::Hash]
5850
+ # A request object representing the call parameters. Required. To specify no
5851
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5852
+ # @param options [::Gapic::CallOptions, ::Hash]
5853
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
5854
+ #
5855
+ # @overload delete_disk_migration_job(name: nil)
5856
+ # Pass arguments to `delete_disk_migration_job` via keyword arguments. Note that at
5857
+ # least one keyword argument is required. To specify no parameters, or to keep all
5858
+ # the default parameter values, pass an empty Hash as a request object (see above).
5859
+ #
5860
+ # @param name [::String]
5861
+ # Required. The name of the DiskMigrationJob.
5862
+ # @yield [result, operation] Access the result along with the TransportOperation object
5863
+ # @yieldparam result [::Gapic::Operation]
5864
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5865
+ #
5866
+ # @return [::Gapic::Operation]
5867
+ #
5868
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5869
+ #
5870
+ # @example Basic example
5871
+ # require "google/cloud/vm_migration/v1"
5872
+ #
5873
+ # # Create a client object. The client can be reused for multiple calls.
5874
+ # client = Google::Cloud::VMMigration::V1::VMMigration::Rest::Client.new
5875
+ #
5876
+ # # Create a request. To set request fields, pass in keyword arguments.
5877
+ # request = Google::Cloud::VMMigration::V1::DeleteDiskMigrationJobRequest.new
5878
+ #
5879
+ # # Call the delete_disk_migration_job method.
5880
+ # result = client.delete_disk_migration_job request
5881
+ #
5882
+ # # The returned object is of type Gapic::Operation. You can use it to
5883
+ # # check the status of an operation, cancel it, or wait for results.
5884
+ # # Here is how to wait for a response.
5885
+ # result.wait_until_done! timeout: 60
5886
+ # if result.response?
5887
+ # p result.response
5888
+ # else
5889
+ # puts "No response received."
5890
+ # end
5891
+ #
5892
+ def delete_disk_migration_job request, options = nil
5893
+ raise ::ArgumentError, "request must be provided" if request.nil?
5894
+
5895
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VMMigration::V1::DeleteDiskMigrationJobRequest
5896
+
5897
+ # Converts hash and nil to an options object
5898
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5899
+
5900
+ # Customize the options with defaults
5901
+ call_metadata = @config.rpcs.delete_disk_migration_job.metadata.to_h
5902
+
5903
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5904
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5905
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5906
+ gapic_version: ::Google::Cloud::VMMigration::V1::VERSION,
5907
+ transports_version_send: [:rest]
5908
+
5909
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5910
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5911
+
5912
+ options.apply_defaults timeout: @config.rpcs.delete_disk_migration_job.timeout,
5913
+ metadata: call_metadata,
5914
+ retry_policy: @config.rpcs.delete_disk_migration_job.retry_policy
5915
+
5916
+ options.apply_defaults timeout: @config.timeout,
5917
+ metadata: @config.metadata,
5918
+ retry_policy: @config.retry_policy
5919
+
5920
+ @vm_migration_stub.delete_disk_migration_job request, options do |result, operation|
5921
+ result = ::Gapic::Operation.new result, @operations_client, options: options
5922
+ yield result, operation if block_given?
5923
+ throw :response, result
5924
+ end
5925
+ rescue ::Gapic::Rest::Error => e
5926
+ raise ::Google::Cloud::Error.from_error(e)
5927
+ end
5928
+
5929
+ ##
5930
+ # Runs the disk migration job.
5931
+ #
5932
+ # @overload run_disk_migration_job(request, options = nil)
5933
+ # Pass arguments to `run_disk_migration_job` via a request object, either of type
5934
+ # {::Google::Cloud::VMMigration::V1::RunDiskMigrationJobRequest} or an equivalent Hash.
5935
+ #
5936
+ # @param request [::Google::Cloud::VMMigration::V1::RunDiskMigrationJobRequest, ::Hash]
5937
+ # A request object representing the call parameters. Required. To specify no
5938
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5939
+ # @param options [::Gapic::CallOptions, ::Hash]
5940
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
5941
+ #
5942
+ # @overload run_disk_migration_job(name: nil)
5943
+ # Pass arguments to `run_disk_migration_job` via keyword arguments. Note that at
5944
+ # least one keyword argument is required. To specify no parameters, or to keep all
5945
+ # the default parameter values, pass an empty Hash as a request object (see above).
5946
+ #
5947
+ # @param name [::String]
5948
+ # Required. The name of the DiskMigrationJob.
5949
+ # @yield [result, operation] Access the result along with the TransportOperation object
5950
+ # @yieldparam result [::Gapic::Operation]
5951
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5952
+ #
5953
+ # @return [::Gapic::Operation]
5954
+ #
5955
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5956
+ #
5957
+ # @example Basic example
5958
+ # require "google/cloud/vm_migration/v1"
5959
+ #
5960
+ # # Create a client object. The client can be reused for multiple calls.
5961
+ # client = Google::Cloud::VMMigration::V1::VMMigration::Rest::Client.new
5962
+ #
5963
+ # # Create a request. To set request fields, pass in keyword arguments.
5964
+ # request = Google::Cloud::VMMigration::V1::RunDiskMigrationJobRequest.new
5965
+ #
5966
+ # # Call the run_disk_migration_job method.
5967
+ # result = client.run_disk_migration_job request
5968
+ #
5969
+ # # The returned object is of type Gapic::Operation. You can use it to
5970
+ # # check the status of an operation, cancel it, or wait for results.
5971
+ # # Here is how to wait for a response.
5972
+ # result.wait_until_done! timeout: 60
5973
+ # if result.response?
5974
+ # p result.response
5975
+ # else
5976
+ # puts "No response received."
5977
+ # end
5978
+ #
5979
+ def run_disk_migration_job request, options = nil
5980
+ raise ::ArgumentError, "request must be provided" if request.nil?
5981
+
5982
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VMMigration::V1::RunDiskMigrationJobRequest
5983
+
5984
+ # Converts hash and nil to an options object
5985
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5986
+
5987
+ # Customize the options with defaults
5988
+ call_metadata = @config.rpcs.run_disk_migration_job.metadata.to_h
5989
+
5990
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5991
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5992
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5993
+ gapic_version: ::Google::Cloud::VMMigration::V1::VERSION,
5994
+ transports_version_send: [:rest]
5995
+
5996
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5997
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5998
+
5999
+ options.apply_defaults timeout: @config.rpcs.run_disk_migration_job.timeout,
6000
+ metadata: call_metadata,
6001
+ retry_policy: @config.rpcs.run_disk_migration_job.retry_policy
6002
+
6003
+ options.apply_defaults timeout: @config.timeout,
6004
+ metadata: @config.metadata,
6005
+ retry_policy: @config.retry_policy
6006
+
6007
+ @vm_migration_stub.run_disk_migration_job request, options do |result, operation|
6008
+ result = ::Gapic::Operation.new result, @operations_client, options: options
6009
+ yield result, operation if block_given?
6010
+ throw :response, result
6011
+ end
6012
+ rescue ::Gapic::Rest::Error => e
6013
+ raise ::Google::Cloud::Error.from_error(e)
6014
+ end
6015
+
6016
+ ##
6017
+ # Cancels the disk migration job.
6018
+ #
6019
+ # @overload cancel_disk_migration_job(request, options = nil)
6020
+ # Pass arguments to `cancel_disk_migration_job` via a request object, either of type
6021
+ # {::Google::Cloud::VMMigration::V1::CancelDiskMigrationJobRequest} or an equivalent Hash.
6022
+ #
6023
+ # @param request [::Google::Cloud::VMMigration::V1::CancelDiskMigrationJobRequest, ::Hash]
6024
+ # A request object representing the call parameters. Required. To specify no
6025
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
6026
+ # @param options [::Gapic::CallOptions, ::Hash]
6027
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
6028
+ #
6029
+ # @overload cancel_disk_migration_job(name: nil)
6030
+ # Pass arguments to `cancel_disk_migration_job` via keyword arguments. Note that at
6031
+ # least one keyword argument is required. To specify no parameters, or to keep all
6032
+ # the default parameter values, pass an empty Hash as a request object (see above).
6033
+ #
6034
+ # @param name [::String]
6035
+ # Required. The name of the DiskMigrationJob.
6036
+ # @yield [result, operation] Access the result along with the TransportOperation object
6037
+ # @yieldparam result [::Gapic::Operation]
6038
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
6039
+ #
6040
+ # @return [::Gapic::Operation]
6041
+ #
6042
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
6043
+ #
6044
+ # @example Basic example
6045
+ # require "google/cloud/vm_migration/v1"
6046
+ #
6047
+ # # Create a client object. The client can be reused for multiple calls.
6048
+ # client = Google::Cloud::VMMigration::V1::VMMigration::Rest::Client.new
6049
+ #
6050
+ # # Create a request. To set request fields, pass in keyword arguments.
6051
+ # request = Google::Cloud::VMMigration::V1::CancelDiskMigrationJobRequest.new
6052
+ #
6053
+ # # Call the cancel_disk_migration_job method.
6054
+ # result = client.cancel_disk_migration_job request
6055
+ #
6056
+ # # The returned object is of type Gapic::Operation. You can use it to
6057
+ # # check the status of an operation, cancel it, or wait for results.
6058
+ # # Here is how to wait for a response.
6059
+ # result.wait_until_done! timeout: 60
6060
+ # if result.response?
6061
+ # p result.response
6062
+ # else
6063
+ # puts "No response received."
6064
+ # end
6065
+ #
6066
+ def cancel_disk_migration_job request, options = nil
6067
+ raise ::ArgumentError, "request must be provided" if request.nil?
6068
+
6069
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VMMigration::V1::CancelDiskMigrationJobRequest
6070
+
6071
+ # Converts hash and nil to an options object
6072
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
6073
+
6074
+ # Customize the options with defaults
6075
+ call_metadata = @config.rpcs.cancel_disk_migration_job.metadata.to_h
6076
+
6077
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
6078
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
6079
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
6080
+ gapic_version: ::Google::Cloud::VMMigration::V1::VERSION,
6081
+ transports_version_send: [:rest]
6082
+
6083
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
6084
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
6085
+
6086
+ options.apply_defaults timeout: @config.rpcs.cancel_disk_migration_job.timeout,
6087
+ metadata: call_metadata,
6088
+ retry_policy: @config.rpcs.cancel_disk_migration_job.retry_policy
6089
+
6090
+ options.apply_defaults timeout: @config.timeout,
6091
+ metadata: @config.metadata,
6092
+ retry_policy: @config.retry_policy
6093
+
6094
+ @vm_migration_stub.cancel_disk_migration_job request, options do |result, operation|
6095
+ result = ::Gapic::Operation.new result, @operations_client, options: options
6096
+ yield result, operation if block_given?
6097
+ throw :response, result
6098
+ end
6099
+ rescue ::Gapic::Rest::Error => e
6100
+ raise ::Google::Cloud::Error.from_error(e)
6101
+ end
6102
+
6103
+ ##
6104
+ # Configuration class for the VmMigration REST API.
6105
+ #
6106
+ # This class represents the configuration for VmMigration REST,
6107
+ # providing control over timeouts, retry behavior, logging, transport
6108
+ # parameters, and other low-level controls. Certain parameters can also be
6109
+ # applied individually to specific RPCs. See
6110
+ # {::Google::Cloud::VMMigration::V1::VMMigration::Rest::Client::Configuration::Rpcs}
6111
+ # for a list of RPCs that can be configured independently.
6112
+ #
6113
+ # Configuration can be applied globally to all clients, or to a single client
6114
+ # on construction.
6115
+ #
6116
+ # @example
6117
+ #
6118
+ # # Modify the global config, setting the timeout for
6119
+ # # list_sources to 20 seconds,
6120
+ # # and all remaining timeouts to 10 seconds.
6121
+ # ::Google::Cloud::VMMigration::V1::VMMigration::Rest::Client.configure do |config|
6122
+ # config.timeout = 10.0
6123
+ # config.rpcs.list_sources.timeout = 20.0
6124
+ # end
6125
+ #
6126
+ # # Apply the above configuration only to a new client.
6127
+ # client = ::Google::Cloud::VMMigration::V1::VMMigration::Rest::Client.new do |config|
6128
+ # config.timeout = 10.0
6129
+ # config.rpcs.list_sources.timeout = 20.0
6130
+ # end
6131
+ #
6132
+ # @!attribute [rw] endpoint
6133
+ # A custom service endpoint, as a hostname or hostname:port. The default is
6134
+ # nil, indicating to use the default endpoint in the current universe domain.
6135
+ # @return [::String,nil]
6136
+ # @!attribute [rw] credentials
6137
+ # Credentials to send with calls. You may provide any of the following types:
6138
+ # * (`String`) The path to a service account key file in JSON format
6139
+ # * (`Hash`) A service account key as a Hash
6140
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
6141
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
6142
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
6143
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
6144
+ # * (`nil`) indicating no credentials
6145
+ #
6146
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
6147
+ # external source for authentication to Google Cloud, you must validate it before
6148
+ # providing it to a Google API client library. Providing an unvalidated credential
6149
+ # configuration to Google APIs can compromise the security of your systems and data.
6150
+ # For more information, refer to [Validate credential configurations from external
6151
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
6152
+ # @return [::Object]
6153
+ # @!attribute [rw] scope
6154
+ # The OAuth scopes
6155
+ # @return [::Array<::String>]
6156
+ # @!attribute [rw] lib_name
6157
+ # The library name as recorded in instrumentation and logging
6158
+ # @return [::String]
6159
+ # @!attribute [rw] lib_version
6160
+ # The library version as recorded in instrumentation and logging
6161
+ # @return [::String]
6162
+ # @!attribute [rw] timeout
6163
+ # The call timeout in seconds.
4678
6164
  # @return [::Numeric]
4679
6165
  # @!attribute [rw] metadata
4680
6166
  # Additional headers to be sent with the call.
@@ -4798,6 +6284,11 @@ module Google
4798
6284
  #
4799
6285
  attr_reader :fetch_inventory
4800
6286
  ##
6287
+ # RPC-specific configuration for `fetch_storage_inventory`
6288
+ # @return [::Gapic::Config::Method]
6289
+ #
6290
+ attr_reader :fetch_storage_inventory
6291
+ ##
4801
6292
  # RPC-specific configuration for `list_utilization_reports`
4802
6293
  # @return [::Gapic::Config::Method]
4803
6294
  #
@@ -4888,6 +6379,11 @@ module Google
4888
6379
  #
4889
6380
  attr_reader :finalize_migration
4890
6381
  ##
6382
+ # RPC-specific configuration for `extend_migration`
6383
+ # @return [::Gapic::Config::Method]
6384
+ #
6385
+ attr_reader :extend_migration
6386
+ ##
4891
6387
  # RPC-specific configuration for `create_clone_job`
4892
6388
  # @return [::Gapic::Config::Method]
4893
6389
  #
@@ -4997,6 +6493,76 @@ module Google
4997
6493
  # @return [::Gapic::Config::Method]
4998
6494
  #
4999
6495
  attr_reader :get_replication_cycle
6496
+ ##
6497
+ # RPC-specific configuration for `list_image_imports`
6498
+ # @return [::Gapic::Config::Method]
6499
+ #
6500
+ attr_reader :list_image_imports
6501
+ ##
6502
+ # RPC-specific configuration for `get_image_import`
6503
+ # @return [::Gapic::Config::Method]
6504
+ #
6505
+ attr_reader :get_image_import
6506
+ ##
6507
+ # RPC-specific configuration for `create_image_import`
6508
+ # @return [::Gapic::Config::Method]
6509
+ #
6510
+ attr_reader :create_image_import
6511
+ ##
6512
+ # RPC-specific configuration for `delete_image_import`
6513
+ # @return [::Gapic::Config::Method]
6514
+ #
6515
+ attr_reader :delete_image_import
6516
+ ##
6517
+ # RPC-specific configuration for `list_image_import_jobs`
6518
+ # @return [::Gapic::Config::Method]
6519
+ #
6520
+ attr_reader :list_image_import_jobs
6521
+ ##
6522
+ # RPC-specific configuration for `get_image_import_job`
6523
+ # @return [::Gapic::Config::Method]
6524
+ #
6525
+ attr_reader :get_image_import_job
6526
+ ##
6527
+ # RPC-specific configuration for `cancel_image_import_job`
6528
+ # @return [::Gapic::Config::Method]
6529
+ #
6530
+ attr_reader :cancel_image_import_job
6531
+ ##
6532
+ # RPC-specific configuration for `create_disk_migration_job`
6533
+ # @return [::Gapic::Config::Method]
6534
+ #
6535
+ attr_reader :create_disk_migration_job
6536
+ ##
6537
+ # RPC-specific configuration for `list_disk_migration_jobs`
6538
+ # @return [::Gapic::Config::Method]
6539
+ #
6540
+ attr_reader :list_disk_migration_jobs
6541
+ ##
6542
+ # RPC-specific configuration for `get_disk_migration_job`
6543
+ # @return [::Gapic::Config::Method]
6544
+ #
6545
+ attr_reader :get_disk_migration_job
6546
+ ##
6547
+ # RPC-specific configuration for `update_disk_migration_job`
6548
+ # @return [::Gapic::Config::Method]
6549
+ #
6550
+ attr_reader :update_disk_migration_job
6551
+ ##
6552
+ # RPC-specific configuration for `delete_disk_migration_job`
6553
+ # @return [::Gapic::Config::Method]
6554
+ #
6555
+ attr_reader :delete_disk_migration_job
6556
+ ##
6557
+ # RPC-specific configuration for `run_disk_migration_job`
6558
+ # @return [::Gapic::Config::Method]
6559
+ #
6560
+ attr_reader :run_disk_migration_job
6561
+ ##
6562
+ # RPC-specific configuration for `cancel_disk_migration_job`
6563
+ # @return [::Gapic::Config::Method]
6564
+ #
6565
+ attr_reader :cancel_disk_migration_job
5000
6566
 
5001
6567
  # @private
5002
6568
  def initialize parent_rpcs = nil
@@ -5012,6 +6578,8 @@ module Google
5012
6578
  @delete_source = ::Gapic::Config::Method.new delete_source_config
5013
6579
  fetch_inventory_config = parent_rpcs.fetch_inventory if parent_rpcs.respond_to? :fetch_inventory
5014
6580
  @fetch_inventory = ::Gapic::Config::Method.new fetch_inventory_config
6581
+ fetch_storage_inventory_config = parent_rpcs.fetch_storage_inventory if parent_rpcs.respond_to? :fetch_storage_inventory
6582
+ @fetch_storage_inventory = ::Gapic::Config::Method.new fetch_storage_inventory_config
5015
6583
  list_utilization_reports_config = parent_rpcs.list_utilization_reports if parent_rpcs.respond_to? :list_utilization_reports
5016
6584
  @list_utilization_reports = ::Gapic::Config::Method.new list_utilization_reports_config
5017
6585
  get_utilization_report_config = parent_rpcs.get_utilization_report if parent_rpcs.respond_to? :get_utilization_report
@@ -5048,6 +6616,8 @@ module Google
5048
6616
  @pause_migration = ::Gapic::Config::Method.new pause_migration_config
5049
6617
  finalize_migration_config = parent_rpcs.finalize_migration if parent_rpcs.respond_to? :finalize_migration
5050
6618
  @finalize_migration = ::Gapic::Config::Method.new finalize_migration_config
6619
+ extend_migration_config = parent_rpcs.extend_migration if parent_rpcs.respond_to? :extend_migration
6620
+ @extend_migration = ::Gapic::Config::Method.new extend_migration_config
5051
6621
  create_clone_job_config = parent_rpcs.create_clone_job if parent_rpcs.respond_to? :create_clone_job
5052
6622
  @create_clone_job = ::Gapic::Config::Method.new create_clone_job_config
5053
6623
  cancel_clone_job_config = parent_rpcs.cancel_clone_job if parent_rpcs.respond_to? :cancel_clone_job
@@ -5092,6 +6662,34 @@ module Google
5092
6662
  @list_replication_cycles = ::Gapic::Config::Method.new list_replication_cycles_config
5093
6663
  get_replication_cycle_config = parent_rpcs.get_replication_cycle if parent_rpcs.respond_to? :get_replication_cycle
5094
6664
  @get_replication_cycle = ::Gapic::Config::Method.new get_replication_cycle_config
6665
+ list_image_imports_config = parent_rpcs.list_image_imports if parent_rpcs.respond_to? :list_image_imports
6666
+ @list_image_imports = ::Gapic::Config::Method.new list_image_imports_config
6667
+ get_image_import_config = parent_rpcs.get_image_import if parent_rpcs.respond_to? :get_image_import
6668
+ @get_image_import = ::Gapic::Config::Method.new get_image_import_config
6669
+ create_image_import_config = parent_rpcs.create_image_import if parent_rpcs.respond_to? :create_image_import
6670
+ @create_image_import = ::Gapic::Config::Method.new create_image_import_config
6671
+ delete_image_import_config = parent_rpcs.delete_image_import if parent_rpcs.respond_to? :delete_image_import
6672
+ @delete_image_import = ::Gapic::Config::Method.new delete_image_import_config
6673
+ list_image_import_jobs_config = parent_rpcs.list_image_import_jobs if parent_rpcs.respond_to? :list_image_import_jobs
6674
+ @list_image_import_jobs = ::Gapic::Config::Method.new list_image_import_jobs_config
6675
+ get_image_import_job_config = parent_rpcs.get_image_import_job if parent_rpcs.respond_to? :get_image_import_job
6676
+ @get_image_import_job = ::Gapic::Config::Method.new get_image_import_job_config
6677
+ cancel_image_import_job_config = parent_rpcs.cancel_image_import_job if parent_rpcs.respond_to? :cancel_image_import_job
6678
+ @cancel_image_import_job = ::Gapic::Config::Method.new cancel_image_import_job_config
6679
+ create_disk_migration_job_config = parent_rpcs.create_disk_migration_job if parent_rpcs.respond_to? :create_disk_migration_job
6680
+ @create_disk_migration_job = ::Gapic::Config::Method.new create_disk_migration_job_config
6681
+ list_disk_migration_jobs_config = parent_rpcs.list_disk_migration_jobs if parent_rpcs.respond_to? :list_disk_migration_jobs
6682
+ @list_disk_migration_jobs = ::Gapic::Config::Method.new list_disk_migration_jobs_config
6683
+ get_disk_migration_job_config = parent_rpcs.get_disk_migration_job if parent_rpcs.respond_to? :get_disk_migration_job
6684
+ @get_disk_migration_job = ::Gapic::Config::Method.new get_disk_migration_job_config
6685
+ update_disk_migration_job_config = parent_rpcs.update_disk_migration_job if parent_rpcs.respond_to? :update_disk_migration_job
6686
+ @update_disk_migration_job = ::Gapic::Config::Method.new update_disk_migration_job_config
6687
+ delete_disk_migration_job_config = parent_rpcs.delete_disk_migration_job if parent_rpcs.respond_to? :delete_disk_migration_job
6688
+ @delete_disk_migration_job = ::Gapic::Config::Method.new delete_disk_migration_job_config
6689
+ run_disk_migration_job_config = parent_rpcs.run_disk_migration_job if parent_rpcs.respond_to? :run_disk_migration_job
6690
+ @run_disk_migration_job = ::Gapic::Config::Method.new run_disk_migration_job_config
6691
+ cancel_disk_migration_job_config = parent_rpcs.cancel_disk_migration_job if parent_rpcs.respond_to? :cancel_disk_migration_job
6692
+ @cancel_disk_migration_job = ::Gapic::Config::Method.new cancel_disk_migration_job_config
5095
6693
 
5096
6694
  yield self if block_given?
5097
6695
  end