Class: Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client

Inherits:
Object
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

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.

Examples:


# Create a client using the default configuration
client = ::Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the MigrationCenter client.

Yield Parameters:



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.message = "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_clientGoogle::Cloud::Location::Locations::Rest::Client (readonly)

Get the associated client for mix-in of the Locations.

Returns:

  • (Google::Cloud::Location::Locations::Rest::Client)


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.

Examples:


# Modify the configuration for all MigrationCenter clients
::Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::AddAssetsToGroupRequest.new

# Call the add_assets_to_group method.
result = client.add_assets_to_group request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #add_assets_to_group(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to add_assets_to_group via a request object, either of type AddAssetsToGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::AddAssetsToGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #add_assets_to_group(group: nil, request_id: nil, assets: nil, allow_existing: nil) ⇒ ::Gapic::Operation

    Pass arguments to add_assets_to_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • group (::String) (defaults to: nil)

      Required. Group reference.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

    • assets (::Google::Cloud::MigrationCenter::V1::AssetList, ::Hash) (defaults to: nil)

      Required. List of assets to be added. The maximum number of assets that can be added in a single request is 1000.

    • allow_existing (::Boolean) (defaults to: nil)

      Optional. When this value is set to false and one of the given assets is already an existing member of the group, the operation fails with an Already Exists error. When set to true this situation is silently ignored by the server.

      Default value is false.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.add_assets_to_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.add_assets_to_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.add_assets_to_group request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::AggregateAssetsValuesRequest.new

# Call the aggregate_assets_values method.
result = client.aggregate_assets_values request

# The returned object is of type Google::Cloud::MigrationCenter::V1::AggregateAssetsValuesResponse.
p result

Overloads:

  • #aggregate_assets_values(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::AggregateAssetsValuesResponse

    Pass arguments to aggregate_assets_values via a request object, either of type AggregateAssetsValuesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::AggregateAssetsValuesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #aggregate_assets_values(parent: nil, aggregations: nil, filter: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::AggregateAssetsValuesResponse

    Pass arguments to aggregate_assets_values via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent value for AggregateAssetsValuesRequest.

    • aggregations (::Array<::Google::Cloud::MigrationCenter::V1::Aggregation, ::Hash>) (defaults to: nil)

      Array of aggregations to perform. Up to 25 aggregations can be defined.

    • filter (::String) (defaults to: nil)

      The aggregation will be performed on assets that match the provided filter.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.aggregate_assets_values.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.aggregate_assets_values.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.aggregate_assets_values request, options 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::BatchDeleteAssetsRequest.new

# Call the batch_delete_assets method.
result = client.batch_delete_assets request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #batch_delete_assets(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to batch_delete_assets via a request object, either of type BatchDeleteAssetsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::BatchDeleteAssetsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #batch_delete_assets(parent: nil, names: nil, allow_missing: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to batch_delete_assets via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent value for batch asset delete.

    • names (::Array<::String>) (defaults to: nil)

      Required. The IDs of the assets to delete. A maximum of 1000 assets can be deleted in a batch. Format: projects/{project}/locations/{location}/assets/{name}.

    • allow_missing (::Boolean) (defaults to: nil)

      Optional. When this value is set to true the request is a no-op for non-existing assets. See https://google.aip.dev/135#delete-if-existing for additional details. Default value is false.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.batch_delete_assets.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.batch_delete_assets.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.batch_delete_assets request, options 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::BatchUpdateAssetsRequest.new

# Call the batch_update_assets method.
result = client.batch_update_assets request

# The returned object is of type Google::Cloud::MigrationCenter::V1::BatchUpdateAssetsResponse.
p result

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.batch_update_assets.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.batch_update_assets.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.batch_update_assets request, options 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.

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::CreateGroupRequest.new

# Call the create_group method.
result = client.create_group request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_group(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_group via a request object, either of type CreateGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::CreateGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_group(parent: nil, group_id: nil, group: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Value for parent.

    • group_id (::String) (defaults to: nil)

      Required. User specified ID for the group. It will become the last component of the group name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.

    • group (::Google::Cloud::MigrationCenter::V1::Group, ::Hash) (defaults to: nil)

      Required. The group resource being created.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.create_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.create_group request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::CreateImportDataFileRequest.new

# Call the create_import_data_file method.
result = client.create_import_data_file request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_import_data_file(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_import_data_file via a request object, either of type CreateImportDataFileRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::CreateImportDataFileRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_import_data_file(parent: nil, import_data_file_id: nil, import_data_file: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_import_data_file via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Name of the parent of the ImportDataFile.

    • import_data_file_id (::String) (defaults to: nil)

      Required. The ID of the new data file.

    • import_data_file (::Google::Cloud::MigrationCenter::V1::ImportDataFile, ::Hash) (defaults to: nil)

      Required. The resource being created.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.create_import_data_file.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_import_data_file.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.create_import_data_file request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::CreateImportJobRequest.new

# Call the create_import_job method.
result = client.create_import_job request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_import_job(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_import_job via a request object, either of type CreateImportJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::CreateImportJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_import_job(parent: nil, import_job_id: nil, import_job: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_import_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Value for parent.

    • import_job_id (::String) (defaults to: nil)

      Required. ID of the import job.

    • import_job (::Google::Cloud::MigrationCenter::V1::ImportJob, ::Hash) (defaults to: nil)

      Required. The resource being created.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.create_import_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_import_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.create_import_job request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::CreatePreferenceSetRequest.new

# Call the create_preference_set method.
result = client.create_preference_set request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_preference_set(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_preference_set via a request object, either of type CreatePreferenceSetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::CreatePreferenceSetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_preference_set(parent: nil, preference_set_id: nil, preference_set: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_preference_set via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Value for parent.

    • preference_set_id (::String) (defaults to: nil)

      Required. User specified ID for the preference set. It will become the last component of the preference set name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression [a-z]([a-z0-9-]{0,61}[a-z0-9])?.

    • preference_set (::Google::Cloud::MigrationCenter::V1::PreferenceSet, ::Hash) (defaults to: nil)

      Required. The preference set resource being created.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.create_preference_set.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_preference_set.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.create_preference_set request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::CreateReportRequest.new

# Call the create_report method.
result = client.create_report request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_report(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_report via a request object, either of type CreateReportRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::CreateReportRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_report(parent: nil, report_id: nil, report: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_report via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Value for parent.

    • report_id (::String) (defaults to: nil)

      Required. User specified id for the report. It will become the last component of the report name. The id must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The id must match the regular expression: a-z?.

    • report (::Google::Cloud::MigrationCenter::V1::Report, ::Hash) (defaults to: nil)

      Required. The report resource being created.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.create_report.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_report.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.create_report request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::CreateReportConfigRequest.new

# Call the create_report_config method.
result = client.create_report_config request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_report_config(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_report_config via a request object, either of type CreateReportConfigRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::CreateReportConfigRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_report_config(parent: nil, report_config_id: nil, report_config: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_report_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Value for parent.

    • report_config_id (::String) (defaults to: nil)

      Required. User specified ID for the report config. It will become the last component of the report config name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: a-z?.

    • report_config (::Google::Cloud::MigrationCenter::V1::ReportConfig, ::Hash) (defaults to: nil)

      Required. The report config set resource being created.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.create_report_config.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_report_config.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.create_report_config request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::CreateSourceRequest.new

# Call the create_source method.
result = client.create_source request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_source(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_source via a request object, either of type CreateSourceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::CreateSourceRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_source(parent: nil, source_id: nil, source: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_source via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Value for parent.

    • source_id (::String) (defaults to: nil)

      Required. User specified ID for the source. It will become the last component of the source name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.

    • source (::Google::Cloud::MigrationCenter::V1::Source, ::Hash) (defaults to: nil)

      Required. The resource being created.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.create_source.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_source.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.create_source request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::DeleteAssetRequest.new

# Call the delete_asset method.
result = client.delete_asset request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_asset(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_asset via a request object, either of type DeleteAssetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::DeleteAssetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_asset(name: nil, request_id: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_asset via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the resource.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.delete_asset.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_asset.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.delete_asset request, options 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::DeleteGroupRequest.new

# Call the delete_group method.
result = client.delete_group request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_group(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_group via a request object, either of type DeleteGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::DeleteGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_group(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the group resource.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.delete_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.delete_group request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::DeleteImportDataFileRequest.new

# Call the delete_import_data_file method.
result = client.delete_import_data_file request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_import_data_file(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_import_data_file via a request object, either of type DeleteImportDataFileRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::DeleteImportDataFileRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_import_data_file(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_import_data_file via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the ImportDataFile to delete.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.delete_import_data_file.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_import_data_file.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.delete_import_data_file request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::DeleteImportJobRequest.new

# Call the delete_import_job method.
result = client.delete_import_job request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_import_job(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_import_job via a request object, either of type DeleteImportJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::DeleteImportJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_import_job(name: nil, request_id: nil, force: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_import_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the resource.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

    • force (::Boolean) (defaults to: nil)

      Optional. If set to true, any ImportDataFiles of this job will also be deleted If set to false, the request only works if the job has no data files.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.delete_import_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_import_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.delete_import_job request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::DeletePreferenceSetRequest.new

# Call the delete_preference_set method.
result = client.delete_preference_set request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_preference_set(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_preference_set via a request object, either of type DeletePreferenceSetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::DeletePreferenceSetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_preference_set(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_preference_set via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the group resource.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.delete_preference_set.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_preference_set.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.delete_preference_set request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::DeleteReportRequest.new

# Call the delete_report method.
result = client.delete_report request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_report(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_report via a request object, either of type DeleteReportRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::DeleteReportRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_report(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_report via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the resource.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.delete_report.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_report.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.delete_report request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::DeleteReportConfigRequest.new

# Call the delete_report_config method.
result = client.delete_report_config request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_report_config(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_report_config via a request object, either of type DeleteReportConfigRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::DeleteReportConfigRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_report_config(name: nil, request_id: nil, force: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_report_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the resource.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

    • force (::Boolean) (defaults to: nil)

      Optional. If set to true, any child Reports of this entity will also be deleted. If set to false, the request only works if the resource has no children.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.delete_report_config.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_report_config.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.delete_report_config request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::DeleteSourceRequest.new

# Call the delete_source method.
result = client.delete_source request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_source(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_source via a request object, either of type DeleteSourceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::DeleteSourceRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_source(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_source via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the resource.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.delete_source.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_source.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.delete_source request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::GetAssetRequest.new

# Call the get_asset method.
result = client.get_asset request

# The returned object is of type Google::Cloud::MigrationCenter::V1::Asset.
p result

Overloads:

  • #get_asset(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::Asset

    Pass arguments to get_asset via a request object, either of type GetAssetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::GetAssetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_asset(name: nil, view: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::Asset

    Pass arguments to get_asset via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.get_asset.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_asset.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.get_asset request, options 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::GetErrorFrameRequest.new

# Call the get_error_frame method.
result = client.get_error_frame request

# The returned object is of type Google::Cloud::MigrationCenter::V1::ErrorFrame.
p result

Overloads:

  • #get_error_frame(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::ErrorFrame

    Pass arguments to get_error_frame via a request object, either of type GetErrorFrameRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::GetErrorFrameRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_error_frame(name: nil, view: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::ErrorFrame

    Pass arguments to get_error_frame via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the frame to retrieve. Format: projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame}

    • view (::Google::Cloud::MigrationCenter::V1::ErrorFrameView) (defaults to: nil)

      Optional. An optional view mode to control the level of details for the frame. The default is a basic frame view.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.get_error_frame.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_error_frame.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.get_error_frame request, options 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::GetGroupRequest.new

# Call the get_group method.
result = client.get_group request

# The returned object is of type Google::Cloud::MigrationCenter::V1::Group.
p result

Overloads:

  • #get_group(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::Group

    Pass arguments to get_group via a request object, either of type GetGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::GetGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_group(name: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::Group

    Pass arguments to get_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the resource.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.get_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.get_group request, options 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::GetImportDataFileRequest.new

# Call the get_import_data_file method.
result = client.get_import_data_file request

# The returned object is of type Google::Cloud::MigrationCenter::V1::ImportDataFile.
p result

Overloads:

  • #get_import_data_file(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::ImportDataFile

    Pass arguments to get_import_data_file via a request object, either of type GetImportDataFileRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::GetImportDataFileRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_import_data_file(name: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::ImportDataFile

    Pass arguments to get_import_data_file via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the ImportDataFile.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.get_import_data_file.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_import_data_file.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.get_import_data_file request, options 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::GetImportJobRequest.new

# Call the get_import_job method.
result = client.get_import_job request

# The returned object is of type Google::Cloud::MigrationCenter::V1::ImportJob.
p result

Overloads:

  • #get_import_job(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::ImportJob

    Pass arguments to get_import_job via a request object, either of type GetImportJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::GetImportJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_import_job(name: nil, view: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::ImportJob

    Pass arguments to get_import_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.get_import_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_import_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.get_import_job request, options 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::GetPreferenceSetRequest.new

# Call the get_preference_set method.
result = client.get_preference_set request

# The returned object is of type Google::Cloud::MigrationCenter::V1::PreferenceSet.
p result

Overloads:

  • #get_preference_set(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::PreferenceSet

    Pass arguments to get_preference_set via a request object, either of type GetPreferenceSetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::GetPreferenceSetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_preference_set(name: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::PreferenceSet

    Pass arguments to get_preference_set via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the resource.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.get_preference_set.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_preference_set.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.get_preference_set request, options 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::GetReportRequest.new

# Call the get_report method.
result = client.get_report request

# The returned object is of type Google::Cloud::MigrationCenter::V1::Report.
p result

Overloads:

  • #get_report(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::Report

    Pass arguments to get_report via a request object, either of type GetReportRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::GetReportRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_report(name: nil, view: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::Report

    Pass arguments to get_report via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.get_report.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_report.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.get_report request, options 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::GetReportConfigRequest.new

# Call the get_report_config method.
result = client.get_report_config request

# The returned object is of type Google::Cloud::MigrationCenter::V1::ReportConfig.
p result

Overloads:

  • #get_report_config(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::ReportConfig

    Pass arguments to get_report_config via a request object, either of type GetReportConfigRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::GetReportConfigRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_report_config(name: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::ReportConfig

    Pass arguments to get_report_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the resource.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.get_report_config.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_report_config.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.get_report_config request, options 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::GetSettingsRequest.new

# Call the get_settings method.
result = client.get_settings request

# The returned object is of type Google::Cloud::MigrationCenter::V1::Settings.
p result

Overloads:

  • #get_settings(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::Settings

    Pass arguments to get_settings via a request object, either of type GetSettingsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::GetSettingsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_settings(name: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::Settings

    Pass arguments to get_settings via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the resource.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.get_settings.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_settings.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.get_settings request, options 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::GetSourceRequest.new

# Call the get_source method.
result = client.get_source request

# The returned object is of type Google::Cloud::MigrationCenter::V1::Source.
p result

Overloads:

  • #get_source(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::Source

    Pass arguments to get_source via a request object, either of type GetSourceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::GetSourceRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_source(name: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::Source

    Pass arguments to get_source via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the resource.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.get_source.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_source.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.get_source request, options 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::ListAssetsRequest.new

# Call the list_assets method.
result = client.list_assets request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::MigrationCenter::V1::Asset.
  p item
end

Overloads:

  • #list_assets(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::Asset>

    Pass arguments to list_assets via a request object, either of type ListAssetsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::ListAssetsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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>

    Pass arguments to list_assets via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent value for ListAssetsRequest.

    • page_size (::Integer) (defaults to: nil)

      Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      A token identifying a page of results the server should return.

    • filter (::String) (defaults to: nil)

      Filtering results.

    • order_by (::String) (defaults to: nil)

      Field to sort by. See https://google.aip.dev/132#ordering for more details.

    • view (::Google::Cloud::MigrationCenter::V1::AssetView) (defaults to: nil)

      View of the assets. Defaults to BASIC.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.list_assets.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_assets.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.list_assets request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @migration_center_stub, :list_assets, "assets", request, result, options
    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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::ListErrorFramesRequest.new

# Call the list_error_frames method.
result = client.list_error_frames request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::MigrationCenter::V1::ErrorFrame.
  p item
end

Overloads:

  • #list_error_frames(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::ErrorFrame>

    Pass arguments to list_error_frames via a request object, either of type ListErrorFramesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::ListErrorFramesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_error_frames(parent: nil, page_size: nil, page_token: nil, view: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::ErrorFrame>

    Pass arguments to list_error_frames via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent value (the source) for ListErrorFramesRequest.

    • page_size (::Integer) (defaults to: nil)

      Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      A token identifying a page of results the server should return.

    • view (::Google::Cloud::MigrationCenter::V1::ErrorFrameView) (defaults to: nil)

      Optional. An optional view mode to control the level of details of each error frame. The default is a BASIC frame view.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.list_error_frames.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_error_frames.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.list_error_frames request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @migration_center_stub, :list_error_frames, "error_frames", request, result, options
    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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::ListGroupsRequest.new

# Call the list_groups method.
result = client.list_groups request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::MigrationCenter::V1::Group.
  p item
end

Overloads:

  • #list_groups(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::Group>

    Pass arguments to list_groups via a request object, either of type ListGroupsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::ListGroupsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::Group>

    Pass arguments to list_groups via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent value for ListGroupsRequest.

    • page_size (::Integer) (defaults to: nil)

      Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      A token identifying a page of results the server should return.

    • filter (::String) (defaults to: nil)

      Filtering results.

    • order_by (::String) (defaults to: nil)

      Field to sort by. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.list_groups.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_groups.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.list_groups request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @migration_center_stub, :list_groups, "groups", request, result, options
    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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::ListImportDataFilesRequest.new

# Call the list_import_data_files method.
result = client.list_import_data_files request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::MigrationCenter::V1::ImportDataFile.
  p item
end

Overloads:

  • #list_import_data_files(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::ImportDataFile>

    Pass arguments to list_import_data_files via a request object, either of type ListImportDataFilesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::ListImportDataFilesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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>

    Pass arguments to list_import_data_files via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Name of the parent of the ImportDataFiles resource.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of data files to return. The service may return fewer than this value. If unspecified, at most 500 data files will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListImportDataFiles call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListImportDataFiles must match the call that provided the page token.

    • filter (::String) (defaults to: nil)

      Filtering results.

    • order_by (::String) (defaults to: nil)

      Field to sort by. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.list_import_data_files.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_import_data_files.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.list_import_data_files request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @migration_center_stub, :list_import_data_files, "import_data_files", request, result, options
    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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::ListImportJobsRequest.new

# Call the list_import_jobs method.
result = client.list_import_jobs request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::MigrationCenter::V1::ImportJob.
  p item
end

Overloads:

  • #list_import_jobs(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::ImportJob>

    Pass arguments to list_import_jobs via a request object, either of type ListImportJobsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::ListImportJobsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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>

    Pass arguments to list_import_jobs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent value for ListImportJobsRequest.

    • page_size (::Integer) (defaults to: nil)

      Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      A token identifying a page of results the server should return.

    • filter (::String) (defaults to: nil)

      Filtering results.

    • order_by (::String) (defaults to: nil)

      Field to sort by. See https://google.aip.dev/132#ordering for more details.

    • view (::Google::Cloud::MigrationCenter::V1::ImportJobView) (defaults to: nil)

      Optional. The level of details of each import job. Default value is BASIC.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.list_import_jobs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_import_jobs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.list_import_jobs request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @migration_center_stub, :list_import_jobs, "import_jobs", request, result, options
    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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::ListPreferenceSetsRequest.new

# Call the list_preference_sets method.
result = client.list_preference_sets request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::MigrationCenter::V1::PreferenceSet.
  p item
end

Overloads:

  • #list_preference_sets(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::PreferenceSet>

    Pass arguments to list_preference_sets via a request object, either of type ListPreferenceSetsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::ListPreferenceSetsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_preference_sets(parent: nil, page_size: nil, page_token: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::PreferenceSet>

    Pass arguments to list_preference_sets via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent value for ListPreferenceSetsRequest.

    • page_size (::Integer) (defaults to: nil)

      Requested page size. Server may return fewer items than requested. If unspecified, at most 500 preference sets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

    • page_token (::String) (defaults to: nil)

      A token identifying a page of results the server should return.

    • order_by (::String) (defaults to: nil)

      Field to sort by. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.list_preference_sets.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_preference_sets.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.list_preference_sets request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @migration_center_stub, :list_preference_sets, "preference_sets", request, result, options
    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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::ListReportConfigsRequest.new

# Call the list_report_configs method.
result = client.list_report_configs request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::MigrationCenter::V1::ReportConfig.
  p item
end

Overloads:

  • #list_report_configs(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::ReportConfig>

    Pass arguments to list_report_configs via a request object, either of type ListReportConfigsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::ListReportConfigsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_report_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::ReportConfig>

    Pass arguments to list_report_configs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent value for ListReportConfigsRequest.

    • page_size (::Integer) (defaults to: nil)

      Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      A token identifying a page of results the server should return.

    • filter (::String) (defaults to: nil)

      Filtering results.

    • order_by (::String) (defaults to: nil)

      Field to sort by. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.list_report_configs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_report_configs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.list_report_configs request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @migration_center_stub, :list_report_configs, "report_configs", request, result, options
    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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::ListReportsRequest.new

# Call the list_reports method.
result = client.list_reports request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::MigrationCenter::V1::Report.
  p item
end

Overloads:

  • #list_reports(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::Report>

    Pass arguments to list_reports via a request object, either of type ListReportsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::ListReportsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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>

    Pass arguments to list_reports via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent value for ListReportsRequest.

    • page_size (::Integer) (defaults to: nil)

      Requested page size. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default value.

    • page_token (::String) (defaults to: nil)

      A token identifying a page of results that the server should return.

    • filter (::String) (defaults to: nil)

      Filtering results.

    • order_by (::String) (defaults to: nil)

      Field to sort by. See https://google.aip.dev/132#ordering for more details.

    • view (::Google::Cloud::MigrationCenter::V1::ReportView) (defaults to: nil)

      Determines what information to retrieve for each Report.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.list_reports.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_reports.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.list_reports request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @migration_center_stub, :list_reports, "reports", request, result, options
    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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::ListSourcesRequest.new

# Call the list_sources method.
result = client.list_sources request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::MigrationCenter::V1::Source.
  p item
end

Overloads:

  • #list_sources(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::Source>

    Pass arguments to list_sources via a request object, either of type ListSourcesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::ListSourcesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_sources(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::MigrationCenter::V1::Source>

    Pass arguments to list_sources via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Parent value for ListSourcesRequest.

    • page_size (::Integer) (defaults to: nil)

      Requested page size. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default value.

    • page_token (::String) (defaults to: nil)

      A token identifying a page of results that the server should return.

    • filter (::String) (defaults to: nil)

      Filtering results.

    • order_by (::String) (defaults to: nil)

      Field to sort by. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.list_sources.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_sources.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.list_sources request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @migration_center_stub, :list_sources, "sources", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#loggerLogger

The logger used for request/response debug logging.

Returns:

  • (Logger)


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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::RemoveAssetsFromGroupRequest.new

# Call the remove_assets_from_group method.
result = client.remove_assets_from_group request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #remove_assets_from_group(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to remove_assets_from_group via a request object, either of type RemoveAssetsFromGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::RemoveAssetsFromGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #remove_assets_from_group(group: nil, request_id: nil, assets: nil, allow_missing: nil) ⇒ ::Gapic::Operation

    Pass arguments to remove_assets_from_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • group (::String) (defaults to: nil)

      Required. Group reference.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

    • assets (::Google::Cloud::MigrationCenter::V1::AssetList, ::Hash) (defaults to: nil)

      Required. List of assets to be removed. The maximum number of assets that can be removed in a single request is 1000.

    • allow_missing (::Boolean) (defaults to: nil)

      Optional. When this value is set to false and one of the given assets is not an existing member of the group, the operation fails with a Not Found error. When set to true this situation is silently ignored by the server.

      Default value is false.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.remove_assets_from_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.remove_assets_from_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.remove_assets_from_group request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::ReportAssetFramesRequest.new

# Call the report_asset_frames method.
result = client.report_asset_frames request

# The returned object is of type Google::Cloud::MigrationCenter::V1::ReportAssetFramesResponse.
p result

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.report_asset_frames.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.report_asset_frames.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.report_asset_frames request, options 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::RunImportJobRequest.new

# Call the run_import_job method.
result = client.run_import_job request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #run_import_job(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to run_import_job via a request object, either of type RunImportJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::RunImportJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #run_import_job(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to run_import_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the import job to run.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.run_import_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.run_import_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.run_import_job request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: 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_domainString

The effective universe domain

Returns:

  • (String)


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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::UpdateAssetRequest.new

# Call the update_asset method.
result = client.update_asset request

# The returned object is of type Google::Cloud::MigrationCenter::V1::Asset.
p result

Overloads:

  • #update_asset(request, options = nil) ⇒ ::Google::Cloud::MigrationCenter::V1::Asset

    Pass arguments to update_asset via a request object, either of type UpdateAssetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::UpdateAssetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_asset(update_mask: nil, asset: nil, request_id: nil) ⇒ ::Google::Cloud::MigrationCenter::V1::Asset

    Pass arguments to update_asset via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Field mask is used to specify the fields to be overwritten in the Asset resource by the update. The values specified in the update_mask field are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.

    • asset (::Google::Cloud::MigrationCenter::V1::Asset, ::Hash) (defaults to: nil)

      Required. The resource being updated.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.update_asset.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_asset.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.update_asset request, options 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::UpdateGroupRequest.new

# Call the update_group method.
result = client.update_group request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_group(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_group via a request object, either of type UpdateGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::UpdateGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_group(update_mask: nil, group: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Field mask is used to specify the fields to be overwritten in the Group resource by the update. The values specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.

    • group (::Google::Cloud::MigrationCenter::V1::Group, ::Hash) (defaults to: nil)

      Required. The group resource being updated.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.update_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.update_group request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::UpdateImportJobRequest.new

# Call the update_import_job method.
result = client.update_import_job request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_import_job(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_import_job via a request object, either of type UpdateImportJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::UpdateImportJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_import_job(update_mask: nil, import_job: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_import_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Field mask is used to specify the fields to be overwritten in the Asset resource by the update. The values specified in the update_mask field are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.

    • import_job (::Google::Cloud::MigrationCenter::V1::ImportJob, ::Hash) (defaults to: nil)

      Required. The resource being updated

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.update_import_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_import_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.update_import_job request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::UpdatePreferenceSetRequest.new

# Call the update_preference_set method.
result = client.update_preference_set request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_preference_set(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_preference_set via a request object, either of type UpdatePreferenceSetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::UpdatePreferenceSetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_preference_set(update_mask: nil, preference_set: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_preference_set via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Field mask is used to specify the fields to be overwritten in the PreferenceSet resource by the update. The values specified in the update_mask field are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.

    • preference_set (::Google::Cloud::MigrationCenter::V1::PreferenceSet, ::Hash) (defaults to: nil)

      Required. The preference set resource being updated.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.update_preference_set.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_preference_set.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.update_preference_set request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::UpdateSettingsRequest.new

# Call the update_settings method.
result = client.update_settings request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_settings(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_settings via a request object, either of type UpdateSettingsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::UpdateSettingsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_settings(update_mask: nil, settings: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_settings via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Field mask is used to specify the fields to be overwritten in the Settings resource by the update. The values specified in the update_mask field are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.

    • settings (::Google::Cloud::MigrationCenter::V1::Settings, ::Hash) (defaults to: nil)

      Required. The project settings resource being updated.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.update_settings.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_settings.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.update_settings request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::UpdateSourceRequest.new

# Call the update_source method.
result = client.update_source request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_source(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_source via a request object, either of type UpdateSourceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::UpdateSourceRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_source(update_mask: nil, source: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_source via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Field mask is used to specify the fields to be overwritten in the Source resource by the update. The values specified in the update_mask field are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.

    • source (::Google::Cloud::MigrationCenter::V1::Source, ::Hash) (defaults to: nil)

      Required. The resource being updated

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.update_source.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_source.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.update_source request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: 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.

Examples:

Basic example

require "google/cloud/migration_center/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::MigrationCenter::V1::MigrationCenter::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::MigrationCenter::V1::ValidateImportJobRequest.new

# Call the validate_import_job method.
result = client.validate_import_job request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #validate_import_job(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to validate_import_job via a request object, either of type ValidateImportJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::MigrationCenter::V1::ValidateImportJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #validate_import_job(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to validate_import_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the import job to validate.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



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, options = 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
  options = ::Gapic::CallOptions.new(**options.to_h) if options.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

  options.apply_defaults timeout:      @config.rpcs.validate_import_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.validate_import_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @migration_center_stub.validate_import_job request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end