Class v1.MigrationCenterClient (2.1.0)

Service describing handlers for resources. v1

Package

@google-cloud/migrationcenter

Constructors

(constructor)(opts, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of MigrationCenterClient.

Parameters
Name Description
opts ClientOptions
gaxInstance typeof gax | typeof fallback

: loaded instance of google-gax. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new MigrationCenterClient({fallback: true}, gax); ```

Properties

apiEndpoint

get apiEndpoint(): string;

The DNS address for this API service.

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath.

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

locationsClient

locationsClient: LocationsClient;

migrationCenterStub

migrationCenterStub?: Promise<{
        [name: string]: Function;
    }>;

operationsClient

operationsClient: gax.OperationsClient;

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

servicePath

static get servicePath(): string;

The DNS address for this API service.

universeDomain

get universeDomain(): string;

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

addAssetsToGroup(request, options)

addAssetsToGroup(request?: protos.google.cloud.migrationcenter.v1.IAddAssetsToGroupRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Adds assets to a group.

Parameters
Name Description
request IAddAssetsToGroupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Group reference.
   */
  // const group = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'
  /**
   *  Required. List of assets to be added.
   *  The maximum number of assets that can be added in a single request is
   *  1000.
   */
  // const assets = {}
  /**
   *  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`.
   */
  // const allowExisting = true

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callAddAssetsToGroup() {
    // Construct request
    const request = {
      group,
      assets,
    };

    // Run request
    const [operation] = await migrationcenterClient.addAssetsToGroup(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callAddAssetsToGroup();

addAssetsToGroup(request, options, callback)

addAssetsToGroup(request: protos.google.cloud.migrationcenter.v1.IAddAssetsToGroupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IAddAssetsToGroupRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

addAssetsToGroup(request, callback)

addAssetsToGroup(request: protos.google.cloud.migrationcenter.v1.IAddAssetsToGroupRequest, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IAddAssetsToGroupRequest
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

aggregateAssetsValues(request, options)

aggregateAssetsValues(request?: protos.google.cloud.migrationcenter.v1.IAggregateAssetsValuesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.migrationcenter.v1.IAggregateAssetsValuesResponse,
        (protos.google.cloud.migrationcenter.v1.IAggregateAssetsValuesRequest | undefined),
        {} | undefined
    ]>;

Aggregates the requested fields based on provided function.

Parameters
Name Description
request IAggregateAssetsValuesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.migrationcenter.v1.IAggregateAssetsValuesResponse, (protos.google.cloud.migrationcenter.v1.IAggregateAssetsValuesRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing AggregateAssetsValuesResponse. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent value for `AggregateAssetsValuesRequest`.
   */
  // const parent = 'abc123'
  /**
   *  Array of aggregations to perform.
   *  Up to 25 aggregations can be defined.
   */
  // const aggregations = [1,2,3,4]
  /**
   *  The aggregation will be performed on assets that match the provided filter.
   */
  // const filter = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callAggregateAssetsValues() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const response = await migrationcenterClient.aggregateAssetsValues(request);
    console.log(response);
  }

  callAggregateAssetsValues();

aggregateAssetsValues(request, options, callback)

aggregateAssetsValues(request: protos.google.cloud.migrationcenter.v1.IAggregateAssetsValuesRequest, options: CallOptions, callback: Callback<protos.google.cloud.migrationcenter.v1.IAggregateAssetsValuesResponse, protos.google.cloud.migrationcenter.v1.IAggregateAssetsValuesRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IAggregateAssetsValuesRequest
options CallOptions
callback Callback<protos.google.cloud.migrationcenter.v1.IAggregateAssetsValuesResponse, protos.google.cloud.migrationcenter.v1.IAggregateAssetsValuesRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

aggregateAssetsValues(request, callback)

aggregateAssetsValues(request: protos.google.cloud.migrationcenter.v1.IAggregateAssetsValuesRequest, callback: Callback<protos.google.cloud.migrationcenter.v1.IAggregateAssetsValuesResponse, protos.google.cloud.migrationcenter.v1.IAggregateAssetsValuesRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IAggregateAssetsValuesRequest
callback Callback<protos.google.cloud.migrationcenter.v1.IAggregateAssetsValuesResponse, protos.google.cloud.migrationcenter.v1.IAggregateAssetsValuesRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

assetPath(project, location, asset)

assetPath(project: string, location: string, asset: string): string;

Return a fully-qualified asset resource name string.

Parameters
Name Description
project string
location string
asset string
Returns
Type Description
string

{string} Resource name string.

batchDeleteAssets(request, options)

batchDeleteAssets(request?: protos.google.cloud.migrationcenter.v1.IBatchDeleteAssetsRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        (protos.google.cloud.migrationcenter.v1.IBatchDeleteAssetsRequest | undefined),
        {} | undefined
    ]>;

Deletes list of Assets.

Parameters
Name Description
request IBatchDeleteAssetsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.protobuf.IEmpty, (protos.google.cloud.migrationcenter.v1.IBatchDeleteAssetsRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent value for batch asset delete.
   */
  // const parent = 'abc123'
  /**
   *  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}.
   */
  // const names = ['abc','def']
  /**
   *  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`.
   */
  // const allowMissing = true

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callBatchDeleteAssets() {
    // Construct request
    const request = {
      parent,
      names,
    };

    // Run request
    const response = await migrationcenterClient.batchDeleteAssets(request);
    console.log(response);
  }

  callBatchDeleteAssets();

batchDeleteAssets(request, options, callback)

batchDeleteAssets(request: protos.google.cloud.migrationcenter.v1.IBatchDeleteAssetsRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IBatchDeleteAssetsRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IBatchDeleteAssetsRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IBatchDeleteAssetsRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

batchDeleteAssets(request, callback)

batchDeleteAssets(request: protos.google.cloud.migrationcenter.v1.IBatchDeleteAssetsRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IBatchDeleteAssetsRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IBatchDeleteAssetsRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IBatchDeleteAssetsRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

batchUpdateAssets(request, options)

batchUpdateAssets(request?: protos.google.cloud.migrationcenter.v1.IBatchUpdateAssetsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.migrationcenter.v1.IBatchUpdateAssetsResponse,
        (protos.google.cloud.migrationcenter.v1.IBatchUpdateAssetsRequest | undefined),
        {} | undefined
    ]>;

Updates the parameters of a list of assets.

Parameters
Name Description
request IBatchUpdateAssetsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.migrationcenter.v1.IBatchUpdateAssetsResponse, (protos.google.cloud.migrationcenter.v1.IBatchUpdateAssetsRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing BatchUpdateAssetsResponse. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent value for batch asset update.
   */
  // const parent = 'abc123'
  /**
   *  Required. The request message specifying the resources to update.
   *  A maximum of 1000 assets can be modified in a batch.
   */
  // const requests = [1,2,3,4]

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callBatchUpdateAssets() {
    // Construct request
    const request = {
      parent,
      requests,
    };

    // Run request
    const response = await migrationcenterClient.batchUpdateAssets(request);
    console.log(response);
  }

  callBatchUpdateAssets();

batchUpdateAssets(request, options, callback)

batchUpdateAssets(request: protos.google.cloud.migrationcenter.v1.IBatchUpdateAssetsRequest, options: CallOptions, callback: Callback<protos.google.cloud.migrationcenter.v1.IBatchUpdateAssetsResponse, protos.google.cloud.migrationcenter.v1.IBatchUpdateAssetsRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IBatchUpdateAssetsRequest
options CallOptions
callback Callback<protos.google.cloud.migrationcenter.v1.IBatchUpdateAssetsResponse, protos.google.cloud.migrationcenter.v1.IBatchUpdateAssetsRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

batchUpdateAssets(request, callback)

batchUpdateAssets(request: protos.google.cloud.migrationcenter.v1.IBatchUpdateAssetsRequest, callback: Callback<protos.google.cloud.migrationcenter.v1.IBatchUpdateAssetsResponse, protos.google.cloud.migrationcenter.v1.IBatchUpdateAssetsRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IBatchUpdateAssetsRequest
callback Callback<protos.google.cloud.migrationcenter.v1.IBatchUpdateAssetsResponse, protos.google.cloud.migrationcenter.v1.IBatchUpdateAssetsRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

cancelOperation(request, optionsOrCallback, callback)

cancelOperation(request: protos.google.longrunning.CancelOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an value with a of 1, corresponding to Code.CANCELLED.

Parameters
Name Description
request CancelOperationRequest

The request object that will be sent.

optionsOrCallback CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>
callback Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
Type Description
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});

checkAddAssetsToGroupProgress(name)

checkAddAssetsToGroupProgress(name: string): Promise<LROperation<protos.google.cloud.migrationcenter.v1.Group, protos.google.cloud.migrationcenter.v1.OperationMetadata>>;

Check the status of the long running operation returned by addAssetsToGroup().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.migrationcenter.v1.Group, protos.google.cloud.migrationcenter.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Group reference.
   */
  // const group = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'
  /**
   *  Required. List of assets to be added.
   *  The maximum number of assets that can be added in a single request is
   *  1000.
   */
  // const assets = {}
  /**
   *  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`.
   */
  // const allowExisting = true

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callAddAssetsToGroup() {
    // Construct request
    const request = {
      group,
      assets,
    };

    // Run request
    const [operation] = await migrationcenterClient.addAssetsToGroup(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callAddAssetsToGroup();

checkCreateGroupProgress(name)

checkCreateGroupProgress(name: string): Promise<LROperation<protos.google.cloud.migrationcenter.v1.Group, protos.google.cloud.migrationcenter.v1.OperationMetadata>>;

Check the status of the long running operation returned by createGroup().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.migrationcenter.v1.Group, protos.google.cloud.migrationcenter.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Value for parent.
   */
  // const parent = 'abc123'
  /**
   *  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])?`.
   */
  // const groupId = 'abc123'
  /**
   *  Required. The group resource being created.
   */
  // const group = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callCreateGroup() {
    // Construct request
    const request = {
      parent,
      groupId,
      group,
    };

    // Run request
    const [operation] = await migrationcenterClient.createGroup(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateGroup();

checkCreateImportDataFileProgress(name)

checkCreateImportDataFileProgress(name: string): Promise<LROperation<protos.google.cloud.migrationcenter.v1.ImportDataFile, protos.google.cloud.migrationcenter.v1.OperationMetadata>>;

Check the status of the long running operation returned by createImportDataFile().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.migrationcenter.v1.ImportDataFile, protos.google.cloud.migrationcenter.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the parent of the ImportDataFile.
   */
  // const parent = 'abc123'
  /**
   *  Required. The ID of the new data file.
   */
  // const importDataFileId = 'abc123'
  /**
   *  Required. The resource being created.
   */
  // const importDataFile = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callCreateImportDataFile() {
    // Construct request
    const request = {
      parent,
      importDataFileId,
      importDataFile,
    };

    // Run request
    const [operation] = await migrationcenterClient.createImportDataFile(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateImportDataFile();

checkCreateImportJobProgress(name)

checkCreateImportJobProgress(name: string): Promise<LROperation<protos.google.cloud.migrationcenter.v1.ImportJob, protos.google.cloud.migrationcenter.v1.OperationMetadata>>;

Check the status of the long running operation returned by createImportJob().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.migrationcenter.v1.ImportJob, protos.google.cloud.migrationcenter.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Value for parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. ID of the import job.
   */
  // const importJobId = 'abc123'
  /**
   *  Required. The resource being created.
   */
  // const importJob = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callCreateImportJob() {
    // Construct request
    const request = {
      parent,
      importJobId,
      importJob,
    };

    // Run request
    const [operation] = await migrationcenterClient.createImportJob(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateImportJob();

checkCreatePreferenceSetProgress(name)

checkCreatePreferenceSetProgress(name: string): Promise<LROperation<protos.google.cloud.migrationcenter.v1.PreferenceSet, protos.google.cloud.migrationcenter.v1.OperationMetadata>>;

Check the status of the long running operation returned by createPreferenceSet().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.migrationcenter.v1.PreferenceSet, protos.google.cloud.migrationcenter.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Value for parent.
   */
  // const parent = 'abc123'
  /**
   *  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])?`.
   */
  // const preferenceSetId = 'abc123'
  /**
   *  Required. The preference set resource being created.
   */
  // const preferenceSet = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callCreatePreferenceSet() {
    // Construct request
    const request = {
      parent,
      preferenceSetId,
      preferenceSet,
    };

    // Run request
    const [operation] = await migrationcenterClient.createPreferenceSet(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreatePreferenceSet();

checkCreateReportConfigProgress(name)

checkCreateReportConfigProgress(name: string): Promise<LROperation<protos.google.cloud.migrationcenter.v1.ReportConfig, protos.google.cloud.migrationcenter.v1.OperationMetadata>>;

Check the status of the long running operation returned by createReportConfig().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.migrationcenter.v1.ReportConfig, protos.google.cloud.migrationcenter.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Value for parent.
   */
  // const parent = 'abc123'
  /**
   *  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]([a-z0-9-]{0,61}[a-z0-9])?.
   */
  // const reportConfigId = 'abc123'
  /**
   *  Required. The report config set resource being created.
   */
  // const reportConfig = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callCreateReportConfig() {
    // Construct request
    const request = {
      parent,
      reportConfigId,
      reportConfig,
    };

    // Run request
    const [operation] = await migrationcenterClient.createReportConfig(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateReportConfig();

checkCreateReportProgress(name)

checkCreateReportProgress(name: string): Promise<LROperation<protos.google.cloud.migrationcenter.v1.Report, protos.google.cloud.migrationcenter.v1.OperationMetadata>>;

Check the status of the long running operation returned by createReport().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.migrationcenter.v1.Report, protos.google.cloud.migrationcenter.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Value for parent.
   */
  // const parent = 'abc123'
  /**
   *  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]([a-z0-9-]{0,61}[a-z0-9])?.
   */
  // const reportId = 'abc123'
  /**
   *  Required. The report resource being created.
   */
  // const report = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callCreateReport() {
    // Construct request
    const request = {
      parent,
      reportId,
      report,
    };

    // Run request
    const [operation] = await migrationcenterClient.createReport(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateReport();

checkCreateSourceProgress(name)

checkCreateSourceProgress(name: string): Promise<LROperation<protos.google.cloud.migrationcenter.v1.Source, protos.google.cloud.migrationcenter.v1.OperationMetadata>>;

Check the status of the long running operation returned by createSource().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.migrationcenter.v1.Source, protos.google.cloud.migrationcenter.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Value for parent.
   */
  // const parent = 'abc123'
  /**
   *  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])?`.
   */
  // const sourceId = 'abc123'
  /**
   *  Required. The resource being created.
   */
  // const source = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callCreateSource() {
    // Construct request
    const request = {
      parent,
      sourceId,
      source,
    };

    // Run request
    const [operation] = await migrationcenterClient.createSource(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateSource();

checkDeleteGroupProgress(name)

checkDeleteGroupProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.migrationcenter.v1.OperationMetadata>>;

Check the status of the long running operation returned by deleteGroup().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.migrationcenter.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the group resource.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callDeleteGroup() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await migrationcenterClient.deleteGroup(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteGroup();

checkDeleteImportDataFileProgress(name)

checkDeleteImportDataFileProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.migrationcenter.v1.OperationMetadata>>;

Check the status of the long running operation returned by deleteImportDataFile().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.migrationcenter.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the ImportDataFile to delete.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callDeleteImportDataFile() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await migrationcenterClient.deleteImportDataFile(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteImportDataFile();

checkDeleteImportJobProgress(name)

checkDeleteImportJobProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.migrationcenter.v1.OperationMetadata>>;

Check the status of the long running operation returned by deleteImportJob().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.migrationcenter.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'
  /**
   *  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.
   */
  // const force = true

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callDeleteImportJob() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await migrationcenterClient.deleteImportJob(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteImportJob();

checkDeletePreferenceSetProgress(name)

checkDeletePreferenceSetProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.migrationcenter.v1.OperationMetadata>>;

Check the status of the long running operation returned by deletePreferenceSet().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.migrationcenter.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the group resource.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callDeletePreferenceSet() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await migrationcenterClient.deletePreferenceSet(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeletePreferenceSet();

checkDeleteReportConfigProgress(name)

checkDeleteReportConfigProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.migrationcenter.v1.OperationMetadata>>;

Check the status of the long running operation returned by deleteReportConfig().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.migrationcenter.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'
  /**
   *  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.
   */
  // const force = true

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callDeleteReportConfig() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await migrationcenterClient.deleteReportConfig(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteReportConfig();

checkDeleteReportProgress(name)

checkDeleteReportProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.migrationcenter.v1.OperationMetadata>>;

Check the status of the long running operation returned by deleteReport().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.migrationcenter.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callDeleteReport() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await migrationcenterClient.deleteReport(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteReport();

checkDeleteSourceProgress(name)

checkDeleteSourceProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.migrationcenter.v1.OperationMetadata>>;

Check the status of the long running operation returned by deleteSource().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.migrationcenter.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callDeleteSource() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await migrationcenterClient.deleteSource(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteSource();

checkRemoveAssetsFromGroupProgress(name)

checkRemoveAssetsFromGroupProgress(name: string): Promise<LROperation<protos.google.cloud.migrationcenter.v1.Group, protos.google.cloud.migrationcenter.v1.OperationMetadata>>;

Check the status of the long running operation returned by removeAssetsFromGroup().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.migrationcenter.v1.Group, protos.google.cloud.migrationcenter.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Group reference.
   */
  // const group = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'
  /**
   *  Required. List of assets to be removed.
   *  The maximum number of assets that can be removed in a single request is
   *  1000.
   */
  // const assets = {}
  /**
   *  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`.
   */
  // const allowMissing = true

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callRemoveAssetsFromGroup() {
    // Construct request
    const request = {
      group,
      assets,
    };

    // Run request
    const [operation] = await migrationcenterClient.removeAssetsFromGroup(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callRemoveAssetsFromGroup();

checkRunImportJobProgress(name)

checkRunImportJobProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.migrationcenter.v1.OperationMetadata>>;

Check the status of the long running operation returned by runImportJob().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.migrationcenter.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the import job to run.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callRunImportJob() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await migrationcenterClient.runImportJob(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callRunImportJob();

checkUpdateGroupProgress(name)

checkUpdateGroupProgress(name: string): Promise<LROperation<protos.google.cloud.migrationcenter.v1.Group, protos.google.cloud.migrationcenter.v1.OperationMetadata>>;

Check the status of the long running operation returned by updateGroup().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.migrationcenter.v1.Group, protos.google.cloud.migrationcenter.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  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.
   */
  // const updateMask = {}
  /**
   *  Required. The group resource being updated.
   */
  // const group = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callUpdateGroup() {
    // Construct request
    const request = {
      updateMask,
      group,
    };

    // Run request
    const [operation] = await migrationcenterClient.updateGroup(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateGroup();

checkUpdateImportJobProgress(name)

checkUpdateImportJobProgress(name: string): Promise<LROperation<protos.google.cloud.migrationcenter.v1.ImportJob, protos.google.cloud.migrationcenter.v1.OperationMetadata>>;

Check the status of the long running operation returned by updateImportJob().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.migrationcenter.v1.ImportJob, protos.google.cloud.migrationcenter.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  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.
   */
  // const updateMask = {}
  /**
   *  Required. The resource being updated
   */
  // const importJob = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callUpdateImportJob() {
    // Construct request
    const request = {
      updateMask,
      importJob,
    };

    // Run request
    const [operation] = await migrationcenterClient.updateImportJob(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateImportJob();

checkUpdatePreferenceSetProgress(name)

checkUpdatePreferenceSetProgress(name: string): Promise<LROperation<protos.google.cloud.migrationcenter.v1.PreferenceSet, protos.google.cloud.migrationcenter.v1.OperationMetadata>>;

Check the status of the long running operation returned by updatePreferenceSet().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.migrationcenter.v1.PreferenceSet, protos.google.cloud.migrationcenter.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  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.
   */
  // const updateMask = {}
  /**
   *  Required. The preference set resource being updated.
   */
  // const preferenceSet = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callUpdatePreferenceSet() {
    // Construct request
    const request = {
      updateMask,
      preferenceSet,
    };

    // Run request
    const [operation] = await migrationcenterClient.updatePreferenceSet(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdatePreferenceSet();

checkUpdateSettingsProgress(name)

checkUpdateSettingsProgress(name: string): Promise<LROperation<protos.google.cloud.migrationcenter.v1.Settings, protos.google.cloud.migrationcenter.v1.OperationMetadata>>;

Check the status of the long running operation returned by updateSettings().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.migrationcenter.v1.Settings, protos.google.cloud.migrationcenter.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  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.
   */
  // const updateMask = {}
  /**
   *  Required. The project settings resource being updated.
   */
  // const settings = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callUpdateSettings() {
    // Construct request
    const request = {
      updateMask,
      settings,
    };

    // Run request
    const [operation] = await migrationcenterClient.updateSettings(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateSettings();

checkUpdateSourceProgress(name)

checkUpdateSourceProgress(name: string): Promise<LROperation<protos.google.cloud.migrationcenter.v1.Source, protos.google.cloud.migrationcenter.v1.OperationMetadata>>;

Check the status of the long running operation returned by updateSource().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.cloud.migrationcenter.v1.Source, protos.google.cloud.migrationcenter.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  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.
   */
  // const updateMask = {}
  /**
   *  Required. The resource being updated
   */
  // const source = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callUpdateSource() {
    // Construct request
    const request = {
      updateMask,
      source,
    };

    // Run request
    const [operation] = await migrationcenterClient.updateSource(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateSource();

checkValidateImportJobProgress(name)

checkValidateImportJobProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.migrationcenter.v1.OperationMetadata>>;

Check the status of the long running operation returned by validateImportJob().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.migrationcenter.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the import job to validate.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callValidateImportJob() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await migrationcenterClient.validateImportJob(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callValidateImportJob();

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
Type Description
Promise<void>

{Promise} A promise that resolves when the client is closed.

createGroup(request, options)

createGroup(request?: protos.google.cloud.migrationcenter.v1.ICreateGroupRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new group in a given project and location.

Parameters
Name Description
request ICreateGroupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Value for parent.
   */
  // const parent = 'abc123'
  /**
   *  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])?`.
   */
  // const groupId = 'abc123'
  /**
   *  Required. The group resource being created.
   */
  // const group = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callCreateGroup() {
    // Construct request
    const request = {
      parent,
      groupId,
      group,
    };

    // Run request
    const [operation] = await migrationcenterClient.createGroup(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateGroup();

createGroup(request, options, callback)

createGroup(request: protos.google.cloud.migrationcenter.v1.ICreateGroupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateGroupRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createGroup(request, callback)

createGroup(request: protos.google.cloud.migrationcenter.v1.ICreateGroupRequest, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateGroupRequest
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createImportDataFile(request, options)

createImportDataFile(request?: protos.google.cloud.migrationcenter.v1.ICreateImportDataFileRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.migrationcenter.v1.IImportDataFile, protos.google.cloud.migrationcenter.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates an import data file.

Parameters
Name Description
request ICreateImportDataFileRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.migrationcenter.v1.IImportDataFile, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the parent of the ImportDataFile.
   */
  // const parent = 'abc123'
  /**
   *  Required. The ID of the new data file.
   */
  // const importDataFileId = 'abc123'
  /**
   *  Required. The resource being created.
   */
  // const importDataFile = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callCreateImportDataFile() {
    // Construct request
    const request = {
      parent,
      importDataFileId,
      importDataFile,
    };

    // Run request
    const [operation] = await migrationcenterClient.createImportDataFile(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateImportDataFile();

createImportDataFile(request, options, callback)

createImportDataFile(request: protos.google.cloud.migrationcenter.v1.ICreateImportDataFileRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.IImportDataFile, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateImportDataFileRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.IImportDataFile, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createImportDataFile(request, callback)

createImportDataFile(request: protos.google.cloud.migrationcenter.v1.ICreateImportDataFileRequest, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.IImportDataFile, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateImportDataFileRequest
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.IImportDataFile, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createImportJob(request, options)

createImportJob(request?: protos.google.cloud.migrationcenter.v1.ICreateImportJobRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.migrationcenter.v1.IImportJob, protos.google.cloud.migrationcenter.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates an import job.

Parameters
Name Description
request ICreateImportJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.migrationcenter.v1.IImportJob, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Value for parent.
   */
  // const parent = 'abc123'
  /**
   *  Required. ID of the import job.
   */
  // const importJobId = 'abc123'
  /**
   *  Required. The resource being created.
   */
  // const importJob = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callCreateImportJob() {
    // Construct request
    const request = {
      parent,
      importJobId,
      importJob,
    };

    // Run request
    const [operation] = await migrationcenterClient.createImportJob(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateImportJob();

createImportJob(request, options, callback)

createImportJob(request: protos.google.cloud.migrationcenter.v1.ICreateImportJobRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.IImportJob, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateImportJobRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.IImportJob, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createImportJob(request, callback)

createImportJob(request: protos.google.cloud.migrationcenter.v1.ICreateImportJobRequest, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.IImportJob, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateImportJobRequest
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.IImportJob, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createPreferenceSet(request, options)

createPreferenceSet(request?: protos.google.cloud.migrationcenter.v1.ICreatePreferenceSetRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.migrationcenter.v1.IPreferenceSet, protos.google.cloud.migrationcenter.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new preference set in a given project and location.

Parameters
Name Description
request ICreatePreferenceSetRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.migrationcenter.v1.IPreferenceSet, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Value for parent.
   */
  // const parent = 'abc123'
  /**
   *  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])?`.
   */
  // const preferenceSetId = 'abc123'
  /**
   *  Required. The preference set resource being created.
   */
  // const preferenceSet = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callCreatePreferenceSet() {
    // Construct request
    const request = {
      parent,
      preferenceSetId,
      preferenceSet,
    };

    // Run request
    const [operation] = await migrationcenterClient.createPreferenceSet(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreatePreferenceSet();

createPreferenceSet(request, options, callback)

createPreferenceSet(request: protos.google.cloud.migrationcenter.v1.ICreatePreferenceSetRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.IPreferenceSet, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreatePreferenceSetRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.IPreferenceSet, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createPreferenceSet(request, callback)

createPreferenceSet(request: protos.google.cloud.migrationcenter.v1.ICreatePreferenceSetRequest, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.IPreferenceSet, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreatePreferenceSetRequest
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.IPreferenceSet, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createReport(request, options)

createReport(request?: protos.google.cloud.migrationcenter.v1.ICreateReportRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.migrationcenter.v1.IReport, protos.google.cloud.migrationcenter.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a report.

Parameters
Name Description
request ICreateReportRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.migrationcenter.v1.IReport, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Value for parent.
   */
  // const parent = 'abc123'
  /**
   *  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]([a-z0-9-]{0,61}[a-z0-9])?.
   */
  // const reportId = 'abc123'
  /**
   *  Required. The report resource being created.
   */
  // const report = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callCreateReport() {
    // Construct request
    const request = {
      parent,
      reportId,
      report,
    };

    // Run request
    const [operation] = await migrationcenterClient.createReport(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateReport();

createReport(request, options, callback)

createReport(request: protos.google.cloud.migrationcenter.v1.ICreateReportRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.IReport, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateReportRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.IReport, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createReport(request, callback)

createReport(request: protos.google.cloud.migrationcenter.v1.ICreateReportRequest, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.IReport, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateReportRequest
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.IReport, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createReportConfig(request, options)

createReportConfig(request?: protos.google.cloud.migrationcenter.v1.ICreateReportConfigRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.migrationcenter.v1.IReportConfig, protos.google.cloud.migrationcenter.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a report configuration.

Parameters
Name Description
request ICreateReportConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.migrationcenter.v1.IReportConfig, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Value for parent.
   */
  // const parent = 'abc123'
  /**
   *  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]([a-z0-9-]{0,61}[a-z0-9])?.
   */
  // const reportConfigId = 'abc123'
  /**
   *  Required. The report config set resource being created.
   */
  // const reportConfig = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callCreateReportConfig() {
    // Construct request
    const request = {
      parent,
      reportConfigId,
      reportConfig,
    };

    // Run request
    const [operation] = await migrationcenterClient.createReportConfig(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateReportConfig();

createReportConfig(request, options, callback)

createReportConfig(request: protos.google.cloud.migrationcenter.v1.ICreateReportConfigRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.IReportConfig, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateReportConfigRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.IReportConfig, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createReportConfig(request, callback)

createReportConfig(request: protos.google.cloud.migrationcenter.v1.ICreateReportConfigRequest, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.IReportConfig, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateReportConfigRequest
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.IReportConfig, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createSource(request, options)

createSource(request?: protos.google.cloud.migrationcenter.v1.ICreateSourceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.migrationcenter.v1.ISource, protos.google.cloud.migrationcenter.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a new source in a given project and location.

Parameters
Name Description
request ICreateSourceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.migrationcenter.v1.ISource, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Value for parent.
   */
  // const parent = 'abc123'
  /**
   *  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])?`.
   */
  // const sourceId = 'abc123'
  /**
   *  Required. The resource being created.
   */
  // const source = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callCreateSource() {
    // Construct request
    const request = {
      parent,
      sourceId,
      source,
    };

    // Run request
    const [operation] = await migrationcenterClient.createSource(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateSource();

createSource(request, options, callback)

createSource(request: protos.google.cloud.migrationcenter.v1.ICreateSourceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.ISource, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateSourceRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.ISource, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createSource(request, callback)

createSource(request: protos.google.cloud.migrationcenter.v1.ICreateSourceRequest, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.ISource, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateSourceRequest
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.ISource, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteAsset(request, options)

deleteAsset(request?: protos.google.cloud.migrationcenter.v1.IDeleteAssetRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        protos.google.cloud.migrationcenter.v1.IDeleteAssetRequest | undefined,
        {} | undefined
    ]>;

Deletes an asset.

Parameters
Name Description
request IDeleteAssetRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IDeleteAssetRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callDeleteAsset() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await migrationcenterClient.deleteAsset(request);
    console.log(response);
  }

  callDeleteAsset();

deleteAsset(request, options, callback)

deleteAsset(request: protos.google.cloud.migrationcenter.v1.IDeleteAssetRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IDeleteAssetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteAssetRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IDeleteAssetRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteAsset(request, callback)

deleteAsset(request: protos.google.cloud.migrationcenter.v1.IDeleteAssetRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IDeleteAssetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteAssetRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IDeleteAssetRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteGroup(request, options)

deleteGroup(request?: protos.google.cloud.migrationcenter.v1.IDeleteGroupRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a group.

Parameters
Name Description
request IDeleteGroupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the group resource.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callDeleteGroup() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await migrationcenterClient.deleteGroup(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteGroup();

deleteGroup(request, options, callback)

deleteGroup(request: protos.google.cloud.migrationcenter.v1.IDeleteGroupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteGroupRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteGroup(request, callback)

deleteGroup(request: protos.google.cloud.migrationcenter.v1.IDeleteGroupRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteGroupRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteImportDataFile(request, options)

deleteImportDataFile(request?: protos.google.cloud.migrationcenter.v1.IDeleteImportDataFileRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Delete an import data file.

Parameters
Name Description
request IDeleteImportDataFileRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the ImportDataFile to delete.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callDeleteImportDataFile() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await migrationcenterClient.deleteImportDataFile(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteImportDataFile();

deleteImportDataFile(request, options, callback)

deleteImportDataFile(request: protos.google.cloud.migrationcenter.v1.IDeleteImportDataFileRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteImportDataFileRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteImportDataFile(request, callback)

deleteImportDataFile(request: protos.google.cloud.migrationcenter.v1.IDeleteImportDataFileRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteImportDataFileRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteImportJob(request, options)

deleteImportJob(request?: protos.google.cloud.migrationcenter.v1.IDeleteImportJobRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes an import job.

Parameters
Name Description
request IDeleteImportJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'
  /**
   *  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.
   */
  // const force = true

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callDeleteImportJob() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await migrationcenterClient.deleteImportJob(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteImportJob();

deleteImportJob(request, options, callback)

deleteImportJob(request: protos.google.cloud.migrationcenter.v1.IDeleteImportJobRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteImportJobRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteImportJob(request, callback)

deleteImportJob(request: protos.google.cloud.migrationcenter.v1.IDeleteImportJobRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteImportJobRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteOperation(request, optionsOrCallback, callback)

deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
Name Description
request DeleteOperationRequest

The request object that will be sent.

optionsOrCallback CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
callback Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
Type Description
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});

deletePreferenceSet(request, options)

deletePreferenceSet(request?: protos.google.cloud.migrationcenter.v1.IDeletePreferenceSetRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a preference set.

Parameters
Name Description
request IDeletePreferenceSetRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the group resource.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callDeletePreferenceSet() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await migrationcenterClient.deletePreferenceSet(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeletePreferenceSet();

deletePreferenceSet(request, options, callback)

deletePreferenceSet(request: protos.google.cloud.migrationcenter.v1.IDeletePreferenceSetRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeletePreferenceSetRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deletePreferenceSet(request, callback)

deletePreferenceSet(request: protos.google.cloud.migrationcenter.v1.IDeletePreferenceSetRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeletePreferenceSetRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteReport(request, options)

deleteReport(request?: protos.google.cloud.migrationcenter.v1.IDeleteReportRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a Report.

Parameters
Name Description
request IDeleteReportRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callDeleteReport() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await migrationcenterClient.deleteReport(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteReport();

deleteReport(request, options, callback)

deleteReport(request: protos.google.cloud.migrationcenter.v1.IDeleteReportRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteReportRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteReport(request, callback)

deleteReport(request: protos.google.cloud.migrationcenter.v1.IDeleteReportRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteReportRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteReportConfig(request, options)

deleteReportConfig(request?: protos.google.cloud.migrationcenter.v1.IDeleteReportConfigRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a ReportConfig.

Parameters
Name Description
request IDeleteReportConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'
  /**
   *  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.
   */
  // const force = true

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callDeleteReportConfig() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await migrationcenterClient.deleteReportConfig(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteReportConfig();

deleteReportConfig(request, options, callback)

deleteReportConfig(request: protos.google.cloud.migrationcenter.v1.IDeleteReportConfigRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteReportConfigRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteReportConfig(request, callback)

deleteReportConfig(request: protos.google.cloud.migrationcenter.v1.IDeleteReportConfigRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteReportConfigRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteSource(request, options)

deleteSource(request?: protos.google.cloud.migrationcenter.v1.IDeleteSourceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes a source.

Parameters
Name Description
request IDeleteSourceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callDeleteSource() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await migrationcenterClient.deleteSource(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteSource();

deleteSource(request, options, callback)

deleteSource(request: protos.google.cloud.migrationcenter.v1.IDeleteSourceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteSourceRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteSource(request, callback)

deleteSource(request: protos.google.cloud.migrationcenter.v1.IDeleteSourceRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteSourceRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

errorFramePath(project, location, source, errorFrame)

errorFramePath(project: string, location: string, source: string, errorFrame: string): string;

Return a fully-qualified errorFrame resource name string.

Parameters
Name Description
project string
location string
source string
errorFrame string
Returns
Type Description
string

{string} Resource name string.

getAsset(request, options)

getAsset(request?: protos.google.cloud.migrationcenter.v1.IGetAssetRequest, options?: CallOptions): Promise<[
        protos.google.cloud.migrationcenter.v1.IAsset,
        protos.google.cloud.migrationcenter.v1.IGetAssetRequest | undefined,
        {} | undefined
    ]>;

Gets the details of an asset.

Parameters
Name Description
request IGetAssetRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.migrationcenter.v1.IAsset, protos.google.cloud.migrationcenter.v1.IGetAssetRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Asset. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'
  /**
   *  View of the assets. Defaults to BASIC.
   */
  // const view = {}

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callGetAsset() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await migrationcenterClient.getAsset(request);
    console.log(response);
  }

  callGetAsset();

getAsset(request, options, callback)

getAsset(request: protos.google.cloud.migrationcenter.v1.IGetAssetRequest, options: CallOptions, callback: Callback<protos.google.cloud.migrationcenter.v1.IAsset, protos.google.cloud.migrationcenter.v1.IGetAssetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetAssetRequest
options CallOptions
callback Callback<protos.google.cloud.migrationcenter.v1.IAsset, protos.google.cloud.migrationcenter.v1.IGetAssetRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getAsset(request, callback)

getAsset(request: protos.google.cloud.migrationcenter.v1.IGetAssetRequest, callback: Callback<protos.google.cloud.migrationcenter.v1.IAsset, protos.google.cloud.migrationcenter.v1.IGetAssetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetAssetRequest
callback Callback<protos.google.cloud.migrationcenter.v1.IAsset, protos.google.cloud.migrationcenter.v1.IGetAssetRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getErrorFrame(request, options)

getErrorFrame(request?: protos.google.cloud.migrationcenter.v1.IGetErrorFrameRequest, options?: CallOptions): Promise<[
        protos.google.cloud.migrationcenter.v1.IErrorFrame,
        protos.google.cloud.migrationcenter.v1.IGetErrorFrameRequest | undefined,
        {} | undefined
    ]>;

Gets the details of an error frame.

Parameters
Name Description
request IGetErrorFrameRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.migrationcenter.v1.IErrorFrame, protos.google.cloud.migrationcenter.v1.IGetErrorFrameRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing ErrorFrame. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the frame to retrieve.
   *  Format:
   *  projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame}
   */
  // const name = 'abc123'
  /**
   *  Optional. An optional view mode to control the level of details for the
   *  frame. The default is a basic frame view.
   */
  // const view = {}

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callGetErrorFrame() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await migrationcenterClient.getErrorFrame(request);
    console.log(response);
  }

  callGetErrorFrame();

getErrorFrame(request, options, callback)

getErrorFrame(request: protos.google.cloud.migrationcenter.v1.IGetErrorFrameRequest, options: CallOptions, callback: Callback<protos.google.cloud.migrationcenter.v1.IErrorFrame, protos.google.cloud.migrationcenter.v1.IGetErrorFrameRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetErrorFrameRequest
options CallOptions
callback Callback<protos.google.cloud.migrationcenter.v1.IErrorFrame, protos.google.cloud.migrationcenter.v1.IGetErrorFrameRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getErrorFrame(request, callback)

getErrorFrame(request: protos.google.cloud.migrationcenter.v1.IGetErrorFrameRequest, callback: Callback<protos.google.cloud.migrationcenter.v1.IErrorFrame, protos.google.cloud.migrationcenter.v1.IGetErrorFrameRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetErrorFrameRequest
callback Callback<protos.google.cloud.migrationcenter.v1.IErrorFrame, protos.google.cloud.migrationcenter.v1.IGetErrorFrameRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getGroup(request, options)

getGroup(request?: protos.google.cloud.migrationcenter.v1.IGetGroupRequest, options?: CallOptions): Promise<[
        protos.google.cloud.migrationcenter.v1.IGroup,
        protos.google.cloud.migrationcenter.v1.IGetGroupRequest | undefined,
        {} | undefined
    ]>;

Gets the details of a group.

Parameters
Name Description
request IGetGroupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IGetGroupRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Group. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callGetGroup() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await migrationcenterClient.getGroup(request);
    console.log(response);
  }

  callGetGroup();

getGroup(request, options, callback)

getGroup(request: protos.google.cloud.migrationcenter.v1.IGetGroupRequest, options: CallOptions, callback: Callback<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IGetGroupRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetGroupRequest
options CallOptions
callback Callback<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IGetGroupRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getGroup(request, callback)

getGroup(request: protos.google.cloud.migrationcenter.v1.IGetGroupRequest, callback: Callback<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IGetGroupRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetGroupRequest
callback Callback<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IGetGroupRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getImportDataFile(request, options)

getImportDataFile(request?: protos.google.cloud.migrationcenter.v1.IGetImportDataFileRequest, options?: CallOptions): Promise<[
        protos.google.cloud.migrationcenter.v1.IImportDataFile,
        (protos.google.cloud.migrationcenter.v1.IGetImportDataFileRequest | undefined),
        {} | undefined
    ]>;

Gets an import data file.

Parameters
Name Description
request IGetImportDataFileRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.migrationcenter.v1.IImportDataFile, (protos.google.cloud.migrationcenter.v1.IGetImportDataFileRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the ImportDataFile.
   */
  // const name = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callGetImportDataFile() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await migrationcenterClient.getImportDataFile(request);
    console.log(response);
  }

  callGetImportDataFile();

getImportDataFile(request, options, callback)

getImportDataFile(request: protos.google.cloud.migrationcenter.v1.IGetImportDataFileRequest, options: CallOptions, callback: Callback<protos.google.cloud.migrationcenter.v1.IImportDataFile, protos.google.cloud.migrationcenter.v1.IGetImportDataFileRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetImportDataFileRequest
options CallOptions
callback Callback<protos.google.cloud.migrationcenter.v1.IImportDataFile, protos.google.cloud.migrationcenter.v1.IGetImportDataFileRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getImportDataFile(request, callback)

getImportDataFile(request: protos.google.cloud.migrationcenter.v1.IGetImportDataFileRequest, callback: Callback<protos.google.cloud.migrationcenter.v1.IImportDataFile, protos.google.cloud.migrationcenter.v1.IGetImportDataFileRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetImportDataFileRequest
callback Callback<protos.google.cloud.migrationcenter.v1.IImportDataFile, protos.google.cloud.migrationcenter.v1.IGetImportDataFileRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getImportJob(request, options)

getImportJob(request?: protos.google.cloud.migrationcenter.v1.IGetImportJobRequest, options?: CallOptions): Promise<[
        protos.google.cloud.migrationcenter.v1.IImportJob,
        protos.google.cloud.migrationcenter.v1.IGetImportJobRequest | undefined,
        {} | undefined
    ]>;

Gets the details of an import job.

Parameters
Name Description
request IGetImportJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.migrationcenter.v1.IImportJob, protos.google.cloud.migrationcenter.v1.IGetImportJobRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'
  /**
   *  Optional. The level of details of the import job.
   *  Default value is FULL.
   */
  // const view = {}

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callGetImportJob() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await migrationcenterClient.getImportJob(request);
    console.log(response);
  }

  callGetImportJob();

getImportJob(request, options, callback)

getImportJob(request: protos.google.cloud.migrationcenter.v1.IGetImportJobRequest, options: CallOptions, callback: Callback<protos.google.cloud.migrationcenter.v1.IImportJob, protos.google.cloud.migrationcenter.v1.IGetImportJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetImportJobRequest
options CallOptions
callback Callback<protos.google.cloud.migrationcenter.v1.IImportJob, protos.google.cloud.migrationcenter.v1.IGetImportJobRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getImportJob(request, callback)

getImportJob(request: protos.google.cloud.migrationcenter.v1.IGetImportJobRequest, callback: Callback<protos.google.cloud.migrationcenter.v1.IImportJob, protos.google.cloud.migrationcenter.v1.IGetImportJobRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetImportJobRequest
callback Callback<protos.google.cloud.migrationcenter.v1.IImportJob, protos.google.cloud.migrationcenter.v1.IGetImportJobRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getLocation(request, options, callback)

getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;

Gets information about a location.

Parameters
Name Description
request LocationProtos.google.cloud.location.IGetLocationRequest

The request object that will be sent.

options CallOptions | Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>

Call options. See CallOptions for more details.

callback Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Returns
Type Description
Promise<google.cloud.location.ILocation>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

const [response] = await client.getLocation(request);

getOperation(request, optionsOrCallback, callback)

getOperation(request: protos.google.longrunning.GetOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters
Name Description
request GetOperationRequest

The request object that will be sent.

optionsOrCallback CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
callback Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

Returns
Type Description
Promise<[protos.google.longrunning.Operation]>
Example

const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)

getPreferenceSet(request, options)

getPreferenceSet(request?: protos.google.cloud.migrationcenter.v1.IGetPreferenceSetRequest, options?: CallOptions): Promise<[
        protos.google.cloud.migrationcenter.v1.IPreferenceSet,
        (protos.google.cloud.migrationcenter.v1.IGetPreferenceSetRequest | undefined),
        {} | undefined
    ]>;

Gets the details of a preference set.

Parameters
Name Description
request IGetPreferenceSetRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.migrationcenter.v1.IPreferenceSet, (protos.google.cloud.migrationcenter.v1.IGetPreferenceSetRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing PreferenceSet. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callGetPreferenceSet() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await migrationcenterClient.getPreferenceSet(request);
    console.log(response);
  }

  callGetPreferenceSet();

getPreferenceSet(request, options, callback)

getPreferenceSet(request: protos.google.cloud.migrationcenter.v1.IGetPreferenceSetRequest, options: CallOptions, callback: Callback<protos.google.cloud.migrationcenter.v1.IPreferenceSet, protos.google.cloud.migrationcenter.v1.IGetPreferenceSetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetPreferenceSetRequest
options CallOptions
callback Callback<protos.google.cloud.migrationcenter.v1.IPreferenceSet, protos.google.cloud.migrationcenter.v1.IGetPreferenceSetRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getPreferenceSet(request, callback)

getPreferenceSet(request: protos.google.cloud.migrationcenter.v1.IGetPreferenceSetRequest, callback: Callback<protos.google.cloud.migrationcenter.v1.IPreferenceSet, protos.google.cloud.migrationcenter.v1.IGetPreferenceSetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetPreferenceSetRequest
callback Callback<protos.google.cloud.migrationcenter.v1.IPreferenceSet, protos.google.cloud.migrationcenter.v1.IGetPreferenceSetRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getProjectId()

getProjectId(): Promise<string>;
Returns
Type Description
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
Name Description
callback Callback<string, undefined, undefined>
Returns
Type Description
void

getReport(request, options)

getReport(request?: protos.google.cloud.migrationcenter.v1.IGetReportRequest, options?: CallOptions): Promise<[
        protos.google.cloud.migrationcenter.v1.IReport,
        protos.google.cloud.migrationcenter.v1.IGetReportRequest | undefined,
        {} | undefined
    ]>;

Gets details of a single Report.

Parameters
Name Description
request IGetReportRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.migrationcenter.v1.IReport, protos.google.cloud.migrationcenter.v1.IGetReportRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'
  /**
   *  Determines what information to retrieve for the Report.
   */
  // const view = {}

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callGetReport() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await migrationcenterClient.getReport(request);
    console.log(response);
  }

  callGetReport();

getReport(request, options, callback)

getReport(request: protos.google.cloud.migrationcenter.v1.IGetReportRequest, options: CallOptions, callback: Callback<protos.google.cloud.migrationcenter.v1.IReport, protos.google.cloud.migrationcenter.v1.IGetReportRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetReportRequest
options CallOptions
callback Callback<protos.google.cloud.migrationcenter.v1.IReport, protos.google.cloud.migrationcenter.v1.IGetReportRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getReport(request, callback)

getReport(request: protos.google.cloud.migrationcenter.v1.IGetReportRequest, callback: Callback<protos.google.cloud.migrationcenter.v1.IReport, protos.google.cloud.migrationcenter.v1.IGetReportRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetReportRequest
callback Callback<protos.google.cloud.migrationcenter.v1.IReport, protos.google.cloud.migrationcenter.v1.IGetReportRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getReportConfig(request, options)

getReportConfig(request?: protos.google.cloud.migrationcenter.v1.IGetReportConfigRequest, options?: CallOptions): Promise<[
        protos.google.cloud.migrationcenter.v1.IReportConfig,
        (protos.google.cloud.migrationcenter.v1.IGetReportConfigRequest | undefined),
        {} | undefined
    ]>;

Gets details of a single ReportConfig.

Parameters
Name Description
request IGetReportConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.migrationcenter.v1.IReportConfig, (protos.google.cloud.migrationcenter.v1.IGetReportConfigRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callGetReportConfig() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await migrationcenterClient.getReportConfig(request);
    console.log(response);
  }

  callGetReportConfig();

getReportConfig(request, options, callback)

getReportConfig(request: protos.google.cloud.migrationcenter.v1.IGetReportConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.migrationcenter.v1.IReportConfig, protos.google.cloud.migrationcenter.v1.IGetReportConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetReportConfigRequest
options CallOptions
callback Callback<protos.google.cloud.migrationcenter.v1.IReportConfig, protos.google.cloud.migrationcenter.v1.IGetReportConfigRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getReportConfig(request, callback)

getReportConfig(request: protos.google.cloud.migrationcenter.v1.IGetReportConfigRequest, callback: Callback<protos.google.cloud.migrationcenter.v1.IReportConfig, protos.google.cloud.migrationcenter.v1.IGetReportConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetReportConfigRequest
callback Callback<protos.google.cloud.migrationcenter.v1.IReportConfig, protos.google.cloud.migrationcenter.v1.IGetReportConfigRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getSettings(request, options)

getSettings(request?: protos.google.cloud.migrationcenter.v1.IGetSettingsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.migrationcenter.v1.ISettings,
        protos.google.cloud.migrationcenter.v1.IGetSettingsRequest | undefined,
        {} | undefined
    ]>;

Gets the details of regional settings.

Parameters
Name Description
request IGetSettingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.migrationcenter.v1.ISettings, protos.google.cloud.migrationcenter.v1.IGetSettingsRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Settings. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callGetSettings() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await migrationcenterClient.getSettings(request);
    console.log(response);
  }

  callGetSettings();

getSettings(request, options, callback)

getSettings(request: protos.google.cloud.migrationcenter.v1.IGetSettingsRequest, options: CallOptions, callback: Callback<protos.google.cloud.migrationcenter.v1.ISettings, protos.google.cloud.migrationcenter.v1.IGetSettingsRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetSettingsRequest
options CallOptions
callback Callback<protos.google.cloud.migrationcenter.v1.ISettings, protos.google.cloud.migrationcenter.v1.IGetSettingsRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getSettings(request, callback)

getSettings(request: protos.google.cloud.migrationcenter.v1.IGetSettingsRequest, callback: Callback<protos.google.cloud.migrationcenter.v1.ISettings, protos.google.cloud.migrationcenter.v1.IGetSettingsRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetSettingsRequest
callback Callback<protos.google.cloud.migrationcenter.v1.ISettings, protos.google.cloud.migrationcenter.v1.IGetSettingsRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getSource(request, options)

getSource(request?: protos.google.cloud.migrationcenter.v1.IGetSourceRequest, options?: CallOptions): Promise<[
        protos.google.cloud.migrationcenter.v1.ISource,
        protos.google.cloud.migrationcenter.v1.IGetSourceRequest | undefined,
        {} | undefined
    ]>;

Gets the details of a source.

Parameters
Name Description
request IGetSourceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.migrationcenter.v1.ISource, protos.google.cloud.migrationcenter.v1.IGetSourceRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the resource.
   */
  // const name = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callGetSource() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await migrationcenterClient.getSource(request);
    console.log(response);
  }

  callGetSource();

getSource(request, options, callback)

getSource(request: protos.google.cloud.migrationcenter.v1.IGetSourceRequest, options: CallOptions, callback: Callback<protos.google.cloud.migrationcenter.v1.ISource, protos.google.cloud.migrationcenter.v1.IGetSourceRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetSourceRequest
options CallOptions
callback Callback<protos.google.cloud.migrationcenter.v1.ISource, protos.google.cloud.migrationcenter.v1.IGetSourceRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getSource(request, callback)

getSource(request: protos.google.cloud.migrationcenter.v1.IGetSourceRequest, callback: Callback<protos.google.cloud.migrationcenter.v1.ISource, protos.google.cloud.migrationcenter.v1.IGetSourceRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetSourceRequest
callback Callback<protos.google.cloud.migrationcenter.v1.ISource, protos.google.cloud.migrationcenter.v1.IGetSourceRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

groupPath(project, location, group)

groupPath(project: string, location: string, group: string): string;

Return a fully-qualified group resource name string.

Parameters
Name Description
project string
location string
group string
Returns
Type Description
string

{string} Resource name string.

importDataFilePath(project, location, importJob, importDataFile)

importDataFilePath(project: string, location: string, importJob: string, importDataFile: string): string;

Return a fully-qualified importDataFile resource name string.

Parameters
Name Description
project string
location string
importJob string
importDataFile string
Returns
Type Description
string

{string} Resource name string.

importJobPath(project, location, importJob)

importJobPath(project: string, location: string, importJob: string): string;

Return a fully-qualified importJob resource name string.

Parameters
Name Description
project string
location string
importJob string
Returns
Type Description
string

{string} Resource name string.

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
Type Description
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listAssets(request, options)

listAssets(request?: protos.google.cloud.migrationcenter.v1.IListAssetsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.migrationcenter.v1.IAsset[],
        protos.google.cloud.migrationcenter.v1.IListAssetsRequest | null,
        protos.google.cloud.migrationcenter.v1.IListAssetsResponse
    ]>;

Lists all the assets in a given project and location.

Parameters
Name Description
request IListAssetsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.migrationcenter.v1.IAsset[], protos.google.cloud.migrationcenter.v1.IListAssetsRequest | null, protos.google.cloud.migrationcenter.v1.IListAssetsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of Asset. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listAssetsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listAssets(request, options, callback)

listAssets(request: protos.google.cloud.migrationcenter.v1.IListAssetsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.migrationcenter.v1.IListAssetsRequest, protos.google.cloud.migrationcenter.v1.IListAssetsResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IAsset>): void;
Parameters
Name Description
request IListAssetsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.migrationcenter.v1.IListAssetsRequest, protos.google.cloud.migrationcenter.v1.IListAssetsResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IAsset>
Returns
Type Description
void

listAssets(request, callback)

listAssets(request: protos.google.cloud.migrationcenter.v1.IListAssetsRequest, callback: PaginationCallback<protos.google.cloud.migrationcenter.v1.IListAssetsRequest, protos.google.cloud.migrationcenter.v1.IListAssetsResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IAsset>): void;
Parameters
Name Description
request IListAssetsRequest
callback PaginationCallback<protos.google.cloud.migrationcenter.v1.IListAssetsRequest, protos.google.cloud.migrationcenter.v1.IListAssetsResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IAsset>
Returns
Type Description
void

listAssetsAsync(request, options)

listAssetsAsync(request?: protos.google.cloud.migrationcenter.v1.IListAssetsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.migrationcenter.v1.IAsset>;

Equivalent to listAssets, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListAssetsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.migrationcenter.v1.IAsset>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Asset. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent value for `ListAssetsRequest`.
   */
  // const parent = 'abc123'
  /**
   *  Requested page size. Server may return fewer items than requested.
   *  If unspecified, server will pick an appropriate default.
   */
  // const pageSize = 1234
  /**
   *  A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'
  /**
   *  Filtering results.
   */
  // const filter = 'abc123'
  /**
   *  Field to sort by. See https://google.aip.dev/132#ordering for more details.
   */
  // const orderBy = 'abc123'
  /**
   *  View of the assets. Defaults to BASIC.
   */
  // const view = {}

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callListAssets() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = migrationcenterClient.listAssetsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListAssets();

listAssetsStream(request, options)

listAssetsStream(request?: protos.google.cloud.migrationcenter.v1.IListAssetsRequest, options?: CallOptions): Transform;

Equivalent to listAssets, but returns a NodeJS Stream object.

Parameters
Name Description
request IListAssetsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing Asset on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listAssetsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listErrorFrames(request, options)

listErrorFrames(request?: protos.google.cloud.migrationcenter.v1.IListErrorFramesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.migrationcenter.v1.IErrorFrame[],
        protos.google.cloud.migrationcenter.v1.IListErrorFramesRequest | null,
        protos.google.cloud.migrationcenter.v1.IListErrorFramesResponse
    ]>;

Lists all error frames in a given source and location.

Parameters
Name Description
request IListErrorFramesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.migrationcenter.v1.IErrorFrame[], protos.google.cloud.migrationcenter.v1.IListErrorFramesRequest | null, protos.google.cloud.migrationcenter.v1.IListErrorFramesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of ErrorFrame. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listErrorFramesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listErrorFrames(request, options, callback)

listErrorFrames(request: protos.google.cloud.migrationcenter.v1.IListErrorFramesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.migrationcenter.v1.IListErrorFramesRequest, protos.google.cloud.migrationcenter.v1.IListErrorFramesResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IErrorFrame>): void;
Parameters
Name Description
request IListErrorFramesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.migrationcenter.v1.IListErrorFramesRequest, protos.google.cloud.migrationcenter.v1.IListErrorFramesResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IErrorFrame>
Returns
Type Description
void

listErrorFrames(request, callback)

listErrorFrames(request: protos.google.cloud.migrationcenter.v1.IListErrorFramesRequest, callback: PaginationCallback<protos.google.cloud.migrationcenter.v1.IListErrorFramesRequest, protos.google.cloud.migrationcenter.v1.IListErrorFramesResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IErrorFrame>): void;
Parameters
Name Description
request IListErrorFramesRequest
callback PaginationCallback<protos.google.cloud.migrationcenter.v1.IListErrorFramesRequest, protos.google.cloud.migrationcenter.v1.IListErrorFramesResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IErrorFrame>
Returns
Type Description
void

listErrorFramesAsync(request, options)

listErrorFramesAsync(request?: protos.google.cloud.migrationcenter.v1.IListErrorFramesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.migrationcenter.v1.IErrorFrame>;

Equivalent to listErrorFrames, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListErrorFramesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.migrationcenter.v1.IErrorFrame>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing ErrorFrame. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent value (the source) for `ListErrorFramesRequest`.
   */
  // const parent = 'abc123'
  /**
   *  Requested page size. Server may return fewer items than requested.
   *  If unspecified, server will pick an appropriate default.
   */
  // const pageSize = 1234
  /**
   *  A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. An optional view mode to control the level of details of each
   *  error frame. The default is a BASIC frame view.
   */
  // const view = {}

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callListErrorFrames() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = migrationcenterClient.listErrorFramesAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListErrorFrames();

listErrorFramesStream(request, options)

listErrorFramesStream(request?: protos.google.cloud.migrationcenter.v1.IListErrorFramesRequest, options?: CallOptions): Transform;

Equivalent to listErrorFrames, but returns a NodeJS Stream object.

Parameters
Name Description
request IListErrorFramesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing ErrorFrame on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listErrorFramesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listGroups(request, options)

listGroups(request?: protos.google.cloud.migrationcenter.v1.IListGroupsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.migrationcenter.v1.IGroup[],
        protos.google.cloud.migrationcenter.v1.IListGroupsRequest | null,
        protos.google.cloud.migrationcenter.v1.IListGroupsResponse
    ]>;

Lists all groups in a given project and location.

Parameters
Name Description
request IListGroupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.migrationcenter.v1.IGroup[], protos.google.cloud.migrationcenter.v1.IListGroupsRequest | null, protos.google.cloud.migrationcenter.v1.IListGroupsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of Group. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listGroupsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listGroups(request, options, callback)

listGroups(request: protos.google.cloud.migrationcenter.v1.IListGroupsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.migrationcenter.v1.IListGroupsRequest, protos.google.cloud.migrationcenter.v1.IListGroupsResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IGroup>): void;
Parameters
Name Description
request IListGroupsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.migrationcenter.v1.IListGroupsRequest, protos.google.cloud.migrationcenter.v1.IListGroupsResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IGroup>
Returns
Type Description
void

listGroups(request, callback)

listGroups(request: protos.google.cloud.migrationcenter.v1.IListGroupsRequest, callback: PaginationCallback<protos.google.cloud.migrationcenter.v1.IListGroupsRequest, protos.google.cloud.migrationcenter.v1.IListGroupsResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IGroup>): void;
Parameters
Name Description
request IListGroupsRequest
callback PaginationCallback<protos.google.cloud.migrationcenter.v1.IListGroupsRequest, protos.google.cloud.migrationcenter.v1.IListGroupsResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IGroup>
Returns
Type Description
void

listGroupsAsync(request, options)

listGroupsAsync(request?: protos.google.cloud.migrationcenter.v1.IListGroupsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.migrationcenter.v1.IGroup>;

Equivalent to listGroups, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListGroupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.migrationcenter.v1.IGroup>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Group. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent value for `ListGroupsRequest`.
   */
  // const parent = 'abc123'
  /**
   *  Requested page size. Server may return fewer items than requested.
   *  If unspecified, server will pick an appropriate default.
   */
  // const pageSize = 1234
  /**
   *  A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'
  /**
   *  Filtering results.
   */
  // const filter = 'abc123'
  /**
   *  Field to sort by. See https://google.aip.dev/132#ordering for more details.
   */
  // const orderBy = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callListGroups() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = migrationcenterClient.listGroupsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListGroups();

listGroupsStream(request, options)

listGroupsStream(request?: protos.google.cloud.migrationcenter.v1.IListGroupsRequest, options?: CallOptions): Transform;

Equivalent to listGroups, but returns a NodeJS Stream object.

Parameters
Name Description
request IListGroupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing Group on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listGroupsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listImportDataFiles(request, options)

listImportDataFiles(request?: protos.google.cloud.migrationcenter.v1.IListImportDataFilesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.migrationcenter.v1.IImportDataFile[],
        protos.google.cloud.migrationcenter.v1.IListImportDataFilesRequest | null,
        protos.google.cloud.migrationcenter.v1.IListImportDataFilesResponse
    ]>;

List import data files.

Parameters
Name Description
request IListImportDataFilesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.migrationcenter.v1.IImportDataFile[], protos.google.cloud.migrationcenter.v1.IListImportDataFilesRequest | null, protos.google.cloud.migrationcenter.v1.IListImportDataFilesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listImportDataFilesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listImportDataFiles(request, options, callback)

listImportDataFiles(request: protos.google.cloud.migrationcenter.v1.IListImportDataFilesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.migrationcenter.v1.IListImportDataFilesRequest, protos.google.cloud.migrationcenter.v1.IListImportDataFilesResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IImportDataFile>): void;
Parameters
Name Description
request IListImportDataFilesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.migrationcenter.v1.IListImportDataFilesRequest, protos.google.cloud.migrationcenter.v1.IListImportDataFilesResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IImportDataFile>
Returns
Type Description
void

listImportDataFiles(request, callback)

listImportDataFiles(request: protos.google.cloud.migrationcenter.v1.IListImportDataFilesRequest, callback: PaginationCallback<protos.google.cloud.migrationcenter.v1.IListImportDataFilesRequest, protos.google.cloud.migrationcenter.v1.IListImportDataFilesResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IImportDataFile>): void;
Parameters
Name Description
request IListImportDataFilesRequest
callback PaginationCallback<protos.google.cloud.migrationcenter.v1.IListImportDataFilesRequest, protos.google.cloud.migrationcenter.v1.IListImportDataFilesResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IImportDataFile>
Returns
Type Description
void

listImportDataFilesAsync(request, options)

listImportDataFilesAsync(request?: protos.google.cloud.migrationcenter.v1.IListImportDataFilesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.migrationcenter.v1.IImportDataFile>;

Equivalent to listImportDataFiles, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListImportDataFilesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.migrationcenter.v1.IImportDataFile>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Name of the parent of the `ImportDataFiles` resource.
   */
  // const parent = 'abc123'
  /**
   *  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.
   */
  // const pageSize = 1234
  /**
   *  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.
   */
  // const pageToken = 'abc123'
  /**
   *  Filtering results.
   */
  // const filter = 'abc123'
  /**
   *  Field to sort by. See https://google.aip.dev/132#ordering for more details.
   */
  // const orderBy = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callListImportDataFiles() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = migrationcenterClient.listImportDataFilesAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListImportDataFiles();

listImportDataFilesStream(request, options)

listImportDataFilesStream(request?: protos.google.cloud.migrationcenter.v1.IListImportDataFilesRequest, options?: CallOptions): Transform;

Equivalent to listImportDataFiles, but returns a NodeJS Stream object.

Parameters
Name Description
request IListImportDataFilesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listImportDataFilesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listImportJobs(request, options)

listImportJobs(request?: protos.google.cloud.migrationcenter.v1.IListImportJobsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.migrationcenter.v1.IImportJob[],
        protos.google.cloud.migrationcenter.v1.IListImportJobsRequest | null,
        protos.google.cloud.migrationcenter.v1.IListImportJobsResponse
    ]>;

Lists all import jobs.

Parameters
Name Description
request IListImportJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.migrationcenter.v1.IImportJob[], protos.google.cloud.migrationcenter.v1.IListImportJobsRequest | null, protos.google.cloud.migrationcenter.v1.IListImportJobsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listImportJobsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listImportJobs(request, options, callback)

listImportJobs(request: protos.google.cloud.migrationcenter.v1.IListImportJobsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.migrationcenter.v1.IListImportJobsRequest, protos.google.cloud.migrationcenter.v1.IListImportJobsResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IImportJob>): void;
Parameters
Name Description
request IListImportJobsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.migrationcenter.v1.IListImportJobsRequest, protos.google.cloud.migrationcenter.v1.IListImportJobsResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IImportJob>
Returns
Type Description
void

listImportJobs(request, callback)

listImportJobs(request: protos.google.cloud.migrationcenter.v1.IListImportJobsRequest, callback: PaginationCallback<protos.google.cloud.migrationcenter.v1.IListImportJobsRequest, protos.google.cloud.migrationcenter.v1.IListImportJobsResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IImportJob>): void;
Parameters
Name Description
request IListImportJobsRequest
callback PaginationCallback<protos.google.cloud.migrationcenter.v1.IListImportJobsRequest, protos.google.cloud.migrationcenter.v1.IListImportJobsResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IImportJob>
Returns
Type Description
void

listImportJobsAsync(request, options)

listImportJobsAsync(request?: protos.google.cloud.migrationcenter.v1.IListImportJobsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.migrationcenter.v1.IImportJob>;

Equivalent to listImportJobs, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListImportJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.migrationcenter.v1.IImportJob>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent value for `ListImportJobsRequest`.
   */
  // const parent = 'abc123'
  /**
   *  Requested page size. Server may return fewer items than requested.
   *  If unspecified, server will pick an appropriate default.
   */
  // const pageSize = 1234
  /**
   *  A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'
  /**
   *  Filtering results.
   */
  // const filter = 'abc123'
  /**
   *  Field to sort by. See https://google.aip.dev/132#ordering for more details.
   */
  // const orderBy = 'abc123'
  /**
   *  Optional. The level of details of each import job.
   *  Default value is BASIC.
   */
  // const view = {}

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callListImportJobs() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = migrationcenterClient.listImportJobsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListImportJobs();

listImportJobsStream(request, options)

listImportJobsStream(request?: protos.google.cloud.migrationcenter.v1.IListImportJobsRequest, options?: CallOptions): Transform;

Equivalent to listImportJobs, but returns a NodeJS Stream object.

Parameters
Name Description
request IListImportJobsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listImportJobsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listLocationsAsync(request, options)

listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;

Lists information about the supported locations for this service. Returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request LocationProtos.google.cloud.location.IListLocationsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<google.cloud.location.ILocation>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

const iterable = client.listLocationsAsync(request);
for await (const response of iterable) {
  // process response
}

listOperationsAsync(request, options)

listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.IOperation>;

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. Returns an iterable object.

For-await-of syntax is used with the iterable to recursively get response element on-demand.

Parameters
Name Description
request ListOperationsRequest

The request object that will be sent.

options CallOptions

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

Returns
Type Description
AsyncIterable<protos.google.longrunning.IOperation>

{Object} An iterable Object that conforms to iteration protocols.

Example

const client = longrunning.operationsClient();
for await (const response of client.listOperationsAsync(request));
// doThingsWith(response)

listPreferenceSets(request, options)

listPreferenceSets(request?: protos.google.cloud.migrationcenter.v1.IListPreferenceSetsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.migrationcenter.v1.IPreferenceSet[],
        protos.google.cloud.migrationcenter.v1.IListPreferenceSetsRequest | null,
        protos.google.cloud.migrationcenter.v1.IListPreferenceSetsResponse
    ]>;

Lists all the preference sets in a given project and location.

Parameters
Name Description
request IListPreferenceSetsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.migrationcenter.v1.IPreferenceSet[], protos.google.cloud.migrationcenter.v1.IListPreferenceSetsRequest | null, protos.google.cloud.migrationcenter.v1.IListPreferenceSetsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of PreferenceSet. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listPreferenceSetsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listPreferenceSets(request, options, callback)

listPreferenceSets(request: protos.google.cloud.migrationcenter.v1.IListPreferenceSetsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.migrationcenter.v1.IListPreferenceSetsRequest, protos.google.cloud.migrationcenter.v1.IListPreferenceSetsResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IPreferenceSet>): void;
Parameters
Name Description
request IListPreferenceSetsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.migrationcenter.v1.IListPreferenceSetsRequest, protos.google.cloud.migrationcenter.v1.IListPreferenceSetsResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IPreferenceSet>
Returns
Type Description
void

listPreferenceSets(request, callback)

listPreferenceSets(request: protos.google.cloud.migrationcenter.v1.IListPreferenceSetsRequest, callback: PaginationCallback<protos.google.cloud.migrationcenter.v1.IListPreferenceSetsRequest, protos.google.cloud.migrationcenter.v1.IListPreferenceSetsResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IPreferenceSet>): void;
Parameters
Name Description
request IListPreferenceSetsRequest
callback PaginationCallback<protos.google.cloud.migrationcenter.v1.IListPreferenceSetsRequest, protos.google.cloud.migrationcenter.v1.IListPreferenceSetsResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IPreferenceSet>
Returns
Type Description
void

listPreferenceSetsAsync(request, options)

listPreferenceSetsAsync(request?: protos.google.cloud.migrationcenter.v1.IListPreferenceSetsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.migrationcenter.v1.IPreferenceSet>;

Equivalent to listPreferenceSets, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListPreferenceSetsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.migrationcenter.v1.IPreferenceSet>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing PreferenceSet. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent value for `ListPreferenceSetsRequest`.
   */
  // const parent = 'abc123'
  /**
   *  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.
   */
  // const pageSize = 1234
  /**
   *  A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'
  /**
   *  Field to sort by. See https://google.aip.dev/132#ordering for more details.
   */
  // const orderBy = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callListPreferenceSets() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = migrationcenterClient.listPreferenceSetsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListPreferenceSets();

listPreferenceSetsStream(request, options)

listPreferenceSetsStream(request?: protos.google.cloud.migrationcenter.v1.IListPreferenceSetsRequest, options?: CallOptions): Transform;

Equivalent to listPreferenceSets, but returns a NodeJS Stream object.

Parameters
Name Description
request IListPreferenceSetsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing PreferenceSet on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listPreferenceSetsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listReportConfigs(request, options)

listReportConfigs(request?: protos.google.cloud.migrationcenter.v1.IListReportConfigsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.migrationcenter.v1.IReportConfig[],
        protos.google.cloud.migrationcenter.v1.IListReportConfigsRequest | null,
        protos.google.cloud.migrationcenter.v1.IListReportConfigsResponse
    ]>;

Lists ReportConfigs in a given project and location.

Parameters
Name Description
request IListReportConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.migrationcenter.v1.IReportConfig[], protos.google.cloud.migrationcenter.v1.IListReportConfigsRequest | null, protos.google.cloud.migrationcenter.v1.IListReportConfigsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listReportConfigsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listReportConfigs(request, options, callback)

listReportConfigs(request: protos.google.cloud.migrationcenter.v1.IListReportConfigsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.migrationcenter.v1.IListReportConfigsRequest, protos.google.cloud.migrationcenter.v1.IListReportConfigsResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IReportConfig>): void;
Parameters
Name Description
request IListReportConfigsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.migrationcenter.v1.IListReportConfigsRequest, protos.google.cloud.migrationcenter.v1.IListReportConfigsResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IReportConfig>
Returns
Type Description
void

listReportConfigs(request, callback)

listReportConfigs(request: protos.google.cloud.migrationcenter.v1.IListReportConfigsRequest, callback: PaginationCallback<protos.google.cloud.migrationcenter.v1.IListReportConfigsRequest, protos.google.cloud.migrationcenter.v1.IListReportConfigsResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IReportConfig>): void;
Parameters
Name Description
request IListReportConfigsRequest
callback PaginationCallback<protos.google.cloud.migrationcenter.v1.IListReportConfigsRequest, protos.google.cloud.migrationcenter.v1.IListReportConfigsResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IReportConfig>
Returns
Type Description
void

listReportConfigsAsync(request, options)

listReportConfigsAsync(request?: protos.google.cloud.migrationcenter.v1.IListReportConfigsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.migrationcenter.v1.IReportConfig>;

Equivalent to listReportConfigs, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListReportConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.migrationcenter.v1.IReportConfig>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent value for `ListReportConfigsRequest`.
   */
  // const parent = 'abc123'
  /**
   *  Requested page size. Server may return fewer items than requested.
   *  If unspecified, server will pick an appropriate default.
   */
  // const pageSize = 1234
  /**
   *  A token identifying a page of results the server should return.
   */
  // const pageToken = 'abc123'
  /**
   *  Filtering results.
   */
  // const filter = 'abc123'
  /**
   *  Field to sort by. See https://google.aip.dev/132#ordering for more details.
   */
  // const orderBy = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callListReportConfigs() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = migrationcenterClient.listReportConfigsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListReportConfigs();

listReportConfigsStream(request, options)

listReportConfigsStream(request?: protos.google.cloud.migrationcenter.v1.IListReportConfigsRequest, options?: CallOptions): Transform;

Equivalent to listReportConfigs, but returns a NodeJS Stream object.

Parameters
Name Description
request IListReportConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listReportConfigsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listReports(request, options)

listReports(request?: protos.google.cloud.migrationcenter.v1.IListReportsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.migrationcenter.v1.IReport[],
        protos.google.cloud.migrationcenter.v1.IListReportsRequest | null,
        protos.google.cloud.migrationcenter.v1.IListReportsResponse
    ]>;

Lists Reports in a given ReportConfig.

Parameters
Name Description
request IListReportsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.migrationcenter.v1.IReport[], protos.google.cloud.migrationcenter.v1.IListReportsRequest | null, protos.google.cloud.migrationcenter.v1.IListReportsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listReportsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listReports(request, options, callback)

listReports(request: protos.google.cloud.migrationcenter.v1.IListReportsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.migrationcenter.v1.IListReportsRequest, protos.google.cloud.migrationcenter.v1.IListReportsResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IReport>): void;
Parameters
Name Description
request IListReportsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.migrationcenter.v1.IListReportsRequest, protos.google.cloud.migrationcenter.v1.IListReportsResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IReport>
Returns
Type Description
void

listReports(request, callback)

listReports(request: protos.google.cloud.migrationcenter.v1.IListReportsRequest, callback: PaginationCallback<protos.google.cloud.migrationcenter.v1.IListReportsRequest, protos.google.cloud.migrationcenter.v1.IListReportsResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IReport>): void;
Parameters
Name Description
request IListReportsRequest
callback PaginationCallback<protos.google.cloud.migrationcenter.v1.IListReportsRequest, protos.google.cloud.migrationcenter.v1.IListReportsResponse | null | undefined, protos.google.cloud.migrationcenter.v1.IReport>
Returns
Type Description
void

listReportsAsync(request, options)

listReportsAsync(request?: protos.google.cloud.migrationcenter.v1.IListReportsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.migrationcenter.v1.IReport>;

Equivalent to listReports, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListReportsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.migrationcenter.v1.IReport>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent value for `ListReportsRequest`.
   */
  // const parent = 'abc123'
  /**
   *  Requested page size. The server may return fewer items than requested.
   *  If unspecified, the server will pick an appropriate default value.
   */
  // const pageSize = 1234
  /**
   *  A token identifying a page of results that the server should return.
   */
  // const pageToken = 'abc123'
  /**
   *  Filtering results.
   */
  // const filter = 'abc123'
  /**
   *  Field to sort by. See https://google.aip.dev/132#ordering for more details.
   */
  // const orderBy = 'abc123'
  /**
   *  Determines what information to retrieve for each Report.
   */
  // const view = {}

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callListReports() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = migrationcenterClient.listReportsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListReports();

listReportsStream(request, options)

listReportsStream(request?: protos.google.cloud.migrationcenter.v1.IListReportsRequest, options?: CallOptions): Transform;

Equivalent to listReports, but returns a NodeJS Stream object.

Parameters
Name Description
request IListReportsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listReportsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listSources(request, options)

listSources(request?: protos.google.cloud.migrationcenter.v1.IListSourcesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.migrationcenter.v1.ISource[],
        protos.google.cloud.migrationcenter.v1.IListSourcesRequest | null,
        protos.google.cloud.migrationcenter.v1.IListSourcesResponse
    ]>;

Lists all the sources in a given project and location.

Parameters
Name Description
request IListSourcesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.migrationcenter.v1.ISource[], protos.google.cloud.migrationcenter.v1.IListSourcesRequest | null, protos.google.cloud.migrationcenter.v1.IListSourcesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listSourcesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listSources(request, options, callback)

listSources(request: protos.google.cloud.migrationcenter.v1.IListSourcesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.migrationcenter.v1.IListSourcesRequest, protos.google.cloud.migrationcenter.v1.IListSourcesResponse | null | undefined, protos.google.cloud.migrationcenter.v1.ISource>): void;
Parameters
Name Description
request IListSourcesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.migrationcenter.v1.IListSourcesRequest, protos.google.cloud.migrationcenter.v1.IListSourcesResponse | null | undefined, protos.google.cloud.migrationcenter.v1.ISource>
Returns
Type Description
void

listSources(request, callback)

listSources(request: protos.google.cloud.migrationcenter.v1.IListSourcesRequest, callback: PaginationCallback<protos.google.cloud.migrationcenter.v1.IListSourcesRequest, protos.google.cloud.migrationcenter.v1.IListSourcesResponse | null | undefined, protos.google.cloud.migrationcenter.v1.ISource>): void;
Parameters
Name Description
request IListSourcesRequest
callback PaginationCallback<protos.google.cloud.migrationcenter.v1.IListSourcesRequest, protos.google.cloud.migrationcenter.v1.IListSourcesResponse | null | undefined, protos.google.cloud.migrationcenter.v1.ISource>
Returns
Type Description
void

listSourcesAsync(request, options)

listSourcesAsync(request?: protos.google.cloud.migrationcenter.v1.IListSourcesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.migrationcenter.v1.ISource>;

Equivalent to listSources, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListSourcesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.cloud.migrationcenter.v1.ISource>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent value for `ListSourcesRequest`.
   */
  // const parent = 'abc123'
  /**
   *  Requested page size. The server may return fewer items than requested.
   *  If unspecified, the server will pick an appropriate default value.
   */
  // const pageSize = 1234
  /**
   *  A token identifying a page of results that the server should return.
   */
  // const pageToken = 'abc123'
  /**
   *  Filtering results.
   */
  // const filter = 'abc123'
  /**
   *  Field to sort by. See https://google.aip.dev/132#ordering for more details.
   */
  // const orderBy = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callListSources() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = migrationcenterClient.listSourcesAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListSources();

listSourcesStream(request, options)

listSourcesStream(request?: protos.google.cloud.migrationcenter.v1.IListSourcesRequest, options?: CallOptions): Transform;

Equivalent to listSources, but returns a NodeJS Stream object.

Parameters
Name Description
request IListSourcesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listSourcesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

locationPath(project, location)

locationPath(project: string, location: string): string;

Return a fully-qualified location resource name string.

Parameters
Name Description
project string
location string
Returns
Type Description
string

{string} Resource name string.

matchAssetFromAssetName(assetName)

matchAssetFromAssetName(assetName: string): string | number;

Parse the asset from Asset resource.

Parameter
Name Description
assetName string

A fully-qualified path representing Asset resource.

Returns
Type Description
string | number

{string} A string representing the asset.

matchErrorFrameFromErrorFrameName(errorFrameName)

matchErrorFrameFromErrorFrameName(errorFrameName: string): string | number;

Parse the error_frame from ErrorFrame resource.

Parameter
Name Description
errorFrameName string

A fully-qualified path representing ErrorFrame resource.

Returns
Type Description
string | number

{string} A string representing the error_frame.

matchGroupFromGroupName(groupName)

matchGroupFromGroupName(groupName: string): string | number;

Parse the group from Group resource.

Parameter
Name Description
groupName string

A fully-qualified path representing Group resource.

Returns
Type Description
string | number

{string} A string representing the group.

matchImportDataFileFromImportDataFileName(importDataFileName)

matchImportDataFileFromImportDataFileName(importDataFileName: string): string | number;

Parse the import_data_file from ImportDataFile resource.

Parameter
Name Description
importDataFileName string

A fully-qualified path representing ImportDataFile resource.

Returns
Type Description
string | number

{string} A string representing the import_data_file.

matchImportJobFromImportDataFileName(importDataFileName)

matchImportJobFromImportDataFileName(importDataFileName: string): string | number;

Parse the import_job from ImportDataFile resource.

Parameter
Name Description
importDataFileName string

A fully-qualified path representing ImportDataFile resource.

Returns
Type Description
string | number

{string} A string representing the import_job.

matchImportJobFromImportJobName(importJobName)

matchImportJobFromImportJobName(importJobName: string): string | number;

Parse the import_job from ImportJob resource.

Parameter
Name Description
importJobName string

A fully-qualified path representing ImportJob resource.

Returns
Type Description
string | number

{string} A string representing the import_job.

matchLocationFromAssetName(assetName)

matchLocationFromAssetName(assetName: string): string | number;

Parse the location from Asset resource.

Parameter
Name Description
assetName string

A fully-qualified path representing Asset resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromErrorFrameName(errorFrameName)

matchLocationFromErrorFrameName(errorFrameName: string): string | number;

Parse the location from ErrorFrame resource.

Parameter
Name Description
errorFrameName string

A fully-qualified path representing ErrorFrame resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromGroupName(groupName)

matchLocationFromGroupName(groupName: string): string | number;

Parse the location from Group resource.

Parameter
Name Description
groupName string

A fully-qualified path representing Group resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromImportDataFileName(importDataFileName)

matchLocationFromImportDataFileName(importDataFileName: string): string | number;

Parse the location from ImportDataFile resource.

Parameter
Name Description
importDataFileName string

A fully-qualified path representing ImportDataFile resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromImportJobName(importJobName)

matchLocationFromImportJobName(importJobName: string): string | number;

Parse the location from ImportJob resource.

Parameter
Name Description
importJobName string

A fully-qualified path representing ImportJob resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromLocationName(locationName)

matchLocationFromLocationName(locationName: string): string | number;

Parse the location from Location resource.

Parameter
Name Description
locationName string

A fully-qualified path representing Location resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromPreferenceSetName(preferenceSetName)

matchLocationFromPreferenceSetName(preferenceSetName: string): string | number;

Parse the location from PreferenceSet resource.

Parameter
Name Description
preferenceSetName string

A fully-qualified path representing PreferenceSet resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromReportConfigName(reportConfigName)

matchLocationFromReportConfigName(reportConfigName: string): string | number;

Parse the location from ReportConfig resource.

Parameter
Name Description
reportConfigName string

A fully-qualified path representing ReportConfig resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromReportName(reportName)

matchLocationFromReportName(reportName: string): string | number;

Parse the location from Report resource.

Parameter
Name Description
reportName string

A fully-qualified path representing Report resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromSettingsName(settingsName)

matchLocationFromSettingsName(settingsName: string): string | number;

Parse the location from Settings resource.

Parameter
Name Description
settingsName string

A fully-qualified path representing Settings resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchLocationFromSourceName(sourceName)

matchLocationFromSourceName(sourceName: string): string | number;

Parse the location from Source resource.

Parameter
Name Description
sourceName string

A fully-qualified path representing Source resource.

Returns
Type Description
string | number

{string} A string representing the location.

matchPreferenceSetFromPreferenceSetName(preferenceSetName)

matchPreferenceSetFromPreferenceSetName(preferenceSetName: string): string | number;

Parse the preference_set from PreferenceSet resource.

Parameter
Name Description
preferenceSetName string

A fully-qualified path representing PreferenceSet resource.

Returns
Type Description
string | number

{string} A string representing the preference_set.

matchProjectFromAssetName(assetName)

matchProjectFromAssetName(assetName: string): string | number;

Parse the project from Asset resource.

Parameter
Name Description
assetName string

A fully-qualified path representing Asset resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromErrorFrameName(errorFrameName)

matchProjectFromErrorFrameName(errorFrameName: string): string | number;

Parse the project from ErrorFrame resource.

Parameter
Name Description
errorFrameName string

A fully-qualified path representing ErrorFrame resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromGroupName(groupName)

matchProjectFromGroupName(groupName: string): string | number;

Parse the project from Group resource.

Parameter
Name Description
groupName string

A fully-qualified path representing Group resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromImportDataFileName(importDataFileName)

matchProjectFromImportDataFileName(importDataFileName: string): string | number;

Parse the project from ImportDataFile resource.

Parameter
Name Description
importDataFileName string

A fully-qualified path representing ImportDataFile resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromImportJobName(importJobName)

matchProjectFromImportJobName(importJobName: string): string | number;

Parse the project from ImportJob resource.

Parameter
Name Description
importJobName string

A fully-qualified path representing ImportJob resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromLocationName(locationName)

matchProjectFromLocationName(locationName: string): string | number;

Parse the project from Location resource.

Parameter
Name Description
locationName string

A fully-qualified path representing Location resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromPreferenceSetName(preferenceSetName)

matchProjectFromPreferenceSetName(preferenceSetName: string): string | number;

Parse the project from PreferenceSet resource.

Parameter
Name Description
preferenceSetName string

A fully-qualified path representing PreferenceSet resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromProjectName(projectName)

matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

Parameter
Name Description
projectName string

A fully-qualified path representing Project resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromReportConfigName(reportConfigName)

matchProjectFromReportConfigName(reportConfigName: string): string | number;

Parse the project from ReportConfig resource.

Parameter
Name Description
reportConfigName string

A fully-qualified path representing ReportConfig resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromReportName(reportName)

matchProjectFromReportName(reportName: string): string | number;

Parse the project from Report resource.

Parameter
Name Description
reportName string

A fully-qualified path representing Report resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromSettingsName(settingsName)

matchProjectFromSettingsName(settingsName: string): string | number;

Parse the project from Settings resource.

Parameter
Name Description
settingsName string

A fully-qualified path representing Settings resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchProjectFromSourceName(sourceName)

matchProjectFromSourceName(sourceName: string): string | number;

Parse the project from Source resource.

Parameter
Name Description
sourceName string

A fully-qualified path representing Source resource.

Returns
Type Description
string | number

{string} A string representing the project.

matchReportConfigFromReportConfigName(reportConfigName)

matchReportConfigFromReportConfigName(reportConfigName: string): string | number;

Parse the report_config from ReportConfig resource.

Parameter
Name Description
reportConfigName string

A fully-qualified path representing ReportConfig resource.

Returns
Type Description
string | number

{string} A string representing the report_config.

matchReportConfigFromReportName(reportName)

matchReportConfigFromReportName(reportName: string): string | number;

Parse the report_config from Report resource.

Parameter
Name Description
reportName string

A fully-qualified path representing Report resource.

Returns
Type Description
string | number

{string} A string representing the report_config.

matchReportFromReportName(reportName)

matchReportFromReportName(reportName: string): string | number;

Parse the report from Report resource.

Parameter
Name Description
reportName string

A fully-qualified path representing Report resource.

Returns
Type Description
string | number

{string} A string representing the report.

matchSourceFromErrorFrameName(errorFrameName)

matchSourceFromErrorFrameName(errorFrameName: string): string | number;

Parse the source from ErrorFrame resource.

Parameter
Name Description
errorFrameName string

A fully-qualified path representing ErrorFrame resource.

Returns
Type Description
string | number

{string} A string representing the source.

matchSourceFromSourceName(sourceName)

matchSourceFromSourceName(sourceName: string): string | number;

Parse the source from Source resource.

Parameter
Name Description
sourceName string

A fully-qualified path representing Source resource.

Returns
Type Description
string | number

{string} A string representing the source.

preferenceSetPath(project, location, preferenceSet)

preferenceSetPath(project: string, location: string, preferenceSet: string): string;

Return a fully-qualified preferenceSet resource name string.

Parameters
Name Description
project string
location string
preferenceSet string
Returns
Type Description
string

{string} Resource name string.

projectPath(project)

projectPath(project: string): string;

Return a fully-qualified project resource name string.

Parameter
Name Description
project string
Returns
Type Description
string

{string} Resource name string.

removeAssetsFromGroup(request, options)

removeAssetsFromGroup(request?: protos.google.cloud.migrationcenter.v1.IRemoveAssetsFromGroupRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Removes assets from a group.

Parameters
Name Description
request IRemoveAssetsFromGroupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Group reference.
   */
  // const group = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'
  /**
   *  Required. List of assets to be removed.
   *  The maximum number of assets that can be removed in a single request is
   *  1000.
   */
  // const assets = {}
  /**
   *  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`.
   */
  // const allowMissing = true

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callRemoveAssetsFromGroup() {
    // Construct request
    const request = {
      group,
      assets,
    };

    // Run request
    const [operation] = await migrationcenterClient.removeAssetsFromGroup(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callRemoveAssetsFromGroup();

removeAssetsFromGroup(request, options, callback)

removeAssetsFromGroup(request: protos.google.cloud.migrationcenter.v1.IRemoveAssetsFromGroupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IRemoveAssetsFromGroupRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

removeAssetsFromGroup(request, callback)

removeAssetsFromGroup(request: protos.google.cloud.migrationcenter.v1.IRemoveAssetsFromGroupRequest, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IRemoveAssetsFromGroupRequest
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

reportAssetFrames(request, options)

reportAssetFrames(request?: protos.google.cloud.migrationcenter.v1.IReportAssetFramesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.migrationcenter.v1.IReportAssetFramesResponse,
        (protos.google.cloud.migrationcenter.v1.IReportAssetFramesRequest | undefined),
        {} | undefined
    ]>;

Reports a set of frames.

Parameters
Name Description
request IReportAssetFramesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.migrationcenter.v1.IReportAssetFramesResponse, (protos.google.cloud.migrationcenter.v1.IReportAssetFramesRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing ReportAssetFramesResponse. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Parent of the resource.
   */
  // const parent = 'abc123'
  /**
   *  Collection of frames data.
   */
  // const frames = {}
  /**
   *  Required. Reference to a source.
   */
  // const source = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callReportAssetFrames() {
    // Construct request
    const request = {
      parent,
      source,
    };

    // Run request
    const response = await migrationcenterClient.reportAssetFrames(request);
    console.log(response);
  }

  callReportAssetFrames();

reportAssetFrames(request, options, callback)

reportAssetFrames(request: protos.google.cloud.migrationcenter.v1.IReportAssetFramesRequest, options: CallOptions, callback: Callback<protos.google.cloud.migrationcenter.v1.IReportAssetFramesResponse, protos.google.cloud.migrationcenter.v1.IReportAssetFramesRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IReportAssetFramesRequest
options CallOptions
callback Callback<protos.google.cloud.migrationcenter.v1.IReportAssetFramesResponse, protos.google.cloud.migrationcenter.v1.IReportAssetFramesRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

reportAssetFrames(request, callback)

reportAssetFrames(request: protos.google.cloud.migrationcenter.v1.IReportAssetFramesRequest, callback: Callback<protos.google.cloud.migrationcenter.v1.IReportAssetFramesResponse, protos.google.cloud.migrationcenter.v1.IReportAssetFramesRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IReportAssetFramesRequest
callback Callback<protos.google.cloud.migrationcenter.v1.IReportAssetFramesResponse, protos.google.cloud.migrationcenter.v1.IReportAssetFramesRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

reportConfigPath(project, location, reportConfig)

reportConfigPath(project: string, location: string, reportConfig: string): string;

Return a fully-qualified reportConfig resource name string.

Parameters
Name Description
project string
location string
reportConfig string
Returns
Type Description
string

{string} Resource name string.

reportPath(project, location, reportConfig, report)

reportPath(project: string, location: string, reportConfig: string, report: string): string;

Return a fully-qualified report resource name string.

Parameters
Name Description
project string
location string
reportConfig string
report string
Returns
Type Description
string

{string} Resource name string.

runImportJob(request, options)

runImportJob(request?: protos.google.cloud.migrationcenter.v1.IRunImportJobRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Runs an import job.

Parameters
Name Description
request IRunImportJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the import job to run.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callRunImportJob() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await migrationcenterClient.runImportJob(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callRunImportJob();

runImportJob(request, options, callback)

runImportJob(request: protos.google.cloud.migrationcenter.v1.IRunImportJobRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IRunImportJobRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

runImportJob(request, callback)

runImportJob(request: protos.google.cloud.migrationcenter.v1.IRunImportJobRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IRunImportJobRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

settingsPath(project, location)

settingsPath(project: string, location: string): string;

Return a fully-qualified settings resource name string.

Parameters
Name Description
project string
location string
Returns
Type Description
string

{string} Resource name string.

sourcePath(project, location, source)

sourcePath(project: string, location: string, source: string): string;

Return a fully-qualified source resource name string.

Parameters
Name Description
project string
location string
source string
Returns
Type Description
string

{string} Resource name string.

updateAsset(request, options)

updateAsset(request?: protos.google.cloud.migrationcenter.v1.IUpdateAssetRequest, options?: CallOptions): Promise<[
        protos.google.cloud.migrationcenter.v1.IAsset,
        protos.google.cloud.migrationcenter.v1.IUpdateAssetRequest | undefined,
        {} | undefined
    ]>;

Updates the parameters of an asset.

Parameters
Name Description
request IUpdateAssetRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.cloud.migrationcenter.v1.IAsset, protos.google.cloud.migrationcenter.v1.IUpdateAssetRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Asset. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  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.
   */
  // const updateMask = {}
  /**
   *  Required. The resource being updated.
   */
  // const asset = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callUpdateAsset() {
    // Construct request
    const request = {
      updateMask,
      asset,
    };

    // Run request
    const response = await migrationcenterClient.updateAsset(request);
    console.log(response);
  }

  callUpdateAsset();

updateAsset(request, options, callback)

updateAsset(request: protos.google.cloud.migrationcenter.v1.IUpdateAssetRequest, options: CallOptions, callback: Callback<protos.google.cloud.migrationcenter.v1.IAsset, protos.google.cloud.migrationcenter.v1.IUpdateAssetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateAssetRequest
options CallOptions
callback Callback<protos.google.cloud.migrationcenter.v1.IAsset, protos.google.cloud.migrationcenter.v1.IUpdateAssetRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateAsset(request, callback)

updateAsset(request: protos.google.cloud.migrationcenter.v1.IUpdateAssetRequest, callback: Callback<protos.google.cloud.migrationcenter.v1.IAsset, protos.google.cloud.migrationcenter.v1.IUpdateAssetRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateAssetRequest
callback Callback<protos.google.cloud.migrationcenter.v1.IAsset, protos.google.cloud.migrationcenter.v1.IUpdateAssetRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateGroup(request, options)

updateGroup(request?: protos.google.cloud.migrationcenter.v1.IUpdateGroupRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a group.

Parameters
Name Description
request IUpdateGroupRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  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.
   */
  // const updateMask = {}
  /**
   *  Required. The group resource being updated.
   */
  // const group = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callUpdateGroup() {
    // Construct request
    const request = {
      updateMask,
      group,
    };

    // Run request
    const [operation] = await migrationcenterClient.updateGroup(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateGroup();

updateGroup(request, options, callback)

updateGroup(request: protos.google.cloud.migrationcenter.v1.IUpdateGroupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateGroupRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateGroup(request, callback)

updateGroup(request: protos.google.cloud.migrationcenter.v1.IUpdateGroupRequest, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateGroupRequest
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.IGroup, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateImportJob(request, options)

updateImportJob(request?: protos.google.cloud.migrationcenter.v1.IUpdateImportJobRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.migrationcenter.v1.IImportJob, protos.google.cloud.migrationcenter.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates an import job.

Parameters
Name Description
request IUpdateImportJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.migrationcenter.v1.IImportJob, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  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.
   */
  // const updateMask = {}
  /**
   *  Required. The resource being updated
   */
  // const importJob = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callUpdateImportJob() {
    // Construct request
    const request = {
      updateMask,
      importJob,
    };

    // Run request
    const [operation] = await migrationcenterClient.updateImportJob(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateImportJob();

updateImportJob(request, options, callback)

updateImportJob(request: protos.google.cloud.migrationcenter.v1.IUpdateImportJobRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.IImportJob, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateImportJobRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.IImportJob, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateImportJob(request, callback)

updateImportJob(request: protos.google.cloud.migrationcenter.v1.IUpdateImportJobRequest, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.IImportJob, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateImportJobRequest
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.IImportJob, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updatePreferenceSet(request, options)

updatePreferenceSet(request?: protos.google.cloud.migrationcenter.v1.IUpdatePreferenceSetRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.migrationcenter.v1.IPreferenceSet, protos.google.cloud.migrationcenter.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a preference set.

Parameters
Name Description
request IUpdatePreferenceSetRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.migrationcenter.v1.IPreferenceSet, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  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.
   */
  // const updateMask = {}
  /**
   *  Required. The preference set resource being updated.
   */
  // const preferenceSet = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callUpdatePreferenceSet() {
    // Construct request
    const request = {
      updateMask,
      preferenceSet,
    };

    // Run request
    const [operation] = await migrationcenterClient.updatePreferenceSet(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdatePreferenceSet();

updatePreferenceSet(request, options, callback)

updatePreferenceSet(request: protos.google.cloud.migrationcenter.v1.IUpdatePreferenceSetRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.IPreferenceSet, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdatePreferenceSetRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.IPreferenceSet, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updatePreferenceSet(request, callback)

updatePreferenceSet(request: protos.google.cloud.migrationcenter.v1.IUpdatePreferenceSetRequest, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.IPreferenceSet, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdatePreferenceSetRequest
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.IPreferenceSet, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateSettings(request, options)

updateSettings(request?: protos.google.cloud.migrationcenter.v1.IUpdateSettingsRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.migrationcenter.v1.ISettings, protos.google.cloud.migrationcenter.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the regional-level project settings.

Parameters
Name Description
request IUpdateSettingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.migrationcenter.v1.ISettings, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  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.
   */
  // const updateMask = {}
  /**
   *  Required. The project settings resource being updated.
   */
  // const settings = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callUpdateSettings() {
    // Construct request
    const request = {
      updateMask,
      settings,
    };

    // Run request
    const [operation] = await migrationcenterClient.updateSettings(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateSettings();

updateSettings(request, options, callback)

updateSettings(request: protos.google.cloud.migrationcenter.v1.IUpdateSettingsRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.ISettings, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateSettingsRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.ISettings, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateSettings(request, callback)

updateSettings(request: protos.google.cloud.migrationcenter.v1.IUpdateSettingsRequest, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.ISettings, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateSettingsRequest
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.ISettings, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateSource(request, options)

updateSource(request?: protos.google.cloud.migrationcenter.v1.IUpdateSourceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.migrationcenter.v1.ISource, protos.google.cloud.migrationcenter.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the parameters of a source.

Parameters
Name Description
request IUpdateSourceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.cloud.migrationcenter.v1.ISource, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  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.
   */
  // const updateMask = {}
  /**
   *  Required. The resource being updated
   */
  // const source = {}
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callUpdateSource() {
    // Construct request
    const request = {
      updateMask,
      source,
    };

    // Run request
    const [operation] = await migrationcenterClient.updateSource(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateSource();

updateSource(request, options, callback)

updateSource(request: protos.google.cloud.migrationcenter.v1.IUpdateSourceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.ISource, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateSourceRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.ISource, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateSource(request, callback)

updateSource(request: protos.google.cloud.migrationcenter.v1.IUpdateSourceRequest, callback: Callback<LROperation<protos.google.cloud.migrationcenter.v1.ISource, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateSourceRequest
callback Callback<LROperation<protos.google.cloud.migrationcenter.v1.ISource, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

validateImportJob(request, options)

validateImportJob(request?: protos.google.cloud.migrationcenter.v1.IValidateImportJobRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Validates an import job.

Parameters
Name Description
request IValidateImportJobRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the import job to validate.
   */
  // const name = 'abc123'
  /**
   *  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).
   */
  // const requestId = 'abc123'

  // Imports the Migrationcenter library
  const {MigrationCenterClient} = require('@google-cloud/migrationcenter').v1;

  // Instantiates a client
  const migrationcenterClient = new MigrationCenterClient();

  async function callValidateImportJob() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await migrationcenterClient.validateImportJob(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callValidateImportJob();

validateImportJob(request, options, callback)

validateImportJob(request: protos.google.cloud.migrationcenter.v1.IValidateImportJobRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IValidateImportJobRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

validateImportJob(request, callback)

validateImportJob(request: protos.google.cloud.migrationcenter.v1.IValidateImportJobRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IValidateImportJobRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.migrationcenter.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void