Class: Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client
- Inherits:
-
Object
- Object
- Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/migration_center/v1/migration_center/rest/client.rb
Overview
REST client for the MigrationCenter service.
Service describing handlers for resources.
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client
readonly
Get the associated client for mix-in of the Locations.
-
#operations_client ⇒ ::Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Operations
readonly
Get the associated client for long-running operations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the MigrationCenter Client class.
Instance Method Summary collapse
-
#add_assets_to_group(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Adds assets to a group.
-
#aggregate_assets_values(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::MigrationCenter::V1::AggregateAssetsValuesResponse
Aggregates the requested fields based on provided function.
-
#batch_delete_assets(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes list of Assets.
-
#batch_update_assets(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::MigrationCenter::V1::BatchUpdateAssetsResponse
Updates the parameters of a list of assets.
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the MigrationCenter Client instance.
-
#create_group(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a new group in a given project and location.
-
#create_import_data_file(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates an import data file.
-
#create_import_job(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates an import job.
-
#create_preference_set(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a new preference set in a given project and location.
-
#create_report(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a report.
-
#create_report_config(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a report configuration.
-
#create_source(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a new source in a given project and location.
-
#delete_asset(request, options = nil) {|result, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes an asset.
-
#delete_group(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes a group.
-
#delete_import_data_file(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Delete an import data file.
-
#delete_import_job(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes an import job.
-
#delete_preference_set(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes a preference set.
-
#delete_report(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes a Report.
-
#delete_report_config(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes a ReportConfig.
-
#delete_source(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes a source.
-
#get_asset(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::MigrationCenter::V1::Asset
Gets the details of an asset.
-
#get_error_frame(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::MigrationCenter::V1::ErrorFrame
Gets the details of an error frame.
-
#get_group(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::MigrationCenter::V1::Group
Gets the details of a group.
-
#get_import_data_file(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::MigrationCenter::V1::ImportDataFile
Gets an import data file.
-
#get_import_job(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::MigrationCenter::V1::ImportJob
Gets the details of an import job.
-
#get_preference_set(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::MigrationCenter::V1::PreferenceSet
Gets the details of a preference set.
-
#get_report(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::MigrationCenter::V1::Report
Gets details of a single Report.
-
#get_report_config(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::MigrationCenter::V1::ReportConfig
Gets details of a single ReportConfig.
-
#get_settings(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::MigrationCenter::V1::Settings
Gets the details of regional settings.
-
#get_source(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::MigrationCenter::V1::Source
Gets the details of a source.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new MigrationCenter REST client object.
-
#list_assets(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::Asset>
Lists all the assets in a given project and location.
-
#list_error_frames(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::ErrorFrame>
Lists all error frames in a given source and location.
-
#list_groups(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::Group>
Lists all groups in a given project and location.
-
#list_import_data_files(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::ImportDataFile>
List import data files.
-
#list_import_jobs(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::ImportJob>
Lists all import jobs.
-
#list_preference_sets(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::PreferenceSet>
Lists all the preference sets in a given project and location.
-
#list_report_configs(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::ReportConfig>
Lists ReportConfigs in a given project and location.
-
#list_reports(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::Report>
Lists Reports in a given ReportConfig.
-
#list_sources(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::Source>
Lists all the sources in a given project and location.
-
#logger ⇒ Logger
The logger used for request/response debug logging.
-
#remove_assets_from_group(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Removes assets from a group.
-
#report_asset_frames(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::MigrationCenter::V1::ReportAssetFramesResponse
Reports a set of frames.
-
#run_import_job(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Runs an import job.
-
#universe_domain ⇒ String
The effective universe domain.
-
#update_asset(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::MigrationCenter::V1::Asset
Updates the parameters of an asset.
-
#update_group(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Updates the parameters of a group.
-
#update_import_job(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Updates an import job.
-
#update_preference_set(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Updates the parameters of a preference set.
-
#update_settings(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Updates the regional-level project settings.
-
#update_source(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Updates the parameters of a source.
-
#validate_import_job(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Validates an import job.
Methods included from Paths
#asset_path, #error_frame_path, #group_path, #import_data_file_path, #import_job_path, #location_path, #preference_set_path, #report_config_path, #report_path, #settings_path, #source_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new MigrationCenter REST client object.
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 131 def initialize # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint.nil? || (@config.endpoint == Configuration::DEFAULT_ENDPOINT && !@config.endpoint.split(".").first.include?("-")) credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @operations_client = ::Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Operations.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config.endpoint config.universe_domain = @config.universe_domain end @migration_center_stub = ::Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::ServiceStub.new( endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, credentials: credentials, logger: @config.logger ) @migration_center_stub.logger(stub: true)&.info do |entry| entry.set_system_name entry.set_service entry. = "Created client for #{entry.service}" entry.set_credentials_fields credentials entry.set "customEndpoint", @config.endpoint if @config.endpoint entry.set "defaultTimeout", @config.timeout if @config.timeout entry.set "quotaProject", @quota_project_id if @quota_project_id end @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @migration_center_stub.endpoint config.universe_domain = @migration_center_stub.universe_domain config.bindings_override = @config.bindings_override config.logger = @migration_center_stub.logger if config.respond_to? :logger= end end |
Instance Attribute Details
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client (readonly)
Get the associated client for mix-in of the Locations.
201 202 203 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 201 def location_client @location_client end |
#operations_client ⇒ ::Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Operations (readonly)
Get the associated client for long-running operations.
194 195 196 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 194 def operations_client @operations_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the MigrationCenter Client class.
See Configuration for a description of the configuration fields.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 65 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "MigrationCenter", "V1"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config.timeout = 60.0 default_config.rpcs.delete_source.timeout = 600.0 default_config end yield @configure if block_given? @configure end |
Instance Method Details
#add_assets_to_group(request, options = nil) ⇒ ::Gapic::Operation #add_assets_to_group(group: nil, request_id: nil, assets: nil, allow_existing: nil) ⇒ ::Gapic::Operation
Adds assets to a group.
2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 2555 def add_assets_to_group request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::AddAssetsToGroupRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.add_assets_to_group..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.add_assets_to_group.timeout, metadata: , retry_policy: @config.rpcs.add_assets_to_group.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.add_assets_to_group request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#aggregate_assets_values(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::AggregateAssetsValuesResponse #aggregate_assets_values(parent: nil, aggregations: nil, filter: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::AggregateAssetsValuesResponse
Aggregates the requested fields based on provided function.
877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 877 def aggregate_assets_values request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::AggregateAssetsValuesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.aggregate_assets_values..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.aggregate_assets_values.timeout, metadata: , retry_policy: @config.rpcs.aggregate_assets_values.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.aggregate_assets_values request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#batch_delete_assets(request, options = nil) ⇒ ::Google::Protobuf::Empty #batch_delete_assets(parent: nil, names: nil, allow_missing: nil) ⇒ ::Google::Protobuf::Empty
Deletes list of Assets.
712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 712 def batch_delete_assets request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::BatchDeleteAssetsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.batch_delete_assets..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.batch_delete_assets.timeout, metadata: , retry_policy: @config.rpcs.batch_delete_assets.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.batch_delete_assets request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#batch_update_assets(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::BatchUpdateAssetsResponse #batch_update_assets(parent: nil, requests: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::BatchUpdateAssetsResponse
Updates the parameters of a list of assets.
534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 534 def batch_update_assets request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::BatchUpdateAssetsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.batch_update_assets..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.batch_update_assets.timeout, metadata: , retry_policy: @config.rpcs.batch_update_assets.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.batch_update_assets request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#configure {|config| ... } ⇒ Client::Configuration
Configure the MigrationCenter Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.
See Configuration for a description of the configuration fields.
101 102 103 104 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 101 def configure yield @config if block_given? @config end |
#create_group(request, options = nil) ⇒ ::Gapic::Operation #create_group(parent: nil, group_id: nil, group: nil, request_id: nil) ⇒ ::Gapic::Operation
Creates a new group in a given project and location.
2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 2235 def create_group request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::CreateGroupRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_group..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_group.timeout, metadata: , retry_policy: @config.rpcs.create_group.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.create_group request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_import_data_file(request, options = nil) ⇒ ::Gapic::Operation #create_import_data_file(parent: nil, import_data_file_id: nil, import_data_file: nil, request_id: nil) ⇒ ::Gapic::Operation
Creates an import data file.
1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 1854 def create_import_data_file request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::CreateImportDataFileRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_import_data_file..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_import_data_file.timeout, metadata: , retry_policy: @config.rpcs.create_import_data_file.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.create_import_data_file request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_import_job(request, options = nil) ⇒ ::Gapic::Operation #create_import_job(parent: nil, import_job_id: nil, import_job: nil, request_id: nil) ⇒ ::Gapic::Operation
Creates an import job.
980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 980 def create_import_job request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::CreateImportJobRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_import_job..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_import_job.timeout, metadata: , retry_policy: @config.rpcs.create_import_job.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.create_import_job request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_preference_set(request, options = nil) ⇒ ::Gapic::Operation #create_preference_set(parent: nil, preference_set_id: nil, preference_set: nil, request_id: nil) ⇒ ::Gapic::Operation
Creates a new preference set in a given project and location.
3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 3610 def create_preference_set request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::CreatePreferenceSetRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_preference_set..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_preference_set.timeout, metadata: , retry_policy: @config.rpcs.create_preference_set.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.create_preference_set request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_report(request, options = nil) ⇒ ::Gapic::Operation #create_report(parent: nil, report_id: nil, report: nil, request_id: nil) ⇒ ::Gapic::Operation
Creates a report.
4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 4499 def create_report request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::CreateReportRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_report..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_report.timeout, metadata: , retry_policy: @config.rpcs.create_report.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.create_report request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_report_config(request, options = nil) ⇒ ::Gapic::Operation #create_report_config(parent: nil, report_config_id: nil, report_config: nil, request_id: nil) ⇒ ::Gapic::Operation
Creates a report configuration.
4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 4114 def create_report_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::CreateReportConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_report_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_report_config.timeout, metadata: , retry_policy: @config.rpcs.create_report_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.create_report_config request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_source(request, options = nil) ⇒ ::Gapic::Operation #create_source(parent: nil, source_id: nil, source: nil, request_id: nil) ⇒ ::Gapic::Operation
Creates a new source in a given project and location.
3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 3121 def create_source request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::CreateSourceRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_source..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_source.timeout, metadata: , retry_policy: @config.rpcs.create_source.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.create_source request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_asset(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_asset(name: nil, request_id: nil) ⇒ ::Google::Protobuf::Empty
Deletes an asset.
626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 626 def delete_asset request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::DeleteAssetRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_asset..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_asset.timeout, metadata: , retry_policy: @config.rpcs.delete_asset.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.delete_asset request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_group(request, options = nil) ⇒ ::Gapic::Operation #delete_group(name: nil, request_id: nil) ⇒ ::Gapic::Operation
Deletes a group.
2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 2443 def delete_group request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::DeleteGroupRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_group..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_group.timeout, metadata: , retry_policy: @config.rpcs.delete_group.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.delete_group request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_import_data_file(request, options = nil) ⇒ ::Gapic::Operation #delete_import_data_file(name: nil, request_id: nil) ⇒ ::Gapic::Operation
Delete an import data file.
1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 1955 def delete_import_data_file request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::DeleteImportDataFileRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_import_data_file..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_import_data_file.timeout, metadata: , retry_policy: @config.rpcs.delete_import_data_file.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.delete_import_data_file request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_import_job(request, options = nil) ⇒ ::Gapic::Operation #delete_import_job(name: nil, request_id: nil, force: nil) ⇒ ::Gapic::Operation
Deletes an import job.
1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 1262 def delete_import_job request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::DeleteImportJobRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_import_job..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_import_job.timeout, metadata: , retry_policy: @config.rpcs.delete_import_job.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.delete_import_job request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_preference_set(request, options = nil) ⇒ ::Gapic::Operation #delete_preference_set(name: nil, request_id: nil) ⇒ ::Gapic::Operation
Deletes a preference set.
3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 3819 def delete_preference_set request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::DeletePreferenceSetRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_preference_set..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_preference_set.timeout, metadata: , retry_policy: @config.rpcs.delete_preference_set.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.delete_preference_set request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_report(request, options = nil) ⇒ ::Gapic::Operation #delete_report(name: nil, request_id: nil) ⇒ ::Gapic::Operation
Deletes a Report.
4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 4775 def delete_report request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::DeleteReportRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_report..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_report.timeout, metadata: , retry_policy: @config.rpcs.delete_report.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.delete_report request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_report_config(request, options = nil) ⇒ ::Gapic::Operation #delete_report_config(name: nil, request_id: nil, force: nil) ⇒ ::Gapic::Operation
Deletes a ReportConfig.
4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 4390 def delete_report_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::DeleteReportConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_report_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_report_config.timeout, metadata: , retry_policy: @config.rpcs.delete_report_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.delete_report_config request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_source(request, options = nil) ⇒ ::Gapic::Operation #delete_source(name: nil, request_id: nil) ⇒ ::Gapic::Operation
Deletes a source.
3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 3330 def delete_source request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::DeleteSourceRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_source..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_source.timeout, metadata: , retry_policy: @config.rpcs.delete_source.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.delete_source request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_asset(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::Asset #get_asset(name: nil, view: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::Asset
Gets the details of an asset.
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 354 def get_asset request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::GetAssetRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_asset..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_asset.timeout, metadata: , retry_policy: @config.rpcs.get_asset.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.get_asset request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_error_frame(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::ErrorFrame #get_error_frame(name: nil, view: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::ErrorFrame
Gets the details of an error frame.
2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 2843 def get_error_frame request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::GetErrorFrameRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_error_frame..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_error_frame.timeout, metadata: , retry_policy: @config.rpcs.get_error_frame.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.get_error_frame request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_group(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::Group #get_group(name: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::Group
Gets the details of a group.
2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 2128 def get_group request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::GetGroupRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_group..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_group.timeout, metadata: , retry_policy: @config.rpcs.get_group.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.get_group request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_import_data_file(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::ImportDataFile #get_import_data_file(name: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::ImportDataFile
Gets an import data file.
1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 1652 def get_import_data_file request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::GetImportDataFileRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_import_data_file..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_import_data_file.timeout, metadata: , retry_policy: @config.rpcs.get_import_data_file.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.get_import_data_file request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_import_job(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::ImportJob #get_import_job(name: nil, view: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::ImportJob
Gets the details of an import job.
1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 1159 def get_import_job request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::GetImportJobRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_import_job..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_import_job.timeout, metadata: , retry_policy: @config.rpcs.get_import_job.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.get_import_job request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_preference_set(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::PreferenceSet #get_preference_set(name: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::PreferenceSet
Gets the details of a preference set.
3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 3502 def get_preference_set request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::GetPreferenceSetRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_preference_set..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_preference_set.timeout, metadata: , retry_policy: @config.rpcs.get_preference_set.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.get_preference_set request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_report(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::Report #get_report(name: nil, view: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::Report
Gets details of a single Report.
4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 4581 def get_report request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::GetReportRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_report..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_report.timeout, metadata: , retry_policy: @config.rpcs.get_report.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.get_report request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_report_config(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::ReportConfig #get_report_config(name: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::ReportConfig
Gets details of a single ReportConfig.
4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 4194 def get_report_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::GetReportConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_report_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_report_config.timeout, metadata: , retry_policy: @config.rpcs.get_report_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.get_report_config request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_settings(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::Settings #get_settings(name: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::Settings
Gets the details of regional settings.
3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 3899 def get_settings request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::GetSettingsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_settings..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_settings.timeout, metadata: , retry_policy: @config.rpcs.get_settings.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.get_settings request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_source(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::Source #get_source(name: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::Source
Gets the details of a source.
3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 3014 def get_source request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::GetSourceRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_source..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_source.timeout, metadata: , retry_policy: @config.rpcs.get_source.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.get_source request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_assets(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::Asset> #list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::Asset>
Lists all the assets in a given project and location.
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 272 def list_assets request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::ListAssetsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_assets..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_assets.timeout, metadata: , retry_policy: @config.rpcs.list_assets.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.list_assets request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @migration_center_stub, :list_assets, "assets", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_error_frames(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::ErrorFrame> #list_error_frames(parent: nil, page_size: nil, page_token: nil, view: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::ErrorFrame>
Lists all error frames in a given source and location.
2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 2758 def list_error_frames request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::ListErrorFramesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_error_frames..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_error_frames.timeout, metadata: , retry_policy: @config.rpcs.list_error_frames.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.list_error_frames request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @migration_center_stub, :list_error_frames, "error_frames", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_groups(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::Group> #list_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::Group>
Lists all groups in a given project and location.
2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 2048 def list_groups request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::ListGroupsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_groups..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_groups.timeout, metadata: , retry_policy: @config.rpcs.list_groups.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.list_groups request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @migration_center_stub, :list_groups, "groups", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_import_data_files(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::ImportDataFile> #list_import_data_files(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::ImportDataFile>
List import data files.
1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 1749 def list_import_data_files request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::ListImportDataFilesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_import_data_files..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_import_data_files.timeout, metadata: , retry_policy: @config.rpcs.list_import_data_files.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.list_import_data_files request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @migration_center_stub, :list_import_data_files, "import_data_files", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_import_jobs(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::ImportJob> #list_import_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::ImportJob>
Lists all import jobs.
1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 1076 def list_import_jobs request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::ListImportJobsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_import_jobs..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_import_jobs.timeout, metadata: , retry_policy: @config.rpcs.list_import_jobs.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.list_import_jobs request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @migration_center_stub, :list_import_jobs, "import_jobs", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_preference_sets(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::PreferenceSet> #list_preference_sets(parent: nil, page_size: nil, page_token: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::PreferenceSet>
Lists all the preference sets in a given project and location.
3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 3422 def list_preference_sets request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::ListPreferenceSetsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_preference_sets..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_preference_sets.timeout, metadata: , retry_policy: @config.rpcs.list_preference_sets.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.list_preference_sets request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @migration_center_stub, :list_preference_sets, "preference_sets", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_report_configs(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::ReportConfig> #list_report_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::ReportConfig>
Lists ReportConfigs in a given project and location.
4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 4285 def list_report_configs request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::ListReportConfigsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_report_configs..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_report_configs.timeout, metadata: , retry_policy: @config.rpcs.list_report_configs.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.list_report_configs request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @migration_center_stub, :list_report_configs, "report_configs", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_reports(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::Report> #list_reports(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::Report>
Lists Reports in a given ReportConfig.
4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 4674 def list_reports request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::ListReportsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_reports..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_reports.timeout, metadata: , retry_policy: @config.rpcs.list_reports.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.list_reports request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @migration_center_stub, :list_reports, "reports", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_sources(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::Source> #list_sources(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::Source>
Lists all the sources in a given project and location.
2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 2934 def list_sources request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::ListSourcesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_sources..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_sources.timeout, metadata: , retry_policy: @config.rpcs.list_sources.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.list_sources request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @migration_center_stub, :list_sources, "sources", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#logger ⇒ Logger
The logger used for request/response debug logging.
208 209 210 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 208 def logger @migration_center_stub.logger end |
#remove_assets_from_group(request, options = nil) ⇒ ::Gapic::Operation #remove_assets_from_group(group: nil, request_id: nil, assets: nil, allow_missing: nil) ⇒ ::Gapic::Operation
Removes assets from a group.
2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 2666 def remove_assets_from_group request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::RemoveAssetsFromGroupRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.remove_assets_from_group..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.remove_assets_from_group.timeout, metadata: , retry_policy: @config.rpcs.remove_assets_from_group.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.remove_assets_from_group request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#report_asset_frames(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::ReportAssetFramesResponse #report_asset_frames(parent: nil, frames: nil, source: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::ReportAssetFramesResponse
Reports a set of frames.
794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 794 def report_asset_frames request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::ReportAssetFramesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.report_asset_frames..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.report_asset_frames.timeout, metadata: , retry_policy: @config.rpcs.report_asset_frames.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.report_asset_frames request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#run_import_job(request, options = nil) ⇒ ::Gapic::Operation #run_import_job(name: nil, request_id: nil) ⇒ ::Gapic::Operation
Runs an import job.
1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 1572 def run_import_job request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::RunImportJobRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.run_import_job..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.run_import_job.timeout, metadata: , retry_policy: @config.rpcs.run_import_job.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.run_import_job request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#universe_domain ⇒ String
The effective universe domain
111 112 113 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 111 def universe_domain @migration_center_stub.universe_domain end |
#update_asset(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::Asset #update_asset(update_mask: nil, asset: nil, request_id: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::Asset
Updates the parameters of an asset.
453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 453 def update_asset request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::UpdateAssetRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_asset..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_asset.timeout, metadata: , retry_policy: @config.rpcs.update_asset.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.update_asset request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_group(request, options = nil) ⇒ ::Gapic::Operation #update_group(update_mask: nil, group: nil, request_id: nil) ⇒ ::Gapic::Operation
Updates the parameters of a group.
2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 2342 def update_group request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::UpdateGroupRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_group..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_group.timeout, metadata: , retry_policy: @config.rpcs.update_group.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.update_group request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_import_job(request, options = nil) ⇒ ::Gapic::Operation #update_import_job(update_mask: nil, import_job: nil, request_id: nil) ⇒ ::Gapic::Operation
Updates an import job.
1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 1370 def update_import_job request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::UpdateImportJobRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_import_job..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_import_job.timeout, metadata: , retry_policy: @config.rpcs.update_import_job.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.update_import_job request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_preference_set(request, options = nil) ⇒ ::Gapic::Operation #update_preference_set(update_mask: nil, preference_set: nil, request_id: nil) ⇒ ::Gapic::Operation
Updates the parameters of a preference set.
3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 3718 def update_preference_set request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::UpdatePreferenceSetRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_preference_set..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_preference_set.timeout, metadata: , retry_policy: @config.rpcs.update_preference_set.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.update_preference_set request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_settings(request, options = nil) ⇒ ::Gapic::Operation #update_settings(update_mask: nil, settings: nil, request_id: nil) ⇒ ::Gapic::Operation
Updates the regional-level project settings.
4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 4005 def update_settings request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::UpdateSettingsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_settings..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_settings.timeout, metadata: , retry_policy: @config.rpcs.update_settings.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.update_settings request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#update_source(request, options = nil) ⇒ ::Gapic::Operation #update_source(update_mask: nil, source: nil, request_id: nil) ⇒ ::Gapic::Operation
Updates the parameters of a source.
3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 3229 def update_source request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::UpdateSourceRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_source..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_source.timeout, metadata: , retry_policy: @config.rpcs.update_source.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.update_source request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#validate_import_job(request, options = nil) ⇒ ::Gapic::Operation #validate_import_job(name: nil, request_id: nil) ⇒ ::Gapic::Operation
Validates an import job.
1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 |
# File 'lib/google/cloud/migration_center/v1/migration_center/rest/client.rb', line 1471 def validate_import_job request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::MigrationCenter::V1::ValidateImportJobRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.validate_import_job..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::MigrationCenter::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.validate_import_job.timeout, metadata: , retry_policy: @config.rpcs.validate_import_job.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @migration_center_stub.validate_import_job request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |