All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.vmmigration.v1.VmMigrationClient Maven / Gradle / Ivy

Go to download

VM Migration helps customers migrating VMs to GCP at no additional cost, as well as an extensive ecosystem of partners to help with discovery and assessment, planning, migration, special use cases, and more.

There is a newer version: 1.54.0
Show newest version
/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.cloud.vmmigration.v1;

import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.httpjson.longrunning.OperationsClient;
import com.google.api.gax.longrunning.OperationFuture;
import com.google.api.gax.paging.AbstractFixedSizeCollection;
import com.google.api.gax.paging.AbstractPage;
import com.google.api.gax.paging.AbstractPagedListResponse;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.PageContext;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
import com.google.cloud.location.Location;
import com.google.cloud.vmmigration.v1.stub.VmMigrationStub;
import com.google.cloud.vmmigration.v1.stub.VmMigrationStubSettings;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import com.google.protobuf.FieldMask;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
 * Service Description: VM Migration Service
 *
 * 

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * *

{@code
 * // 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.
 * // - It may require specifying regional endpoints when creating the service client as shown in
 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
 *   SourceName name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
 *   Source response = vmMigrationClient.getSource(name);
 * }
 * }
* *

Note: close() needs to be called on the VmMigrationClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Methods
MethodDescriptionMethod Variants

ListSources

Lists Sources in a given project and location.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • listSources(ListSourcesRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • listSources(LocationName parent) *

  • listSources(String parent) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • listSourcesPagedCallable() *

  • listSourcesCallable() *

*

GetSource

Gets details of a single Source.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • getSource(GetSourceRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • getSource(SourceName name) *

  • getSource(String name) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • getSourceCallable() *

*

CreateSource

Creates a new Source in a given project and location.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • createSourceAsync(CreateSourceRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • createSourceAsync(LocationName parent, Source source, String sourceId) *

  • createSourceAsync(String parent, Source source, String sourceId) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • createSourceOperationCallable() *

  • createSourceCallable() *

*

UpdateSource

Updates the parameters of a single Source.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • updateSourceAsync(UpdateSourceRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • updateSourceAsync(Source source, FieldMask updateMask) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • updateSourceOperationCallable() *

  • updateSourceCallable() *

*

DeleteSource

Deletes a single Source.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • deleteSourceAsync(DeleteSourceRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • deleteSourceAsync(SourceName name) *

  • deleteSourceAsync(String name) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • deleteSourceOperationCallable() *

  • deleteSourceCallable() *

*

FetchInventory

List remote source's inventory of VMs. The remote source is the onprem vCenter (remote in the sense it's not in Compute Engine). The inventory describes the list of existing VMs in that source. Note that this operation lists the VMs on the remote source, as opposed to listing the MigratingVms resources in the vmmigration service.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • fetchInventory(FetchInventoryRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • fetchInventory(SourceName source) *

  • fetchInventory(String source) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • fetchInventoryCallable() *

*

ListUtilizationReports

Lists Utilization Reports of the given Source.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • listUtilizationReports(ListUtilizationReportsRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • listUtilizationReports(SourceName parent) *

  • listUtilizationReports(String parent) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • listUtilizationReportsPagedCallable() *

  • listUtilizationReportsCallable() *

*

GetUtilizationReport

Gets a single Utilization Report.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • getUtilizationReport(GetUtilizationReportRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • getUtilizationReport(UtilizationReportName name) *

  • getUtilizationReport(String name) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • getUtilizationReportCallable() *

*

CreateUtilizationReport

Creates a new UtilizationReport.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • createUtilizationReportAsync(CreateUtilizationReportRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • createUtilizationReportAsync(SourceName parent, UtilizationReport utilizationReport, String utilizationReportId) *

  • createUtilizationReportAsync(String parent, UtilizationReport utilizationReport, String utilizationReportId) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • createUtilizationReportOperationCallable() *

  • createUtilizationReportCallable() *

*

DeleteUtilizationReport

Deletes a single Utilization Report.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • deleteUtilizationReportAsync(DeleteUtilizationReportRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • deleteUtilizationReportAsync(UtilizationReportName name) *

  • deleteUtilizationReportAsync(String name) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • deleteUtilizationReportOperationCallable() *

  • deleteUtilizationReportCallable() *

*

ListDatacenterConnectors

Lists DatacenterConnectors in a given Source.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • listDatacenterConnectors(ListDatacenterConnectorsRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • listDatacenterConnectors(SourceName parent) *

  • listDatacenterConnectors(String parent) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • listDatacenterConnectorsPagedCallable() *

  • listDatacenterConnectorsCallable() *

*

GetDatacenterConnector

Gets details of a single DatacenterConnector.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • getDatacenterConnector(GetDatacenterConnectorRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • getDatacenterConnector(DatacenterConnectorName name) *

  • getDatacenterConnector(String name) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • getDatacenterConnectorCallable() *

*

CreateDatacenterConnector

Creates a new DatacenterConnector in a given Source.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • createDatacenterConnectorAsync(CreateDatacenterConnectorRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • createDatacenterConnectorAsync(SourceName parent, DatacenterConnector datacenterConnector, String datacenterConnectorId) *

  • createDatacenterConnectorAsync(String parent, DatacenterConnector datacenterConnector, String datacenterConnectorId) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • createDatacenterConnectorOperationCallable() *

  • createDatacenterConnectorCallable() *

*

DeleteDatacenterConnector

Deletes a single DatacenterConnector.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • deleteDatacenterConnectorAsync(DeleteDatacenterConnectorRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • deleteDatacenterConnectorAsync(DatacenterConnectorName name) *

  • deleteDatacenterConnectorAsync(String name) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • deleteDatacenterConnectorOperationCallable() *

  • deleteDatacenterConnectorCallable() *

*

UpgradeAppliance

Upgrades the appliance relate to this DatacenterConnector to the in-place updateable version.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • upgradeApplianceAsync(UpgradeApplianceRequest request) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • upgradeApplianceOperationCallable() *

  • upgradeApplianceCallable() *

*

CreateMigratingVm

Creates a new MigratingVm in a given Source.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • createMigratingVmAsync(CreateMigratingVmRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • createMigratingVmAsync(SourceName parent, MigratingVm migratingVm, String migratingVmId) *

  • createMigratingVmAsync(String parent, MigratingVm migratingVm, String migratingVmId) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • createMigratingVmOperationCallable() *

  • createMigratingVmCallable() *

*

ListMigratingVms

Lists MigratingVms in a given Source.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • listMigratingVms(ListMigratingVmsRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • listMigratingVms(SourceName parent) *

  • listMigratingVms(String parent) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • listMigratingVmsPagedCallable() *

  • listMigratingVmsCallable() *

*

GetMigratingVm

Gets details of a single MigratingVm.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • getMigratingVm(GetMigratingVmRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • getMigratingVm(MigratingVmName name) *

  • getMigratingVm(String name) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • getMigratingVmCallable() *

*

UpdateMigratingVm

Updates the parameters of a single MigratingVm.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • updateMigratingVmAsync(UpdateMigratingVmRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • updateMigratingVmAsync(MigratingVm migratingVm, FieldMask updateMask) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • updateMigratingVmOperationCallable() *

  • updateMigratingVmCallable() *

*

DeleteMigratingVm

Deletes a single MigratingVm.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • deleteMigratingVmAsync(DeleteMigratingVmRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • deleteMigratingVmAsync(MigratingVmName name) *

  • deleteMigratingVmAsync(String name) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • deleteMigratingVmOperationCallable() *

  • deleteMigratingVmCallable() *

*

StartMigration

Starts migration for a VM. Starts the process of uploading data and creating snapshots, in replication cycles scheduled by the policy.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • startMigrationAsync(StartMigrationRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • startMigrationAsync(MigratingVmName migratingVm) *

  • startMigrationAsync(String migratingVm) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • startMigrationOperationCallable() *

  • startMigrationCallable() *

*

ResumeMigration

Resumes a migration for a VM. When called on a paused migration, will start the process of uploading data and creating snapshots; when called on a completed cut-over migration, will update the migration to active state and start the process of uploading data and creating snapshots.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • resumeMigrationAsync(ResumeMigrationRequest request) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • resumeMigrationOperationCallable() *

  • resumeMigrationCallable() *

*

PauseMigration

Pauses a migration for a VM. If cycle tasks are running they will be cancelled, preserving source task data. Further replication cycles will not be triggered while the VM is paused.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • pauseMigrationAsync(PauseMigrationRequest request) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • pauseMigrationOperationCallable() *

  • pauseMigrationCallable() *

*

FinalizeMigration

Marks a migration as completed, deleting migration resources that are no longer being used. Only applicable after cutover is done.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • finalizeMigrationAsync(FinalizeMigrationRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • finalizeMigrationAsync(MigratingVmName migratingVm) *

  • finalizeMigrationAsync(String migratingVm) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • finalizeMigrationOperationCallable() *

  • finalizeMigrationCallable() *

*

CreateCloneJob

Initiates a Clone of a specific migrating VM.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • createCloneJobAsync(CreateCloneJobRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • createCloneJobAsync(MigratingVmName parent, CloneJob cloneJob, String cloneJobId) *

  • createCloneJobAsync(String parent, CloneJob cloneJob, String cloneJobId) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • createCloneJobOperationCallable() *

  • createCloneJobCallable() *

*

CancelCloneJob

Initiates the cancellation of a running clone job.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • cancelCloneJobAsync(CancelCloneJobRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • cancelCloneJobAsync(CloneJobName name) *

  • cancelCloneJobAsync(String name) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • cancelCloneJobOperationCallable() *

  • cancelCloneJobCallable() *

*

ListCloneJobs

Lists CloneJobs of a given migrating VM.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • listCloneJobs(ListCloneJobsRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • listCloneJobs(MigratingVmName parent) *

  • listCloneJobs(String parent) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • listCloneJobsPagedCallable() *

  • listCloneJobsCallable() *

*

GetCloneJob

Gets details of a single CloneJob.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • getCloneJob(GetCloneJobRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • getCloneJob(CloneJobName name) *

  • getCloneJob(String name) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • getCloneJobCallable() *

*

CreateCutoverJob

Initiates a Cutover of a specific migrating VM. The returned LRO is completed when the cutover job resource is created and the job is initiated.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • createCutoverJobAsync(CreateCutoverJobRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • createCutoverJobAsync(MigratingVmName parent, CutoverJob cutoverJob, String cutoverJobId) *

  • createCutoverJobAsync(String parent, CutoverJob cutoverJob, String cutoverJobId) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • createCutoverJobOperationCallable() *

  • createCutoverJobCallable() *

*

CancelCutoverJob

Initiates the cancellation of a running cutover job.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • cancelCutoverJobAsync(CancelCutoverJobRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • cancelCutoverJobAsync(CutoverJobName name) *

  • cancelCutoverJobAsync(String name) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • cancelCutoverJobOperationCallable() *

  • cancelCutoverJobCallable() *

*

ListCutoverJobs

Lists CutoverJobs of a given migrating VM.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • listCutoverJobs(ListCutoverJobsRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • listCutoverJobs(MigratingVmName parent) *

  • listCutoverJobs(String parent) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • listCutoverJobsPagedCallable() *

  • listCutoverJobsCallable() *

*

GetCutoverJob

Gets details of a single CutoverJob.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • getCutoverJob(GetCutoverJobRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • getCutoverJob(CutoverJobName name) *

  • getCutoverJob(String name) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • getCutoverJobCallable() *

*

ListGroups

Lists Groups in a given project and location.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • listGroups(ListGroupsRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • listGroups(LocationName parent) *

  • listGroups(String parent) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • listGroupsPagedCallable() *

  • listGroupsCallable() *

*

GetGroup

Gets details of a single Group.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • getGroup(GetGroupRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • getGroup(GroupName name) *

  • getGroup(String name) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • getGroupCallable() *

*

CreateGroup

Creates a new Group in a given project and location.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • createGroupAsync(CreateGroupRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • createGroupAsync(LocationName parent, Group group, String groupId) *

  • createGroupAsync(String parent, Group group, String groupId) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • createGroupOperationCallable() *

  • createGroupCallable() *

*

UpdateGroup

Updates the parameters of a single Group.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • updateGroupAsync(UpdateGroupRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • updateGroupAsync(Group group, FieldMask updateMask) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • updateGroupOperationCallable() *

  • updateGroupCallable() *

*

DeleteGroup

Deletes a single Group.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • deleteGroupAsync(DeleteGroupRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • deleteGroupAsync(GroupName name) *

  • deleteGroupAsync(String name) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • deleteGroupOperationCallable() *

  • deleteGroupCallable() *

*

AddGroupMigration

Adds a MigratingVm to a Group.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • addGroupMigrationAsync(AddGroupMigrationRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • addGroupMigrationAsync(GroupName group) *

  • addGroupMigrationAsync(String group) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • addGroupMigrationOperationCallable() *

  • addGroupMigrationCallable() *

*

RemoveGroupMigration

Removes a MigratingVm from a Group.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • removeGroupMigrationAsync(RemoveGroupMigrationRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • removeGroupMigrationAsync(GroupName group) *

  • removeGroupMigrationAsync(String group) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • removeGroupMigrationOperationCallable() *

  • removeGroupMigrationCallable() *

*

ListTargetProjects

Lists TargetProjects in a given project. *

NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • listTargetProjects(ListTargetProjectsRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • listTargetProjects(LocationName parent) *

  • listTargetProjects(String parent) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • listTargetProjectsPagedCallable() *

  • listTargetProjectsCallable() *

*

GetTargetProject

Gets details of a single TargetProject. *

NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • getTargetProject(GetTargetProjectRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • getTargetProject(TargetProjectName name) *

  • getTargetProject(String name) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • getTargetProjectCallable() *

*

CreateTargetProject

Creates a new TargetProject in a given project. *

NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • createTargetProjectAsync(CreateTargetProjectRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • createTargetProjectAsync(LocationName parent, TargetProject targetProject, String targetProjectId) *

  • createTargetProjectAsync(String parent, TargetProject targetProject, String targetProjectId) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • createTargetProjectOperationCallable() *

  • createTargetProjectCallable() *

*

UpdateTargetProject

Updates the parameters of a single TargetProject. *

NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • updateTargetProjectAsync(UpdateTargetProjectRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • updateTargetProjectAsync(TargetProject targetProject, FieldMask updateMask) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • updateTargetProjectOperationCallable() *

  • updateTargetProjectCallable() *

*

DeleteTargetProject

Deletes a single TargetProject. *

NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • deleteTargetProjectAsync(DeleteTargetProjectRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • deleteTargetProjectAsync(TargetProjectName name) *

  • deleteTargetProjectAsync(String name) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • deleteTargetProjectOperationCallable() *

  • deleteTargetProjectCallable() *

*

ListReplicationCycles

Lists ReplicationCycles in a given MigratingVM.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • listReplicationCycles(ListReplicationCyclesRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • listReplicationCycles(MigratingVmName parent) *

  • listReplicationCycles(String parent) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • listReplicationCyclesPagedCallable() *

  • listReplicationCyclesCallable() *

*

GetReplicationCycle

Gets details of a single ReplicationCycle.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • getReplicationCycle(GetReplicationCycleRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • getReplicationCycle(ReplicationCycleName name) *

  • getReplicationCycle(String name) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • getReplicationCycleCallable() *

*

ListLocations

Lists information about the supported locations for this service.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • listLocations(ListLocationsRequest request) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • listLocationsPagedCallable() *

  • listLocationsCallable() *

*

GetLocation

Gets information about a location.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • getLocation(GetLocationRequest request) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • getLocationCallable() *

*
* *

See the individual methods for example code. * *

Many parameters require resource names to be formatted in a particular way. To assist with * these names, this class includes a format method for each type of name, and additionally a parse * method to extract the individual identifiers contained within names that are returned. * *

This class can be customized by passing in a custom instance of VmMigrationSettings to * create(). For example: * *

To customize credentials: * *

{@code
 * // 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.
 * // - It may require specifying regional endpoints when creating the service client as shown in
 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 * VmMigrationSettings vmMigrationSettings =
 *     VmMigrationSettings.newBuilder()
 *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
 *         .build();
 * VmMigrationClient vmMigrationClient = VmMigrationClient.create(vmMigrationSettings);
 * }
* *

To customize the endpoint: * *

{@code
 * // 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.
 * // - It may require specifying regional endpoints when creating the service client as shown in
 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 * VmMigrationSettings vmMigrationSettings =
 *     VmMigrationSettings.newBuilder().setEndpoint(myEndpoint).build();
 * VmMigrationClient vmMigrationClient = VmMigrationClient.create(vmMigrationSettings);
 * }
* *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over * the wire: * *

{@code
 * // 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.
 * // - It may require specifying regional endpoints when creating the service client as shown in
 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 * VmMigrationSettings vmMigrationSettings = VmMigrationSettings.newHttpJsonBuilder().build();
 * VmMigrationClient vmMigrationClient = VmMigrationClient.create(vmMigrationSettings);
 * }
* *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ @Generated("by gapic-generator-java") public class VmMigrationClient implements BackgroundResource { private final VmMigrationSettings settings; private final VmMigrationStub stub; private final OperationsClient httpJsonOperationsClient; private final com.google.longrunning.OperationsClient operationsClient; /** Constructs an instance of VmMigrationClient with default settings. */ public static final VmMigrationClient create() throws IOException { return create(VmMigrationSettings.newBuilder().build()); } /** * Constructs an instance of VmMigrationClient, using the given settings. The channels are created * based on the settings passed in, or defaults for any settings that are not set. */ public static final VmMigrationClient create(VmMigrationSettings settings) throws IOException { return new VmMigrationClient(settings); } /** * Constructs an instance of VmMigrationClient, using the given stub for making calls. This is for * advanced usage - prefer using create(VmMigrationSettings). */ public static final VmMigrationClient create(VmMigrationStub stub) { return new VmMigrationClient(stub); } /** * Constructs an instance of VmMigrationClient, using the given settings. This is protected so * that it is easy to make a subclass, but otherwise, the static factory methods should be * preferred. */ protected VmMigrationClient(VmMigrationSettings settings) throws IOException { this.settings = settings; this.stub = ((VmMigrationStubSettings) settings.getStubSettings()).createStub(); this.operationsClient = com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); } protected VmMigrationClient(VmMigrationStub stub) { this.settings = null; this.stub = stub; this.operationsClient = com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); } public final VmMigrationSettings getSettings() { return settings; } public VmMigrationStub getStub() { return stub; } /** * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */ public final com.google.longrunning.OperationsClient getOperationsClient() { return operationsClient; } /** * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */ @BetaApi public final OperationsClient getHttpJsonOperationsClient() { return httpJsonOperationsClient; } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Sources in a given project and location. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   *   for (Source element : vmMigrationClient.listSources(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The parent, which owns this collection of sources. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSourcesPagedResponse listSources(LocationName parent) { ListSourcesRequest request = ListSourcesRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listSources(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Sources in a given project and location. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   *   for (Source element : vmMigrationClient.listSources(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The parent, which owns this collection of sources. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSourcesPagedResponse listSources(String parent) { ListSourcesRequest request = ListSourcesRequest.newBuilder().setParent(parent).build(); return listSources(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Sources in a given project and location. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListSourcesRequest request =
   *       ListSourcesRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   for (Source element : vmMigrationClient.listSources(request).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListSourcesPagedResponse listSources(ListSourcesRequest request) { return listSourcesPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Sources in a given project and location. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListSourcesRequest request =
   *       ListSourcesRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   ApiFuture future = vmMigrationClient.listSourcesPagedCallable().futureCall(request);
   *   // Do something.
   *   for (Source element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listSourcesPagedCallable() { return stub.listSourcesPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Sources in a given project and location. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListSourcesRequest request =
   *       ListSourcesRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   while (true) {
   *     ListSourcesResponse response = vmMigrationClient.listSourcesCallable().call(request);
   *     for (Source element : response.getSourcesList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listSourcesCallable() { return stub.listSourcesCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   SourceName name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
   *   Source response = vmMigrationClient.getSource(name);
   * }
   * }
* * @param name Required. The Source name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Source getSource(SourceName name) { GetSourceRequest request = GetSourceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getSource(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString();
   *   Source response = vmMigrationClient.getSource(name);
   * }
   * }
* * @param name Required. The Source name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Source getSource(String name) { GetSourceRequest request = GetSourceRequest.newBuilder().setName(name).build(); return getSource(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   GetSourceRequest request =
   *       GetSourceRequest.newBuilder()
   *           .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .build();
   *   Source response = vmMigrationClient.getSource(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Source getSource(GetSourceRequest request) { return getSourceCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   GetSourceRequest request =
   *       GetSourceRequest.newBuilder()
   *           .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .build();
   *   ApiFuture future = vmMigrationClient.getSourceCallable().futureCall(request);
   *   // Do something.
   *   Source response = future.get();
   * }
   * }
*/ public final UnaryCallable getSourceCallable() { return stub.getSourceCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Source in a given project and location. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   *   Source source = Source.newBuilder().build();
   *   String sourceId = "sourceId1746327190";
   *   Source response = vmMigrationClient.createSourceAsync(parent, source, sourceId).get();
   * }
   * }
* * @param parent Required. The Source's parent. * @param source Required. The create request body. * @param sourceId Required. The source identifier. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createSourceAsync( LocationName parent, Source source, String sourceId) { CreateSourceRequest request = CreateSourceRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setSource(source) .setSourceId(sourceId) .build(); return createSourceAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Source in a given project and location. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   *   Source source = Source.newBuilder().build();
   *   String sourceId = "sourceId1746327190";
   *   Source response = vmMigrationClient.createSourceAsync(parent, source, sourceId).get();
   * }
   * }
* * @param parent Required. The Source's parent. * @param source Required. The create request body. * @param sourceId Required. The source identifier. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createSourceAsync( String parent, Source source, String sourceId) { CreateSourceRequest request = CreateSourceRequest.newBuilder() .setParent(parent) .setSource(source) .setSourceId(sourceId) .build(); return createSourceAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Source in a given project and location. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CreateSourceRequest request =
   *       CreateSourceRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setSourceId("sourceId1746327190")
   *           .setSource(Source.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   Source response = vmMigrationClient.createSourceAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createSourceAsync( CreateSourceRequest request) { return createSourceOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Source in a given project and location. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CreateSourceRequest request =
   *       CreateSourceRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setSourceId("sourceId1746327190")
   *           .setSource(Source.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.createSourceOperationCallable().futureCall(request);
   *   // Do something.
   *   Source response = future.get();
   * }
   * }
*/ public final OperationCallable createSourceOperationCallable() { return stub.createSourceOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Source in a given project and location. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CreateSourceRequest request =
   *       CreateSourceRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setSourceId("sourceId1746327190")
   *           .setSource(Source.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future = vmMigrationClient.createSourceCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable createSourceCallable() { return stub.createSourceCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   Source source = Source.newBuilder().build();
   *   FieldMask updateMask = FieldMask.newBuilder().build();
   *   Source response = vmMigrationClient.updateSourceAsync(source, updateMask).get();
   * }
   * }
* * @param source Required. The update request body. * @param updateMask Field mask is used to specify the fields to be overwritten in the Source * resource by the update. The fields 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. If the * user does not provide a mask then all fields will be overwritten. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateSourceAsync( Source source, FieldMask updateMask) { UpdateSourceRequest request = UpdateSourceRequest.newBuilder().setSource(source).setUpdateMask(updateMask).build(); return updateSourceAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   UpdateSourceRequest request =
   *       UpdateSourceRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setSource(Source.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   Source response = vmMigrationClient.updateSourceAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateSourceAsync( UpdateSourceRequest request) { return updateSourceOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   UpdateSourceRequest request =
   *       UpdateSourceRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setSource(Source.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.updateSourceOperationCallable().futureCall(request);
   *   // Do something.
   *   Source response = future.get();
   * }
   * }
*/ public final OperationCallable updateSourceOperationCallable() { return stub.updateSourceOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   UpdateSourceRequest request =
   *       UpdateSourceRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setSource(Source.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future = vmMigrationClient.updateSourceCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable updateSourceCallable() { return stub.updateSourceCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   SourceName name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
   *   vmMigrationClient.deleteSourceAsync(name).get();
   * }
   * }
* * @param name Required. The Source name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteSourceAsync(SourceName name) { DeleteSourceRequest request = DeleteSourceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return deleteSourceAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString();
   *   vmMigrationClient.deleteSourceAsync(name).get();
   * }
   * }
* * @param name Required. The Source name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteSourceAsync(String name) { DeleteSourceRequest request = DeleteSourceRequest.newBuilder().setName(name).build(); return deleteSourceAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   DeleteSourceRequest request =
   *       DeleteSourceRequest.newBuilder()
   *           .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   vmMigrationClient.deleteSourceAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteSourceAsync( DeleteSourceRequest request) { return deleteSourceOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   DeleteSourceRequest request =
   *       DeleteSourceRequest.newBuilder()
   *           .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.deleteSourceOperationCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final OperationCallable deleteSourceOperationCallable() { return stub.deleteSourceOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   DeleteSourceRequest request =
   *       DeleteSourceRequest.newBuilder()
   *           .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future = vmMigrationClient.deleteSourceCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteSourceCallable() { return stub.deleteSourceCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * List remote source's inventory of VMs. The remote source is the onprem vCenter (remote in the * sense it's not in Compute Engine). The inventory describes the list of existing VMs in that * source. Note that this operation lists the VMs on the remote source, as opposed to listing the * MigratingVms resources in the vmmigration service. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   SourceName source = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
   *   FetchInventoryResponse response = vmMigrationClient.fetchInventory(source);
   * }
   * }
* * @param source Required. The name of the Source. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final FetchInventoryResponse fetchInventory(SourceName source) { FetchInventoryRequest request = FetchInventoryRequest.newBuilder() .setSource(source == null ? null : source.toString()) .build(); return fetchInventory(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * List remote source's inventory of VMs. The remote source is the onprem vCenter (remote in the * sense it's not in Compute Engine). The inventory describes the list of existing VMs in that * source. Note that this operation lists the VMs on the remote source, as opposed to listing the * MigratingVms resources in the vmmigration service. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String source = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString();
   *   FetchInventoryResponse response = vmMigrationClient.fetchInventory(source);
   * }
   * }
* * @param source Required. The name of the Source. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final FetchInventoryResponse fetchInventory(String source) { FetchInventoryRequest request = FetchInventoryRequest.newBuilder().setSource(source).build(); return fetchInventory(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * List remote source's inventory of VMs. The remote source is the onprem vCenter (remote in the * sense it's not in Compute Engine). The inventory describes the list of existing VMs in that * source. Note that this operation lists the VMs on the remote source, as opposed to listing the * MigratingVms resources in the vmmigration service. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   FetchInventoryRequest request =
   *       FetchInventoryRequest.newBuilder()
   *           .setSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .setForceRefresh(true)
   *           .build();
   *   FetchInventoryResponse response = vmMigrationClient.fetchInventory(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final FetchInventoryResponse fetchInventory(FetchInventoryRequest request) { return fetchInventoryCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * List remote source's inventory of VMs. The remote source is the onprem vCenter (remote in the * sense it's not in Compute Engine). The inventory describes the list of existing VMs in that * source. Note that this operation lists the VMs on the remote source, as opposed to listing the * MigratingVms resources in the vmmigration service. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   FetchInventoryRequest request =
   *       FetchInventoryRequest.newBuilder()
   *           .setSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .setForceRefresh(true)
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.fetchInventoryCallable().futureCall(request);
   *   // Do something.
   *   FetchInventoryResponse response = future.get();
   * }
   * }
*/ public final UnaryCallable fetchInventoryCallable() { return stub.fetchInventoryCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Utilization Reports of the given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   SourceName parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
   *   for (UtilizationReport element :
   *       vmMigrationClient.listUtilizationReports(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The Utilization Reports parent. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListUtilizationReportsPagedResponse listUtilizationReports(SourceName parent) { ListUtilizationReportsRequest request = ListUtilizationReportsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listUtilizationReports(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Utilization Reports of the given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString();
   *   for (UtilizationReport element :
   *       vmMigrationClient.listUtilizationReports(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The Utilization Reports parent. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListUtilizationReportsPagedResponse listUtilizationReports(String parent) { ListUtilizationReportsRequest request = ListUtilizationReportsRequest.newBuilder().setParent(parent).build(); return listUtilizationReports(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Utilization Reports of the given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListUtilizationReportsRequest request =
   *       ListUtilizationReportsRequest.newBuilder()
   *           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .setView(UtilizationReportView.forNumber(0))
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   for (UtilizationReport element :
   *       vmMigrationClient.listUtilizationReports(request).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListUtilizationReportsPagedResponse listUtilizationReports( ListUtilizationReportsRequest request) { return listUtilizationReportsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Utilization Reports of the given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListUtilizationReportsRequest request =
   *       ListUtilizationReportsRequest.newBuilder()
   *           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .setView(UtilizationReportView.forNumber(0))
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.listUtilizationReportsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (UtilizationReport element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listUtilizationReportsPagedCallable() { return stub.listUtilizationReportsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Utilization Reports of the given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListUtilizationReportsRequest request =
   *       ListUtilizationReportsRequest.newBuilder()
   *           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .setView(UtilizationReportView.forNumber(0))
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   while (true) {
   *     ListUtilizationReportsResponse response =
   *         vmMigrationClient.listUtilizationReportsCallable().call(request);
   *     for (UtilizationReport element : response.getUtilizationReportsList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listUtilizationReportsCallable() { return stub.listUtilizationReportsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a single Utilization Report. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   UtilizationReportName name =
   *       UtilizationReportName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[UTILIZATION_REPORT]");
   *   UtilizationReport response = vmMigrationClient.getUtilizationReport(name);
   * }
   * }
* * @param name Required. The Utilization Report name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final UtilizationReport getUtilizationReport(UtilizationReportName name) { GetUtilizationReportRequest request = GetUtilizationReportRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return getUtilizationReport(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a single Utilization Report. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String name =
   *       UtilizationReportName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[UTILIZATION_REPORT]")
   *           .toString();
   *   UtilizationReport response = vmMigrationClient.getUtilizationReport(name);
   * }
   * }
* * @param name Required. The Utilization Report name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final UtilizationReport getUtilizationReport(String name) { GetUtilizationReportRequest request = GetUtilizationReportRequest.newBuilder().setName(name).build(); return getUtilizationReport(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a single Utilization Report. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   GetUtilizationReportRequest request =
   *       GetUtilizationReportRequest.newBuilder()
   *           .setName(
   *               UtilizationReportName.of(
   *                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[UTILIZATION_REPORT]")
   *                   .toString())
   *           .setView(UtilizationReportView.forNumber(0))
   *           .build();
   *   UtilizationReport response = vmMigrationClient.getUtilizationReport(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final UtilizationReport getUtilizationReport(GetUtilizationReportRequest request) { return getUtilizationReportCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a single Utilization Report. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   GetUtilizationReportRequest request =
   *       GetUtilizationReportRequest.newBuilder()
   *           .setName(
   *               UtilizationReportName.of(
   *                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[UTILIZATION_REPORT]")
   *                   .toString())
   *           .setView(UtilizationReportView.forNumber(0))
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.getUtilizationReportCallable().futureCall(request);
   *   // Do something.
   *   UtilizationReport response = future.get();
   * }
   * }
*/ public final UnaryCallable getUtilizationReportCallable() { return stub.getUtilizationReportCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new UtilizationReport. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   SourceName parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
   *   UtilizationReport utilizationReport = UtilizationReport.newBuilder().build();
   *   String utilizationReportId = "utilizationReportId1215771057";
   *   UtilizationReport response =
   *       vmMigrationClient
   *           .createUtilizationReportAsync(parent, utilizationReport, utilizationReportId)
   *           .get();
   * }
   * }
* * @param parent Required. The Utilization Report's parent. * @param utilizationReport Required. The report to create. * @param utilizationReportId Required. The ID to use for the report, which will become the final * component of the reports's resource name. *

This value maximum length is 63 characters, and valid characters are /[a-z][0-9]-/. It * must start with an english letter and must not end with a hyphen. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createUtilizationReportAsync( SourceName parent, UtilizationReport utilizationReport, String utilizationReportId) { CreateUtilizationReportRequest request = CreateUtilizationReportRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setUtilizationReport(utilizationReport) .setUtilizationReportId(utilizationReportId) .build(); return createUtilizationReportAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new UtilizationReport. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString();
   *   UtilizationReport utilizationReport = UtilizationReport.newBuilder().build();
   *   String utilizationReportId = "utilizationReportId1215771057";
   *   UtilizationReport response =
   *       vmMigrationClient
   *           .createUtilizationReportAsync(parent, utilizationReport, utilizationReportId)
   *           .get();
   * }
   * }
* * @param parent Required. The Utilization Report's parent. * @param utilizationReport Required. The report to create. * @param utilizationReportId Required. The ID to use for the report, which will become the final * component of the reports's resource name. *

This value maximum length is 63 characters, and valid characters are /[a-z][0-9]-/. It * must start with an english letter and must not end with a hyphen. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createUtilizationReportAsync( String parent, UtilizationReport utilizationReport, String utilizationReportId) { CreateUtilizationReportRequest request = CreateUtilizationReportRequest.newBuilder() .setParent(parent) .setUtilizationReport(utilizationReport) .setUtilizationReportId(utilizationReportId) .build(); return createUtilizationReportAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new UtilizationReport. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CreateUtilizationReportRequest request =
   *       CreateUtilizationReportRequest.newBuilder()
   *           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .setUtilizationReport(UtilizationReport.newBuilder().build())
   *           .setUtilizationReportId("utilizationReportId1215771057")
   *           .setRequestId("requestId693933066")
   *           .build();
   *   UtilizationReport response = vmMigrationClient.createUtilizationReportAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createUtilizationReportAsync( CreateUtilizationReportRequest request) { return createUtilizationReportOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new UtilizationReport. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CreateUtilizationReportRequest request =
   *       CreateUtilizationReportRequest.newBuilder()
   *           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .setUtilizationReport(UtilizationReport.newBuilder().build())
   *           .setUtilizationReportId("utilizationReportId1215771057")
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.createUtilizationReportOperationCallable().futureCall(request);
   *   // Do something.
   *   UtilizationReport response = future.get();
   * }
   * }
*/ public final OperationCallable< CreateUtilizationReportRequest, UtilizationReport, OperationMetadata> createUtilizationReportOperationCallable() { return stub.createUtilizationReportOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new UtilizationReport. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CreateUtilizationReportRequest request =
   *       CreateUtilizationReportRequest.newBuilder()
   *           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .setUtilizationReport(UtilizationReport.newBuilder().build())
   *           .setUtilizationReportId("utilizationReportId1215771057")
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.createUtilizationReportCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable createUtilizationReportCallable() { return stub.createUtilizationReportCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Utilization Report. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   UtilizationReportName name =
   *       UtilizationReportName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[UTILIZATION_REPORT]");
   *   vmMigrationClient.deleteUtilizationReportAsync(name).get();
   * }
   * }
* * @param name Required. The Utilization Report name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteUtilizationReportAsync( UtilizationReportName name) { DeleteUtilizationReportRequest request = DeleteUtilizationReportRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return deleteUtilizationReportAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Utilization Report. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String name =
   *       UtilizationReportName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[UTILIZATION_REPORT]")
   *           .toString();
   *   vmMigrationClient.deleteUtilizationReportAsync(name).get();
   * }
   * }
* * @param name Required. The Utilization Report name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteUtilizationReportAsync(String name) { DeleteUtilizationReportRequest request = DeleteUtilizationReportRequest.newBuilder().setName(name).build(); return deleteUtilizationReportAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Utilization Report. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   DeleteUtilizationReportRequest request =
   *       DeleteUtilizationReportRequest.newBuilder()
   *           .setName(
   *               UtilizationReportName.of(
   *                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[UTILIZATION_REPORT]")
   *                   .toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   vmMigrationClient.deleteUtilizationReportAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteUtilizationReportAsync( DeleteUtilizationReportRequest request) { return deleteUtilizationReportOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Utilization Report. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   DeleteUtilizationReportRequest request =
   *       DeleteUtilizationReportRequest.newBuilder()
   *           .setName(
   *               UtilizationReportName.of(
   *                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[UTILIZATION_REPORT]")
   *                   .toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.deleteUtilizationReportOperationCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final OperationCallable deleteUtilizationReportOperationCallable() { return stub.deleteUtilizationReportOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Utilization Report. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   DeleteUtilizationReportRequest request =
   *       DeleteUtilizationReportRequest.newBuilder()
   *           .setName(
   *               UtilizationReportName.of(
   *                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[UTILIZATION_REPORT]")
   *                   .toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.deleteUtilizationReportCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteUtilizationReportCallable() { return stub.deleteUtilizationReportCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists DatacenterConnectors in a given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   SourceName parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
   *   for (DatacenterConnector element :
   *       vmMigrationClient.listDatacenterConnectors(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The parent, which owns this collection of connectors. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListDatacenterConnectorsPagedResponse listDatacenterConnectors(SourceName parent) { ListDatacenterConnectorsRequest request = ListDatacenterConnectorsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listDatacenterConnectors(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists DatacenterConnectors in a given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString();
   *   for (DatacenterConnector element :
   *       vmMigrationClient.listDatacenterConnectors(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The parent, which owns this collection of connectors. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListDatacenterConnectorsPagedResponse listDatacenterConnectors(String parent) { ListDatacenterConnectorsRequest request = ListDatacenterConnectorsRequest.newBuilder().setParent(parent).build(); return listDatacenterConnectors(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists DatacenterConnectors in a given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListDatacenterConnectorsRequest request =
   *       ListDatacenterConnectorsRequest.newBuilder()
   *           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   for (DatacenterConnector element :
   *       vmMigrationClient.listDatacenterConnectors(request).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListDatacenterConnectorsPagedResponse listDatacenterConnectors( ListDatacenterConnectorsRequest request) { return listDatacenterConnectorsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists DatacenterConnectors in a given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListDatacenterConnectorsRequest request =
   *       ListDatacenterConnectorsRequest.newBuilder()
   *           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.listDatacenterConnectorsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (DatacenterConnector element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listDatacenterConnectorsPagedCallable() { return stub.listDatacenterConnectorsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists DatacenterConnectors in a given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListDatacenterConnectorsRequest request =
   *       ListDatacenterConnectorsRequest.newBuilder()
   *           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   while (true) {
   *     ListDatacenterConnectorsResponse response =
   *         vmMigrationClient.listDatacenterConnectorsCallable().call(request);
   *     for (DatacenterConnector element : response.getDatacenterConnectorsList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listDatacenterConnectorsCallable() { return stub.listDatacenterConnectorsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single DatacenterConnector. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   DatacenterConnectorName name =
   *       DatacenterConnectorName.of(
   *           "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]");
   *   DatacenterConnector response = vmMigrationClient.getDatacenterConnector(name);
   * }
   * }
* * @param name Required. The name of the DatacenterConnector. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final DatacenterConnector getDatacenterConnector(DatacenterConnectorName name) { GetDatacenterConnectorRequest request = GetDatacenterConnectorRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return getDatacenterConnector(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single DatacenterConnector. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String name =
   *       DatacenterConnectorName.of(
   *               "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]")
   *           .toString();
   *   DatacenterConnector response = vmMigrationClient.getDatacenterConnector(name);
   * }
   * }
* * @param name Required. The name of the DatacenterConnector. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final DatacenterConnector getDatacenterConnector(String name) { GetDatacenterConnectorRequest request = GetDatacenterConnectorRequest.newBuilder().setName(name).build(); return getDatacenterConnector(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single DatacenterConnector. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   GetDatacenterConnectorRequest request =
   *       GetDatacenterConnectorRequest.newBuilder()
   *           .setName(
   *               DatacenterConnectorName.of(
   *                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]")
   *                   .toString())
   *           .build();
   *   DatacenterConnector response = vmMigrationClient.getDatacenterConnector(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final DatacenterConnector getDatacenterConnector(GetDatacenterConnectorRequest request) { return getDatacenterConnectorCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single DatacenterConnector. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   GetDatacenterConnectorRequest request =
   *       GetDatacenterConnectorRequest.newBuilder()
   *           .setName(
   *               DatacenterConnectorName.of(
   *                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]")
   *                   .toString())
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.getDatacenterConnectorCallable().futureCall(request);
   *   // Do something.
   *   DatacenterConnector response = future.get();
   * }
   * }
*/ public final UnaryCallable getDatacenterConnectorCallable() { return stub.getDatacenterConnectorCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new DatacenterConnector in a given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   SourceName parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
   *   DatacenterConnector datacenterConnector = DatacenterConnector.newBuilder().build();
   *   String datacenterConnectorId = "datacenterConnectorId-761889719";
   *   DatacenterConnector response =
   *       vmMigrationClient
   *           .createDatacenterConnectorAsync(parent, datacenterConnector, datacenterConnectorId)
   *           .get();
   * }
   * }
* * @param parent Required. The DatacenterConnector's parent. Required. The Source in where the new * DatacenterConnector will be created. For example: * `projects/my-project/locations/us-central1/sources/my-source` * @param datacenterConnector Required. The create request body. * @param datacenterConnectorId Required. The datacenterConnector identifier. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createDatacenterConnectorAsync( SourceName parent, DatacenterConnector datacenterConnector, String datacenterConnectorId) { CreateDatacenterConnectorRequest request = CreateDatacenterConnectorRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setDatacenterConnector(datacenterConnector) .setDatacenterConnectorId(datacenterConnectorId) .build(); return createDatacenterConnectorAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new DatacenterConnector in a given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString();
   *   DatacenterConnector datacenterConnector = DatacenterConnector.newBuilder().build();
   *   String datacenterConnectorId = "datacenterConnectorId-761889719";
   *   DatacenterConnector response =
   *       vmMigrationClient
   *           .createDatacenterConnectorAsync(parent, datacenterConnector, datacenterConnectorId)
   *           .get();
   * }
   * }
* * @param parent Required. The DatacenterConnector's parent. Required. The Source in where the new * DatacenterConnector will be created. For example: * `projects/my-project/locations/us-central1/sources/my-source` * @param datacenterConnector Required. The create request body. * @param datacenterConnectorId Required. The datacenterConnector identifier. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createDatacenterConnectorAsync( String parent, DatacenterConnector datacenterConnector, String datacenterConnectorId) { CreateDatacenterConnectorRequest request = CreateDatacenterConnectorRequest.newBuilder() .setParent(parent) .setDatacenterConnector(datacenterConnector) .setDatacenterConnectorId(datacenterConnectorId) .build(); return createDatacenterConnectorAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new DatacenterConnector in a given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CreateDatacenterConnectorRequest request =
   *       CreateDatacenterConnectorRequest.newBuilder()
   *           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .setDatacenterConnectorId("datacenterConnectorId-761889719")
   *           .setDatacenterConnector(DatacenterConnector.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   DatacenterConnector response =
   *       vmMigrationClient.createDatacenterConnectorAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createDatacenterConnectorAsync(CreateDatacenterConnectorRequest request) { return createDatacenterConnectorOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new DatacenterConnector in a given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CreateDatacenterConnectorRequest request =
   *       CreateDatacenterConnectorRequest.newBuilder()
   *           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .setDatacenterConnectorId("datacenterConnectorId-761889719")
   *           .setDatacenterConnector(DatacenterConnector.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.createDatacenterConnectorOperationCallable().futureCall(request);
   *   // Do something.
   *   DatacenterConnector response = future.get();
   * }
   * }
*/ public final OperationCallable< CreateDatacenterConnectorRequest, DatacenterConnector, OperationMetadata> createDatacenterConnectorOperationCallable() { return stub.createDatacenterConnectorOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new DatacenterConnector in a given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CreateDatacenterConnectorRequest request =
   *       CreateDatacenterConnectorRequest.newBuilder()
   *           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .setDatacenterConnectorId("datacenterConnectorId-761889719")
   *           .setDatacenterConnector(DatacenterConnector.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.createDatacenterConnectorCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable createDatacenterConnectorCallable() { return stub.createDatacenterConnectorCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single DatacenterConnector. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   DatacenterConnectorName name =
   *       DatacenterConnectorName.of(
   *           "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]");
   *   vmMigrationClient.deleteDatacenterConnectorAsync(name).get();
   * }
   * }
* * @param name Required. The DatacenterConnector name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteDatacenterConnectorAsync( DatacenterConnectorName name) { DeleteDatacenterConnectorRequest request = DeleteDatacenterConnectorRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return deleteDatacenterConnectorAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single DatacenterConnector. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String name =
   *       DatacenterConnectorName.of(
   *               "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]")
   *           .toString();
   *   vmMigrationClient.deleteDatacenterConnectorAsync(name).get();
   * }
   * }
* * @param name Required. The DatacenterConnector name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteDatacenterConnectorAsync( String name) { DeleteDatacenterConnectorRequest request = DeleteDatacenterConnectorRequest.newBuilder().setName(name).build(); return deleteDatacenterConnectorAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single DatacenterConnector. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   DeleteDatacenterConnectorRequest request =
   *       DeleteDatacenterConnectorRequest.newBuilder()
   *           .setName(
   *               DatacenterConnectorName.of(
   *                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]")
   *                   .toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   vmMigrationClient.deleteDatacenterConnectorAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteDatacenterConnectorAsync( DeleteDatacenterConnectorRequest request) { return deleteDatacenterConnectorOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single DatacenterConnector. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   DeleteDatacenterConnectorRequest request =
   *       DeleteDatacenterConnectorRequest.newBuilder()
   *           .setName(
   *               DatacenterConnectorName.of(
   *                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]")
   *                   .toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.deleteDatacenterConnectorOperationCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final OperationCallable deleteDatacenterConnectorOperationCallable() { return stub.deleteDatacenterConnectorOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single DatacenterConnector. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   DeleteDatacenterConnectorRequest request =
   *       DeleteDatacenterConnectorRequest.newBuilder()
   *           .setName(
   *               DatacenterConnectorName.of(
   *                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]")
   *                   .toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.deleteDatacenterConnectorCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteDatacenterConnectorCallable() { return stub.deleteDatacenterConnectorCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Upgrades the appliance relate to this DatacenterConnector to the in-place updateable version. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   UpgradeApplianceRequest request =
   *       UpgradeApplianceRequest.newBuilder()
   *           .setDatacenterConnector(
   *               DatacenterConnectorName.of(
   *                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]")
   *                   .toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   UpgradeApplianceResponse response = vmMigrationClient.upgradeApplianceAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture upgradeApplianceAsync( UpgradeApplianceRequest request) { return upgradeApplianceOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Upgrades the appliance relate to this DatacenterConnector to the in-place updateable version. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   UpgradeApplianceRequest request =
   *       UpgradeApplianceRequest.newBuilder()
   *           .setDatacenterConnector(
   *               DatacenterConnectorName.of(
   *                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]")
   *                   .toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.upgradeApplianceOperationCallable().futureCall(request);
   *   // Do something.
   *   UpgradeApplianceResponse response = future.get();
   * }
   * }
*/ public final OperationCallable< UpgradeApplianceRequest, UpgradeApplianceResponse, OperationMetadata> upgradeApplianceOperationCallable() { return stub.upgradeApplianceOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Upgrades the appliance relate to this DatacenterConnector to the in-place updateable version. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   UpgradeApplianceRequest request =
   *       UpgradeApplianceRequest.newBuilder()
   *           .setDatacenterConnector(
   *               DatacenterConnectorName.of(
   *                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]")
   *                   .toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.upgradeApplianceCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable upgradeApplianceCallable() { return stub.upgradeApplianceCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new MigratingVm in a given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   SourceName parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
   *   MigratingVm migratingVm = MigratingVm.newBuilder().build();
   *   String migratingVmId = "migratingVmId441244154";
   *   MigratingVm response =
   *       vmMigrationClient.createMigratingVmAsync(parent, migratingVm, migratingVmId).get();
   * }
   * }
* * @param parent Required. The MigratingVm's parent. * @param migratingVm Required. The create request body. * @param migratingVmId Required. The migratingVm identifier. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createMigratingVmAsync( SourceName parent, MigratingVm migratingVm, String migratingVmId) { CreateMigratingVmRequest request = CreateMigratingVmRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setMigratingVm(migratingVm) .setMigratingVmId(migratingVmId) .build(); return createMigratingVmAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new MigratingVm in a given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString();
   *   MigratingVm migratingVm = MigratingVm.newBuilder().build();
   *   String migratingVmId = "migratingVmId441244154";
   *   MigratingVm response =
   *       vmMigrationClient.createMigratingVmAsync(parent, migratingVm, migratingVmId).get();
   * }
   * }
* * @param parent Required. The MigratingVm's parent. * @param migratingVm Required. The create request body. * @param migratingVmId Required. The migratingVm identifier. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createMigratingVmAsync( String parent, MigratingVm migratingVm, String migratingVmId) { CreateMigratingVmRequest request = CreateMigratingVmRequest.newBuilder() .setParent(parent) .setMigratingVm(migratingVm) .setMigratingVmId(migratingVmId) .build(); return createMigratingVmAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new MigratingVm in a given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CreateMigratingVmRequest request =
   *       CreateMigratingVmRequest.newBuilder()
   *           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .setMigratingVmId("migratingVmId441244154")
   *           .setMigratingVm(MigratingVm.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   MigratingVm response = vmMigrationClient.createMigratingVmAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createMigratingVmAsync( CreateMigratingVmRequest request) { return createMigratingVmOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new MigratingVm in a given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CreateMigratingVmRequest request =
   *       CreateMigratingVmRequest.newBuilder()
   *           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .setMigratingVmId("migratingVmId441244154")
   *           .setMigratingVm(MigratingVm.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.createMigratingVmOperationCallable().futureCall(request);
   *   // Do something.
   *   MigratingVm response = future.get();
   * }
   * }
*/ public final OperationCallable createMigratingVmOperationCallable() { return stub.createMigratingVmOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new MigratingVm in a given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CreateMigratingVmRequest request =
   *       CreateMigratingVmRequest.newBuilder()
   *           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .setMigratingVmId("migratingVmId441244154")
   *           .setMigratingVm(MigratingVm.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.createMigratingVmCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable createMigratingVmCallable() { return stub.createMigratingVmCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists MigratingVms in a given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   SourceName parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
   *   for (MigratingVm element : vmMigrationClient.listMigratingVms(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The parent, which owns this collection of MigratingVms. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListMigratingVmsPagedResponse listMigratingVms(SourceName parent) { ListMigratingVmsRequest request = ListMigratingVmsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listMigratingVms(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists MigratingVms in a given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString();
   *   for (MigratingVm element : vmMigrationClient.listMigratingVms(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The parent, which owns this collection of MigratingVms. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListMigratingVmsPagedResponse listMigratingVms(String parent) { ListMigratingVmsRequest request = ListMigratingVmsRequest.newBuilder().setParent(parent).build(); return listMigratingVms(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists MigratingVms in a given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListMigratingVmsRequest request =
   *       ListMigratingVmsRequest.newBuilder()
   *           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .setView(MigratingVmView.forNumber(0))
   *           .build();
   *   for (MigratingVm element : vmMigrationClient.listMigratingVms(request).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListMigratingVmsPagedResponse listMigratingVms(ListMigratingVmsRequest request) { return listMigratingVmsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists MigratingVms in a given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListMigratingVmsRequest request =
   *       ListMigratingVmsRequest.newBuilder()
   *           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .setView(MigratingVmView.forNumber(0))
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.listMigratingVmsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (MigratingVm element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listMigratingVmsPagedCallable() { return stub.listMigratingVmsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists MigratingVms in a given Source. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListMigratingVmsRequest request =
   *       ListMigratingVmsRequest.newBuilder()
   *           .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .setView(MigratingVmView.forNumber(0))
   *           .build();
   *   while (true) {
   *     ListMigratingVmsResponse response =
   *         vmMigrationClient.listMigratingVmsCallable().call(request);
   *     for (MigratingVm element : response.getMigratingVmsList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listMigratingVmsCallable() { return stub.listMigratingVmsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single MigratingVm. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   MigratingVmName name =
   *       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]");
   *   MigratingVm response = vmMigrationClient.getMigratingVm(name);
   * }
   * }
* * @param name Required. The name of the MigratingVm. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final MigratingVm getMigratingVm(MigratingVmName name) { GetMigratingVmRequest request = GetMigratingVmRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getMigratingVm(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single MigratingVm. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String name =
   *       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]").toString();
   *   MigratingVm response = vmMigrationClient.getMigratingVm(name);
   * }
   * }
* * @param name Required. The name of the MigratingVm. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final MigratingVm getMigratingVm(String name) { GetMigratingVmRequest request = GetMigratingVmRequest.newBuilder().setName(name).build(); return getMigratingVm(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single MigratingVm. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   GetMigratingVmRequest request =
   *       GetMigratingVmRequest.newBuilder()
   *           .setName(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .setView(MigratingVmView.forNumber(0))
   *           .build();
   *   MigratingVm response = vmMigrationClient.getMigratingVm(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final MigratingVm getMigratingVm(GetMigratingVmRequest request) { return getMigratingVmCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single MigratingVm. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   GetMigratingVmRequest request =
   *       GetMigratingVmRequest.newBuilder()
   *           .setName(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .setView(MigratingVmView.forNumber(0))
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.getMigratingVmCallable().futureCall(request);
   *   // Do something.
   *   MigratingVm response = future.get();
   * }
   * }
*/ public final UnaryCallable getMigratingVmCallable() { return stub.getMigratingVmCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single MigratingVm. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   MigratingVm migratingVm = MigratingVm.newBuilder().build();
   *   FieldMask updateMask = FieldMask.newBuilder().build();
   *   MigratingVm response =
   *       vmMigrationClient.updateMigratingVmAsync(migratingVm, updateMask).get();
   * }
   * }
* * @param migratingVm Required. The update request body. * @param updateMask Field mask is used to specify the fields to be overwritten in the MigratingVm * resource by the update. The fields 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. If the * user does not provide a mask then all fields will be overwritten. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateMigratingVmAsync( MigratingVm migratingVm, FieldMask updateMask) { UpdateMigratingVmRequest request = UpdateMigratingVmRequest.newBuilder() .setMigratingVm(migratingVm) .setUpdateMask(updateMask) .build(); return updateMigratingVmAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single MigratingVm. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   UpdateMigratingVmRequest request =
   *       UpdateMigratingVmRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setMigratingVm(MigratingVm.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   MigratingVm response = vmMigrationClient.updateMigratingVmAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateMigratingVmAsync( UpdateMigratingVmRequest request) { return updateMigratingVmOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single MigratingVm. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   UpdateMigratingVmRequest request =
   *       UpdateMigratingVmRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setMigratingVm(MigratingVm.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.updateMigratingVmOperationCallable().futureCall(request);
   *   // Do something.
   *   MigratingVm response = future.get();
   * }
   * }
*/ public final OperationCallable updateMigratingVmOperationCallable() { return stub.updateMigratingVmOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single MigratingVm. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   UpdateMigratingVmRequest request =
   *       UpdateMigratingVmRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setMigratingVm(MigratingVm.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.updateMigratingVmCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable updateMigratingVmCallable() { return stub.updateMigratingVmCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single MigratingVm. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   MigratingVmName name =
   *       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]");
   *   vmMigrationClient.deleteMigratingVmAsync(name).get();
   * }
   * }
* * @param name Required. The name of the MigratingVm. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteMigratingVmAsync( MigratingVmName name) { DeleteMigratingVmRequest request = DeleteMigratingVmRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return deleteMigratingVmAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single MigratingVm. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String name =
   *       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]").toString();
   *   vmMigrationClient.deleteMigratingVmAsync(name).get();
   * }
   * }
* * @param name Required. The name of the MigratingVm. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteMigratingVmAsync(String name) { DeleteMigratingVmRequest request = DeleteMigratingVmRequest.newBuilder().setName(name).build(); return deleteMigratingVmAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single MigratingVm. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   DeleteMigratingVmRequest request =
   *       DeleteMigratingVmRequest.newBuilder()
   *           .setName(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .build();
   *   vmMigrationClient.deleteMigratingVmAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteMigratingVmAsync( DeleteMigratingVmRequest request) { return deleteMigratingVmOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single MigratingVm. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   DeleteMigratingVmRequest request =
   *       DeleteMigratingVmRequest.newBuilder()
   *           .setName(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.deleteMigratingVmOperationCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final OperationCallable deleteMigratingVmOperationCallable() { return stub.deleteMigratingVmOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single MigratingVm. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   DeleteMigratingVmRequest request =
   *       DeleteMigratingVmRequest.newBuilder()
   *           .setName(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.deleteMigratingVmCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteMigratingVmCallable() { return stub.deleteMigratingVmCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Starts migration for a VM. Starts the process of uploading data and creating snapshots, in * replication cycles scheduled by the policy. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   MigratingVmName migratingVm =
   *       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]");
   *   StartMigrationResponse response = vmMigrationClient.startMigrationAsync(migratingVm).get();
   * }
   * }
* * @param migratingVm Required. The name of the MigratingVm. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture startMigrationAsync( MigratingVmName migratingVm) { StartMigrationRequest request = StartMigrationRequest.newBuilder() .setMigratingVm(migratingVm == null ? null : migratingVm.toString()) .build(); return startMigrationAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Starts migration for a VM. Starts the process of uploading data and creating snapshots, in * replication cycles scheduled by the policy. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String migratingVm =
   *       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]").toString();
   *   StartMigrationResponse response = vmMigrationClient.startMigrationAsync(migratingVm).get();
   * }
   * }
* * @param migratingVm Required. The name of the MigratingVm. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture startMigrationAsync( String migratingVm) { StartMigrationRequest request = StartMigrationRequest.newBuilder().setMigratingVm(migratingVm).build(); return startMigrationAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Starts migration for a VM. Starts the process of uploading data and creating snapshots, in * replication cycles scheduled by the policy. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   StartMigrationRequest request =
   *       StartMigrationRequest.newBuilder()
   *           .setMigratingVm(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .build();
   *   StartMigrationResponse response = vmMigrationClient.startMigrationAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture startMigrationAsync( StartMigrationRequest request) { return startMigrationOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Starts migration for a VM. Starts the process of uploading data and creating snapshots, in * replication cycles scheduled by the policy. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   StartMigrationRequest request =
   *       StartMigrationRequest.newBuilder()
   *           .setMigratingVm(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.startMigrationOperationCallable().futureCall(request);
   *   // Do something.
   *   StartMigrationResponse response = future.get();
   * }
   * }
*/ public final OperationCallable startMigrationOperationCallable() { return stub.startMigrationOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Starts migration for a VM. Starts the process of uploading data and creating snapshots, in * replication cycles scheduled by the policy. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   StartMigrationRequest request =
   *       StartMigrationRequest.newBuilder()
   *           .setMigratingVm(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .build();
   *   ApiFuture future = vmMigrationClient.startMigrationCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable startMigrationCallable() { return stub.startMigrationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Resumes a migration for a VM. When called on a paused migration, will start the process of * uploading data and creating snapshots; when called on a completed cut-over migration, will * update the migration to active state and start the process of uploading data and creating * snapshots. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ResumeMigrationRequest request =
   *       ResumeMigrationRequest.newBuilder()
   *           .setMigratingVm(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .build();
   *   ResumeMigrationResponse response = vmMigrationClient.resumeMigrationAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture resumeMigrationAsync( ResumeMigrationRequest request) { return resumeMigrationOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Resumes a migration for a VM. When called on a paused migration, will start the process of * uploading data and creating snapshots; when called on a completed cut-over migration, will * update the migration to active state and start the process of uploading data and creating * snapshots. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ResumeMigrationRequest request =
   *       ResumeMigrationRequest.newBuilder()
   *           .setMigratingVm(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.resumeMigrationOperationCallable().futureCall(request);
   *   // Do something.
   *   ResumeMigrationResponse response = future.get();
   * }
   * }
*/ public final OperationCallable resumeMigrationOperationCallable() { return stub.resumeMigrationOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Resumes a migration for a VM. When called on a paused migration, will start the process of * uploading data and creating snapshots; when called on a completed cut-over migration, will * update the migration to active state and start the process of uploading data and creating * snapshots. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ResumeMigrationRequest request =
   *       ResumeMigrationRequest.newBuilder()
   *           .setMigratingVm(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .build();
   *   ApiFuture future = vmMigrationClient.resumeMigrationCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable resumeMigrationCallable() { return stub.resumeMigrationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Pauses a migration for a VM. If cycle tasks are running they will be cancelled, preserving * source task data. Further replication cycles will not be triggered while the VM is paused. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   PauseMigrationRequest request =
   *       PauseMigrationRequest.newBuilder()
   *           .setMigratingVm(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .build();
   *   PauseMigrationResponse response = vmMigrationClient.pauseMigrationAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture pauseMigrationAsync( PauseMigrationRequest request) { return pauseMigrationOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Pauses a migration for a VM. If cycle tasks are running they will be cancelled, preserving * source task data. Further replication cycles will not be triggered while the VM is paused. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   PauseMigrationRequest request =
   *       PauseMigrationRequest.newBuilder()
   *           .setMigratingVm(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.pauseMigrationOperationCallable().futureCall(request);
   *   // Do something.
   *   PauseMigrationResponse response = future.get();
   * }
   * }
*/ public final OperationCallable pauseMigrationOperationCallable() { return stub.pauseMigrationOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Pauses a migration for a VM. If cycle tasks are running they will be cancelled, preserving * source task data. Further replication cycles will not be triggered while the VM is paused. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   PauseMigrationRequest request =
   *       PauseMigrationRequest.newBuilder()
   *           .setMigratingVm(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .build();
   *   ApiFuture future = vmMigrationClient.pauseMigrationCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable pauseMigrationCallable() { return stub.pauseMigrationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Marks a migration as completed, deleting migration resources that are no longer being used. * Only applicable after cutover is done. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   MigratingVmName migratingVm =
   *       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]");
   *   FinalizeMigrationResponse response =
   *       vmMigrationClient.finalizeMigrationAsync(migratingVm).get();
   * }
   * }
* * @param migratingVm Required. The name of the MigratingVm. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture finalizeMigrationAsync( MigratingVmName migratingVm) { FinalizeMigrationRequest request = FinalizeMigrationRequest.newBuilder() .setMigratingVm(migratingVm == null ? null : migratingVm.toString()) .build(); return finalizeMigrationAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Marks a migration as completed, deleting migration resources that are no longer being used. * Only applicable after cutover is done. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String migratingVm =
   *       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]").toString();
   *   FinalizeMigrationResponse response =
   *       vmMigrationClient.finalizeMigrationAsync(migratingVm).get();
   * }
   * }
* * @param migratingVm Required. The name of the MigratingVm. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture finalizeMigrationAsync( String migratingVm) { FinalizeMigrationRequest request = FinalizeMigrationRequest.newBuilder().setMigratingVm(migratingVm).build(); return finalizeMigrationAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Marks a migration as completed, deleting migration resources that are no longer being used. * Only applicable after cutover is done. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   FinalizeMigrationRequest request =
   *       FinalizeMigrationRequest.newBuilder()
   *           .setMigratingVm(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .build();
   *   FinalizeMigrationResponse response = vmMigrationClient.finalizeMigrationAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture finalizeMigrationAsync( FinalizeMigrationRequest request) { return finalizeMigrationOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Marks a migration as completed, deleting migration resources that are no longer being used. * Only applicable after cutover is done. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   FinalizeMigrationRequest request =
   *       FinalizeMigrationRequest.newBuilder()
   *           .setMigratingVm(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.finalizeMigrationOperationCallable().futureCall(request);
   *   // Do something.
   *   FinalizeMigrationResponse response = future.get();
   * }
   * }
*/ public final OperationCallable< FinalizeMigrationRequest, FinalizeMigrationResponse, OperationMetadata> finalizeMigrationOperationCallable() { return stub.finalizeMigrationOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Marks a migration as completed, deleting migration resources that are no longer being used. * Only applicable after cutover is done. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   FinalizeMigrationRequest request =
   *       FinalizeMigrationRequest.newBuilder()
   *           .setMigratingVm(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.finalizeMigrationCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable finalizeMigrationCallable() { return stub.finalizeMigrationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initiates a Clone of a specific migrating VM. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   MigratingVmName parent =
   *       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]");
   *   CloneJob cloneJob = CloneJob.newBuilder().build();
   *   String cloneJobId = "cloneJobId2071309915";
   *   CloneJob response = vmMigrationClient.createCloneJobAsync(parent, cloneJob, cloneJobId).get();
   * }
   * }
* * @param parent Required. The Clone's parent. * @param cloneJob Required. The clone request body. * @param cloneJobId Required. The clone job identifier. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createCloneJobAsync( MigratingVmName parent, CloneJob cloneJob, String cloneJobId) { CreateCloneJobRequest request = CreateCloneJobRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setCloneJob(cloneJob) .setCloneJobId(cloneJobId) .build(); return createCloneJobAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initiates a Clone of a specific migrating VM. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String parent =
   *       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]").toString();
   *   CloneJob cloneJob = CloneJob.newBuilder().build();
   *   String cloneJobId = "cloneJobId2071309915";
   *   CloneJob response = vmMigrationClient.createCloneJobAsync(parent, cloneJob, cloneJobId).get();
   * }
   * }
* * @param parent Required. The Clone's parent. * @param cloneJob Required. The clone request body. * @param cloneJobId Required. The clone job identifier. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createCloneJobAsync( String parent, CloneJob cloneJob, String cloneJobId) { CreateCloneJobRequest request = CreateCloneJobRequest.newBuilder() .setParent(parent) .setCloneJob(cloneJob) .setCloneJobId(cloneJobId) .build(); return createCloneJobAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initiates a Clone of a specific migrating VM. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CreateCloneJobRequest request =
   *       CreateCloneJobRequest.newBuilder()
   *           .setParent(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .setCloneJobId("cloneJobId2071309915")
   *           .setCloneJob(CloneJob.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   CloneJob response = vmMigrationClient.createCloneJobAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createCloneJobAsync( CreateCloneJobRequest request) { return createCloneJobOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initiates a Clone of a specific migrating VM. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CreateCloneJobRequest request =
   *       CreateCloneJobRequest.newBuilder()
   *           .setParent(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .setCloneJobId("cloneJobId2071309915")
   *           .setCloneJob(CloneJob.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.createCloneJobOperationCallable().futureCall(request);
   *   // Do something.
   *   CloneJob response = future.get();
   * }
   * }
*/ public final OperationCallable createCloneJobOperationCallable() { return stub.createCloneJobOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initiates a Clone of a specific migrating VM. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CreateCloneJobRequest request =
   *       CreateCloneJobRequest.newBuilder()
   *           .setParent(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .setCloneJobId("cloneJobId2071309915")
   *           .setCloneJob(CloneJob.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future = vmMigrationClient.createCloneJobCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable createCloneJobCallable() { return stub.createCloneJobCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initiates the cancellation of a running clone job. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CloneJobName name =
   *       CloneJobName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CLONE_JOB]");
   *   CancelCloneJobResponse response = vmMigrationClient.cancelCloneJobAsync(name).get();
   * }
   * }
* * @param name Required. The clone job id * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture cancelCloneJobAsync( CloneJobName name) { CancelCloneJobRequest request = CancelCloneJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return cancelCloneJobAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initiates the cancellation of a running clone job. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String name =
   *       CloneJobName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CLONE_JOB]")
   *           .toString();
   *   CancelCloneJobResponse response = vmMigrationClient.cancelCloneJobAsync(name).get();
   * }
   * }
* * @param name Required. The clone job id * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture cancelCloneJobAsync( String name) { CancelCloneJobRequest request = CancelCloneJobRequest.newBuilder().setName(name).build(); return cancelCloneJobAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initiates the cancellation of a running clone job. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CancelCloneJobRequest request =
   *       CancelCloneJobRequest.newBuilder()
   *           .setName(
   *               CloneJobName.of(
   *                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CLONE_JOB]")
   *                   .toString())
   *           .build();
   *   CancelCloneJobResponse response = vmMigrationClient.cancelCloneJobAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture cancelCloneJobAsync( CancelCloneJobRequest request) { return cancelCloneJobOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initiates the cancellation of a running clone job. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CancelCloneJobRequest request =
   *       CancelCloneJobRequest.newBuilder()
   *           .setName(
   *               CloneJobName.of(
   *                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CLONE_JOB]")
   *                   .toString())
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.cancelCloneJobOperationCallable().futureCall(request);
   *   // Do something.
   *   CancelCloneJobResponse response = future.get();
   * }
   * }
*/ public final OperationCallable cancelCloneJobOperationCallable() { return stub.cancelCloneJobOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initiates the cancellation of a running clone job. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CancelCloneJobRequest request =
   *       CancelCloneJobRequest.newBuilder()
   *           .setName(
   *               CloneJobName.of(
   *                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CLONE_JOB]")
   *                   .toString())
   *           .build();
   *   ApiFuture future = vmMigrationClient.cancelCloneJobCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable cancelCloneJobCallable() { return stub.cancelCloneJobCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists CloneJobs of a given migrating VM. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   MigratingVmName parent =
   *       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]");
   *   for (CloneJob element : vmMigrationClient.listCloneJobs(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The parent, which owns this collection of source VMs. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCloneJobsPagedResponse listCloneJobs(MigratingVmName parent) { ListCloneJobsRequest request = ListCloneJobsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listCloneJobs(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists CloneJobs of a given migrating VM. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String parent =
   *       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]").toString();
   *   for (CloneJob element : vmMigrationClient.listCloneJobs(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The parent, which owns this collection of source VMs. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCloneJobsPagedResponse listCloneJobs(String parent) { ListCloneJobsRequest request = ListCloneJobsRequest.newBuilder().setParent(parent).build(); return listCloneJobs(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists CloneJobs of a given migrating VM. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListCloneJobsRequest request =
   *       ListCloneJobsRequest.newBuilder()
   *           .setParent(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   for (CloneJob element : vmMigrationClient.listCloneJobs(request).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCloneJobsPagedResponse listCloneJobs(ListCloneJobsRequest request) { return listCloneJobsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists CloneJobs of a given migrating VM. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListCloneJobsRequest request =
   *       ListCloneJobsRequest.newBuilder()
   *           .setParent(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.listCloneJobsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (CloneJob element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listCloneJobsPagedCallable() { return stub.listCloneJobsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists CloneJobs of a given migrating VM. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListCloneJobsRequest request =
   *       ListCloneJobsRequest.newBuilder()
   *           .setParent(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   while (true) {
   *     ListCloneJobsResponse response = vmMigrationClient.listCloneJobsCallable().call(request);
   *     for (CloneJob element : response.getCloneJobsList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listCloneJobsCallable() { return stub.listCloneJobsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single CloneJob. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CloneJobName name =
   *       CloneJobName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CLONE_JOB]");
   *   CloneJob response = vmMigrationClient.getCloneJob(name);
   * }
   * }
* * @param name Required. The name of the CloneJob. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CloneJob getCloneJob(CloneJobName name) { GetCloneJobRequest request = GetCloneJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getCloneJob(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single CloneJob. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String name =
   *       CloneJobName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CLONE_JOB]")
   *           .toString();
   *   CloneJob response = vmMigrationClient.getCloneJob(name);
   * }
   * }
* * @param name Required. The name of the CloneJob. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CloneJob getCloneJob(String name) { GetCloneJobRequest request = GetCloneJobRequest.newBuilder().setName(name).build(); return getCloneJob(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single CloneJob. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   GetCloneJobRequest request =
   *       GetCloneJobRequest.newBuilder()
   *           .setName(
   *               CloneJobName.of(
   *                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CLONE_JOB]")
   *                   .toString())
   *           .build();
   *   CloneJob response = vmMigrationClient.getCloneJob(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CloneJob getCloneJob(GetCloneJobRequest request) { return getCloneJobCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single CloneJob. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   GetCloneJobRequest request =
   *       GetCloneJobRequest.newBuilder()
   *           .setName(
   *               CloneJobName.of(
   *                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CLONE_JOB]")
   *                   .toString())
   *           .build();
   *   ApiFuture future = vmMigrationClient.getCloneJobCallable().futureCall(request);
   *   // Do something.
   *   CloneJob response = future.get();
   * }
   * }
*/ public final UnaryCallable getCloneJobCallable() { return stub.getCloneJobCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initiates a Cutover of a specific migrating VM. The returned LRO is completed when the cutover * job resource is created and the job is initiated. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   MigratingVmName parent =
   *       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]");
   *   CutoverJob cutoverJob = CutoverJob.newBuilder().build();
   *   String cutoverJobId = "cutoverJobId-2003089086";
   *   CutoverJob response =
   *       vmMigrationClient.createCutoverJobAsync(parent, cutoverJob, cutoverJobId).get();
   * }
   * }
* * @param parent Required. The Cutover's parent. * @param cutoverJob Required. The cutover request body. * @param cutoverJobId Required. The cutover job identifier. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createCutoverJobAsync( MigratingVmName parent, CutoverJob cutoverJob, String cutoverJobId) { CreateCutoverJobRequest request = CreateCutoverJobRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setCutoverJob(cutoverJob) .setCutoverJobId(cutoverJobId) .build(); return createCutoverJobAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initiates a Cutover of a specific migrating VM. The returned LRO is completed when the cutover * job resource is created and the job is initiated. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String parent =
   *       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]").toString();
   *   CutoverJob cutoverJob = CutoverJob.newBuilder().build();
   *   String cutoverJobId = "cutoverJobId-2003089086";
   *   CutoverJob response =
   *       vmMigrationClient.createCutoverJobAsync(parent, cutoverJob, cutoverJobId).get();
   * }
   * }
* * @param parent Required. The Cutover's parent. * @param cutoverJob Required. The cutover request body. * @param cutoverJobId Required. The cutover job identifier. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createCutoverJobAsync( String parent, CutoverJob cutoverJob, String cutoverJobId) { CreateCutoverJobRequest request = CreateCutoverJobRequest.newBuilder() .setParent(parent) .setCutoverJob(cutoverJob) .setCutoverJobId(cutoverJobId) .build(); return createCutoverJobAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initiates a Cutover of a specific migrating VM. The returned LRO is completed when the cutover * job resource is created and the job is initiated. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CreateCutoverJobRequest request =
   *       CreateCutoverJobRequest.newBuilder()
   *           .setParent(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .setCutoverJobId("cutoverJobId-2003089086")
   *           .setCutoverJob(CutoverJob.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   CutoverJob response = vmMigrationClient.createCutoverJobAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createCutoverJobAsync( CreateCutoverJobRequest request) { return createCutoverJobOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initiates a Cutover of a specific migrating VM. The returned LRO is completed when the cutover * job resource is created and the job is initiated. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CreateCutoverJobRequest request =
   *       CreateCutoverJobRequest.newBuilder()
   *           .setParent(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .setCutoverJobId("cutoverJobId-2003089086")
   *           .setCutoverJob(CutoverJob.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.createCutoverJobOperationCallable().futureCall(request);
   *   // Do something.
   *   CutoverJob response = future.get();
   * }
   * }
*/ public final OperationCallable createCutoverJobOperationCallable() { return stub.createCutoverJobOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initiates a Cutover of a specific migrating VM. The returned LRO is completed when the cutover * job resource is created and the job is initiated. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CreateCutoverJobRequest request =
   *       CreateCutoverJobRequest.newBuilder()
   *           .setParent(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .setCutoverJobId("cutoverJobId-2003089086")
   *           .setCutoverJob(CutoverJob.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.createCutoverJobCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable createCutoverJobCallable() { return stub.createCutoverJobCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initiates the cancellation of a running cutover job. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CutoverJobName name =
   *       CutoverJobName.of(
   *           "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CUTOVER_JOB]");
   *   CancelCutoverJobResponse response = vmMigrationClient.cancelCutoverJobAsync(name).get();
   * }
   * }
* * @param name Required. The cutover job id * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture cancelCutoverJobAsync( CutoverJobName name) { CancelCutoverJobRequest request = CancelCutoverJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return cancelCutoverJobAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initiates the cancellation of a running cutover job. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String name =
   *       CutoverJobName.of(
   *               "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CUTOVER_JOB]")
   *           .toString();
   *   CancelCutoverJobResponse response = vmMigrationClient.cancelCutoverJobAsync(name).get();
   * }
   * }
* * @param name Required. The cutover job id * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture cancelCutoverJobAsync( String name) { CancelCutoverJobRequest request = CancelCutoverJobRequest.newBuilder().setName(name).build(); return cancelCutoverJobAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initiates the cancellation of a running cutover job. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CancelCutoverJobRequest request =
   *       CancelCutoverJobRequest.newBuilder()
   *           .setName(
   *               CutoverJobName.of(
   *                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CUTOVER_JOB]")
   *                   .toString())
   *           .build();
   *   CancelCutoverJobResponse response = vmMigrationClient.cancelCutoverJobAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture cancelCutoverJobAsync( CancelCutoverJobRequest request) { return cancelCutoverJobOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initiates the cancellation of a running cutover job. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CancelCutoverJobRequest request =
   *       CancelCutoverJobRequest.newBuilder()
   *           .setName(
   *               CutoverJobName.of(
   *                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CUTOVER_JOB]")
   *                   .toString())
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.cancelCutoverJobOperationCallable().futureCall(request);
   *   // Do something.
   *   CancelCutoverJobResponse response = future.get();
   * }
   * }
*/ public final OperationCallable< CancelCutoverJobRequest, CancelCutoverJobResponse, OperationMetadata> cancelCutoverJobOperationCallable() { return stub.cancelCutoverJobOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Initiates the cancellation of a running cutover job. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CancelCutoverJobRequest request =
   *       CancelCutoverJobRequest.newBuilder()
   *           .setName(
   *               CutoverJobName.of(
   *                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CUTOVER_JOB]")
   *                   .toString())
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.cancelCutoverJobCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable cancelCutoverJobCallable() { return stub.cancelCutoverJobCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists CutoverJobs of a given migrating VM. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   MigratingVmName parent =
   *       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]");
   *   for (CutoverJob element : vmMigrationClient.listCutoverJobs(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The parent, which owns this collection of migrating VMs. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCutoverJobsPagedResponse listCutoverJobs(MigratingVmName parent) { ListCutoverJobsRequest request = ListCutoverJobsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listCutoverJobs(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists CutoverJobs of a given migrating VM. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String parent =
   *       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]").toString();
   *   for (CutoverJob element : vmMigrationClient.listCutoverJobs(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The parent, which owns this collection of migrating VMs. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCutoverJobsPagedResponse listCutoverJobs(String parent) { ListCutoverJobsRequest request = ListCutoverJobsRequest.newBuilder().setParent(parent).build(); return listCutoverJobs(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists CutoverJobs of a given migrating VM. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListCutoverJobsRequest request =
   *       ListCutoverJobsRequest.newBuilder()
   *           .setParent(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   for (CutoverJob element : vmMigrationClient.listCutoverJobs(request).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCutoverJobsPagedResponse listCutoverJobs(ListCutoverJobsRequest request) { return listCutoverJobsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists CutoverJobs of a given migrating VM. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListCutoverJobsRequest request =
   *       ListCutoverJobsRequest.newBuilder()
   *           .setParent(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.listCutoverJobsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (CutoverJob element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listCutoverJobsPagedCallable() { return stub.listCutoverJobsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists CutoverJobs of a given migrating VM. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListCutoverJobsRequest request =
   *       ListCutoverJobsRequest.newBuilder()
   *           .setParent(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   while (true) {
   *     ListCutoverJobsResponse response =
   *         vmMigrationClient.listCutoverJobsCallable().call(request);
   *     for (CutoverJob element : response.getCutoverJobsList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listCutoverJobsCallable() { return stub.listCutoverJobsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single CutoverJob. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CutoverJobName name =
   *       CutoverJobName.of(
   *           "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CUTOVER_JOB]");
   *   CutoverJob response = vmMigrationClient.getCutoverJob(name);
   * }
   * }
* * @param name Required. The name of the CutoverJob. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CutoverJob getCutoverJob(CutoverJobName name) { GetCutoverJobRequest request = GetCutoverJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getCutoverJob(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single CutoverJob. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String name =
   *       CutoverJobName.of(
   *               "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CUTOVER_JOB]")
   *           .toString();
   *   CutoverJob response = vmMigrationClient.getCutoverJob(name);
   * }
   * }
* * @param name Required. The name of the CutoverJob. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CutoverJob getCutoverJob(String name) { GetCutoverJobRequest request = GetCutoverJobRequest.newBuilder().setName(name).build(); return getCutoverJob(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single CutoverJob. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   GetCutoverJobRequest request =
   *       GetCutoverJobRequest.newBuilder()
   *           .setName(
   *               CutoverJobName.of(
   *                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CUTOVER_JOB]")
   *                   .toString())
   *           .build();
   *   CutoverJob response = vmMigrationClient.getCutoverJob(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CutoverJob getCutoverJob(GetCutoverJobRequest request) { return getCutoverJobCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single CutoverJob. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   GetCutoverJobRequest request =
   *       GetCutoverJobRequest.newBuilder()
   *           .setName(
   *               CutoverJobName.of(
   *                       "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CUTOVER_JOB]")
   *                   .toString())
   *           .build();
   *   ApiFuture future = vmMigrationClient.getCutoverJobCallable().futureCall(request);
   *   // Do something.
   *   CutoverJob response = future.get();
   * }
   * }
*/ public final UnaryCallable getCutoverJobCallable() { return stub.getCutoverJobCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Groups in a given project and location. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   *   for (Group element : vmMigrationClient.listGroups(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The parent, which owns this collection of groups. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListGroupsPagedResponse listGroups(LocationName parent) { ListGroupsRequest request = ListGroupsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); return listGroups(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Groups in a given project and location. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   *   for (Group element : vmMigrationClient.listGroups(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The parent, which owns this collection of groups. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListGroupsPagedResponse listGroups(String parent) { ListGroupsRequest request = ListGroupsRequest.newBuilder().setParent(parent).build(); return listGroups(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Groups in a given project and location. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListGroupsRequest request =
   *       ListGroupsRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   for (Group element : vmMigrationClient.listGroups(request).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListGroupsPagedResponse listGroups(ListGroupsRequest request) { return listGroupsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Groups in a given project and location. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListGroupsRequest request =
   *       ListGroupsRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   ApiFuture future = vmMigrationClient.listGroupsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (Group element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listGroupsPagedCallable() { return stub.listGroupsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Groups in a given project and location. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListGroupsRequest request =
   *       ListGroupsRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   while (true) {
   *     ListGroupsResponse response = vmMigrationClient.listGroupsCallable().call(request);
   *     for (Group element : response.getGroupsList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listGroupsCallable() { return stub.listGroupsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Group. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   GroupName name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]");
   *   Group response = vmMigrationClient.getGroup(name);
   * }
   * }
* * @param name Required. The group name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Group getGroup(GroupName name) { GetGroupRequest request = GetGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getGroup(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Group. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString();
   *   Group response = vmMigrationClient.getGroup(name);
   * }
   * }
* * @param name Required. The group name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Group getGroup(String name) { GetGroupRequest request = GetGroupRequest.newBuilder().setName(name).build(); return getGroup(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Group. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   GetGroupRequest request =
   *       GetGroupRequest.newBuilder()
   *           .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
   *           .build();
   *   Group response = vmMigrationClient.getGroup(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Group getGroup(GetGroupRequest request) { return getGroupCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Group. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   GetGroupRequest request =
   *       GetGroupRequest.newBuilder()
   *           .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
   *           .build();
   *   ApiFuture future = vmMigrationClient.getGroupCallable().futureCall(request);
   *   // Do something.
   *   Group response = future.get();
   * }
   * }
*/ public final UnaryCallable getGroupCallable() { return stub.getGroupCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Group in a given project and location. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   *   Group group = Group.newBuilder().build();
   *   String groupId = "groupId293428218";
   *   Group response = vmMigrationClient.createGroupAsync(parent, group, groupId).get();
   * }
   * }
* * @param parent Required. The Group's parent. * @param group Required. The create request body. * @param groupId Required. The group identifier. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createGroupAsync( LocationName parent, Group group, String groupId) { CreateGroupRequest request = CreateGroupRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setGroup(group) .setGroupId(groupId) .build(); return createGroupAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Group in a given project and location. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   *   Group group = Group.newBuilder().build();
   *   String groupId = "groupId293428218";
   *   Group response = vmMigrationClient.createGroupAsync(parent, group, groupId).get();
   * }
   * }
* * @param parent Required. The Group's parent. * @param group Required. The create request body. * @param groupId Required. The group identifier. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createGroupAsync( String parent, Group group, String groupId) { CreateGroupRequest request = CreateGroupRequest.newBuilder() .setParent(parent) .setGroup(group) .setGroupId(groupId) .build(); return createGroupAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Group in a given project and location. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CreateGroupRequest request =
   *       CreateGroupRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setGroupId("groupId293428218")
   *           .setGroup(Group.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   Group response = vmMigrationClient.createGroupAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createGroupAsync( CreateGroupRequest request) { return createGroupOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Group in a given project and location. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CreateGroupRequest request =
   *       CreateGroupRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setGroupId("groupId293428218")
   *           .setGroup(Group.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.createGroupOperationCallable().futureCall(request);
   *   // Do something.
   *   Group response = future.get();
   * }
   * }
*/ public final OperationCallable createGroupOperationCallable() { return stub.createGroupOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Group in a given project and location. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CreateGroupRequest request =
   *       CreateGroupRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setGroupId("groupId293428218")
   *           .setGroup(Group.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future = vmMigrationClient.createGroupCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable createGroupCallable() { return stub.createGroupCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Group. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   Group group = Group.newBuilder().build();
   *   FieldMask updateMask = FieldMask.newBuilder().build();
   *   Group response = vmMigrationClient.updateGroupAsync(group, updateMask).get();
   * }
   * }
* * @param group Required. The update request body. * @param updateMask Field mask is used to specify the fields to be overwritten in the Group * resource by the update. The fields 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. If the * user does not provide a mask then all fields will be overwritten. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateGroupAsync( Group group, FieldMask updateMask) { UpdateGroupRequest request = UpdateGroupRequest.newBuilder().setGroup(group).setUpdateMask(updateMask).build(); return updateGroupAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Group. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   UpdateGroupRequest request =
   *       UpdateGroupRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setGroup(Group.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   Group response = vmMigrationClient.updateGroupAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateGroupAsync( UpdateGroupRequest request) { return updateGroupOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Group. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   UpdateGroupRequest request =
   *       UpdateGroupRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setGroup(Group.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.updateGroupOperationCallable().futureCall(request);
   *   // Do something.
   *   Group response = future.get();
   * }
   * }
*/ public final OperationCallable updateGroupOperationCallable() { return stub.updateGroupOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Group. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   UpdateGroupRequest request =
   *       UpdateGroupRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setGroup(Group.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future = vmMigrationClient.updateGroupCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable updateGroupCallable() { return stub.updateGroupCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Group. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   GroupName name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]");
   *   vmMigrationClient.deleteGroupAsync(name).get();
   * }
   * }
* * @param name Required. The Group name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteGroupAsync(GroupName name) { DeleteGroupRequest request = DeleteGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return deleteGroupAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Group. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString();
   *   vmMigrationClient.deleteGroupAsync(name).get();
   * }
   * }
* * @param name Required. The Group name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteGroupAsync(String name) { DeleteGroupRequest request = DeleteGroupRequest.newBuilder().setName(name).build(); return deleteGroupAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Group. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   DeleteGroupRequest request =
   *       DeleteGroupRequest.newBuilder()
   *           .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   vmMigrationClient.deleteGroupAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteGroupAsync( DeleteGroupRequest request) { return deleteGroupOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Group. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   DeleteGroupRequest request =
   *       DeleteGroupRequest.newBuilder()
   *           .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.deleteGroupOperationCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final OperationCallable deleteGroupOperationCallable() { return stub.deleteGroupOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Group. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   DeleteGroupRequest request =
   *       DeleteGroupRequest.newBuilder()
   *           .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future = vmMigrationClient.deleteGroupCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteGroupCallable() { return stub.deleteGroupCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds a MigratingVm to a Group. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   GroupName group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]");
   *   AddGroupMigrationResponse response = vmMigrationClient.addGroupMigrationAsync(group).get();
   * }
   * }
* * @param group Required. The full path name of the Group to add to. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture addGroupMigrationAsync( GroupName group) { AddGroupMigrationRequest request = AddGroupMigrationRequest.newBuilder() .setGroup(group == null ? null : group.toString()) .build(); return addGroupMigrationAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds a MigratingVm to a Group. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString();
   *   AddGroupMigrationResponse response = vmMigrationClient.addGroupMigrationAsync(group).get();
   * }
   * }
* * @param group Required. The full path name of the Group to add to. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture addGroupMigrationAsync( String group) { AddGroupMigrationRequest request = AddGroupMigrationRequest.newBuilder().setGroup(group).build(); return addGroupMigrationAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds a MigratingVm to a Group. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   AddGroupMigrationRequest request =
   *       AddGroupMigrationRequest.newBuilder()
   *           .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
   *           .setMigratingVm(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .build();
   *   AddGroupMigrationResponse response = vmMigrationClient.addGroupMigrationAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture addGroupMigrationAsync( AddGroupMigrationRequest request) { return addGroupMigrationOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds a MigratingVm to a Group. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   AddGroupMigrationRequest request =
   *       AddGroupMigrationRequest.newBuilder()
   *           .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
   *           .setMigratingVm(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.addGroupMigrationOperationCallable().futureCall(request);
   *   // Do something.
   *   AddGroupMigrationResponse response = future.get();
   * }
   * }
*/ public final OperationCallable< AddGroupMigrationRequest, AddGroupMigrationResponse, OperationMetadata> addGroupMigrationOperationCallable() { return stub.addGroupMigrationOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Adds a MigratingVm to a Group. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   AddGroupMigrationRequest request =
   *       AddGroupMigrationRequest.newBuilder()
   *           .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
   *           .setMigratingVm(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.addGroupMigrationCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable addGroupMigrationCallable() { return stub.addGroupMigrationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Removes a MigratingVm from a Group. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   GroupName group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]");
   *   RemoveGroupMigrationResponse response =
   *       vmMigrationClient.removeGroupMigrationAsync(group).get();
   * }
   * }
* * @param group Required. The name of the Group. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture removeGroupMigrationAsync(GroupName group) { RemoveGroupMigrationRequest request = RemoveGroupMigrationRequest.newBuilder() .setGroup(group == null ? null : group.toString()) .build(); return removeGroupMigrationAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Removes a MigratingVm from a Group. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString();
   *   RemoveGroupMigrationResponse response =
   *       vmMigrationClient.removeGroupMigrationAsync(group).get();
   * }
   * }
* * @param group Required. The name of the Group. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture removeGroupMigrationAsync(String group) { RemoveGroupMigrationRequest request = RemoveGroupMigrationRequest.newBuilder().setGroup(group).build(); return removeGroupMigrationAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Removes a MigratingVm from a Group. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   RemoveGroupMigrationRequest request =
   *       RemoveGroupMigrationRequest.newBuilder()
   *           .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
   *           .setMigratingVm(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .build();
   *   RemoveGroupMigrationResponse response =
   *       vmMigrationClient.removeGroupMigrationAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture removeGroupMigrationAsync(RemoveGroupMigrationRequest request) { return removeGroupMigrationOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Removes a MigratingVm from a Group. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   RemoveGroupMigrationRequest request =
   *       RemoveGroupMigrationRequest.newBuilder()
   *           .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
   *           .setMigratingVm(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.removeGroupMigrationOperationCallable().futureCall(request);
   *   // Do something.
   *   RemoveGroupMigrationResponse response = future.get();
   * }
   * }
*/ public final OperationCallable< RemoveGroupMigrationRequest, RemoveGroupMigrationResponse, OperationMetadata> removeGroupMigrationOperationCallable() { return stub.removeGroupMigrationOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Removes a MigratingVm from a Group. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   RemoveGroupMigrationRequest request =
   *       RemoveGroupMigrationRequest.newBuilder()
   *           .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
   *           .setMigratingVm(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.removeGroupMigrationCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable removeGroupMigrationCallable() { return stub.removeGroupMigrationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists TargetProjects in a given project. * *

NOTE: TargetProject is a global resource; hence the only supported value for location is * `global`. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   *   for (TargetProject element : vmMigrationClient.listTargetProjects(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The parent, which owns this collection of targets. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTargetProjectsPagedResponse listTargetProjects(LocationName parent) { ListTargetProjectsRequest request = ListTargetProjectsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listTargetProjects(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists TargetProjects in a given project. * *

NOTE: TargetProject is a global resource; hence the only supported value for location is * `global`. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   *   for (TargetProject element : vmMigrationClient.listTargetProjects(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The parent, which owns this collection of targets. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTargetProjectsPagedResponse listTargetProjects(String parent) { ListTargetProjectsRequest request = ListTargetProjectsRequest.newBuilder().setParent(parent).build(); return listTargetProjects(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists TargetProjects in a given project. * *

NOTE: TargetProject is a global resource; hence the only supported value for location is * `global`. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListTargetProjectsRequest request =
   *       ListTargetProjectsRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   for (TargetProject element : vmMigrationClient.listTargetProjects(request).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTargetProjectsPagedResponse listTargetProjects( ListTargetProjectsRequest request) { return listTargetProjectsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists TargetProjects in a given project. * *

NOTE: TargetProject is a global resource; hence the only supported value for location is * `global`. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListTargetProjectsRequest request =
   *       ListTargetProjectsRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.listTargetProjectsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (TargetProject element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listTargetProjectsPagedCallable() { return stub.listTargetProjectsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists TargetProjects in a given project. * *

NOTE: TargetProject is a global resource; hence the only supported value for location is * `global`. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListTargetProjectsRequest request =
   *       ListTargetProjectsRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   while (true) {
   *     ListTargetProjectsResponse response =
   *         vmMigrationClient.listTargetProjectsCallable().call(request);
   *     for (TargetProject element : response.getTargetProjectsList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listTargetProjectsCallable() { return stub.listTargetProjectsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single TargetProject. * *

NOTE: TargetProject is a global resource; hence the only supported value for location is * `global`. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   TargetProjectName name = TargetProjectName.of("[PROJECT]", "[LOCATION]", "[TARGET_PROJECT]");
   *   TargetProject response = vmMigrationClient.getTargetProject(name);
   * }
   * }
* * @param name Required. The TargetProject name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TargetProject getTargetProject(TargetProjectName name) { GetTargetProjectRequest request = GetTargetProjectRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getTargetProject(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single TargetProject. * *

NOTE: TargetProject is a global resource; hence the only supported value for location is * `global`. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String name = TargetProjectName.of("[PROJECT]", "[LOCATION]", "[TARGET_PROJECT]").toString();
   *   TargetProject response = vmMigrationClient.getTargetProject(name);
   * }
   * }
* * @param name Required. The TargetProject name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TargetProject getTargetProject(String name) { GetTargetProjectRequest request = GetTargetProjectRequest.newBuilder().setName(name).build(); return getTargetProject(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single TargetProject. * *

NOTE: TargetProject is a global resource; hence the only supported value for location is * `global`. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   GetTargetProjectRequest request =
   *       GetTargetProjectRequest.newBuilder()
   *           .setName(
   *               TargetProjectName.of("[PROJECT]", "[LOCATION]", "[TARGET_PROJECT]").toString())
   *           .build();
   *   TargetProject response = vmMigrationClient.getTargetProject(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TargetProject getTargetProject(GetTargetProjectRequest request) { return getTargetProjectCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single TargetProject. * *

NOTE: TargetProject is a global resource; hence the only supported value for location is * `global`. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   GetTargetProjectRequest request =
   *       GetTargetProjectRequest.newBuilder()
   *           .setName(
   *               TargetProjectName.of("[PROJECT]", "[LOCATION]", "[TARGET_PROJECT]").toString())
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.getTargetProjectCallable().futureCall(request);
   *   // Do something.
   *   TargetProject response = future.get();
   * }
   * }
*/ public final UnaryCallable getTargetProjectCallable() { return stub.getTargetProjectCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new TargetProject in a given project. * *

NOTE: TargetProject is a global resource; hence the only supported value for location is * `global`. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   *   TargetProject targetProject = TargetProject.newBuilder().build();
   *   String targetProjectId = "targetProjectId1290130307";
   *   TargetProject response =
   *       vmMigrationClient.createTargetProjectAsync(parent, targetProject, targetProjectId).get();
   * }
   * }
* * @param parent Required. The TargetProject's parent. * @param targetProject Required. The create request body. * @param targetProjectId Required. The target_project identifier. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createTargetProjectAsync( LocationName parent, TargetProject targetProject, String targetProjectId) { CreateTargetProjectRequest request = CreateTargetProjectRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setTargetProject(targetProject) .setTargetProjectId(targetProjectId) .build(); return createTargetProjectAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new TargetProject in a given project. * *

NOTE: TargetProject is a global resource; hence the only supported value for location is * `global`. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   *   TargetProject targetProject = TargetProject.newBuilder().build();
   *   String targetProjectId = "targetProjectId1290130307";
   *   TargetProject response =
   *       vmMigrationClient.createTargetProjectAsync(parent, targetProject, targetProjectId).get();
   * }
   * }
* * @param parent Required. The TargetProject's parent. * @param targetProject Required. The create request body. * @param targetProjectId Required. The target_project identifier. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createTargetProjectAsync( String parent, TargetProject targetProject, String targetProjectId) { CreateTargetProjectRequest request = CreateTargetProjectRequest.newBuilder() .setParent(parent) .setTargetProject(targetProject) .setTargetProjectId(targetProjectId) .build(); return createTargetProjectAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new TargetProject in a given project. * *

NOTE: TargetProject is a global resource; hence the only supported value for location is * `global`. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CreateTargetProjectRequest request =
   *       CreateTargetProjectRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setTargetProjectId("targetProjectId1290130307")
   *           .setTargetProject(TargetProject.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   TargetProject response = vmMigrationClient.createTargetProjectAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createTargetProjectAsync( CreateTargetProjectRequest request) { return createTargetProjectOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new TargetProject in a given project. * *

NOTE: TargetProject is a global resource; hence the only supported value for location is * `global`. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CreateTargetProjectRequest request =
   *       CreateTargetProjectRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setTargetProjectId("targetProjectId1290130307")
   *           .setTargetProject(TargetProject.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.createTargetProjectOperationCallable().futureCall(request);
   *   // Do something.
   *   TargetProject response = future.get();
   * }
   * }
*/ public final OperationCallable createTargetProjectOperationCallable() { return stub.createTargetProjectOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new TargetProject in a given project. * *

NOTE: TargetProject is a global resource; hence the only supported value for location is * `global`. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   CreateTargetProjectRequest request =
   *       CreateTargetProjectRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setTargetProjectId("targetProjectId1290130307")
   *           .setTargetProject(TargetProject.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.createTargetProjectCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable createTargetProjectCallable() { return stub.createTargetProjectCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single TargetProject. * *

NOTE: TargetProject is a global resource; hence the only supported value for location is * `global`. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   TargetProject targetProject = TargetProject.newBuilder().build();
   *   FieldMask updateMask = FieldMask.newBuilder().build();
   *   TargetProject response =
   *       vmMigrationClient.updateTargetProjectAsync(targetProject, updateMask).get();
   * }
   * }
* * @param targetProject Required. The update request body. * @param updateMask Field mask is used to specify the fields to be overwritten in the * TargetProject resource by the update. The fields 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. If * the user does not provide a mask then all fields will be overwritten. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateTargetProjectAsync( TargetProject targetProject, FieldMask updateMask) { UpdateTargetProjectRequest request = UpdateTargetProjectRequest.newBuilder() .setTargetProject(targetProject) .setUpdateMask(updateMask) .build(); return updateTargetProjectAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single TargetProject. * *

NOTE: TargetProject is a global resource; hence the only supported value for location is * `global`. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   UpdateTargetProjectRequest request =
   *       UpdateTargetProjectRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setTargetProject(TargetProject.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   TargetProject response = vmMigrationClient.updateTargetProjectAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateTargetProjectAsync( UpdateTargetProjectRequest request) { return updateTargetProjectOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single TargetProject. * *

NOTE: TargetProject is a global resource; hence the only supported value for location is * `global`. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   UpdateTargetProjectRequest request =
   *       UpdateTargetProjectRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setTargetProject(TargetProject.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.updateTargetProjectOperationCallable().futureCall(request);
   *   // Do something.
   *   TargetProject response = future.get();
   * }
   * }
*/ public final OperationCallable updateTargetProjectOperationCallable() { return stub.updateTargetProjectOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single TargetProject. * *

NOTE: TargetProject is a global resource; hence the only supported value for location is * `global`. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   UpdateTargetProjectRequest request =
   *       UpdateTargetProjectRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setTargetProject(TargetProject.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.updateTargetProjectCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable updateTargetProjectCallable() { return stub.updateTargetProjectCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single TargetProject. * *

NOTE: TargetProject is a global resource; hence the only supported value for location is * `global`. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   TargetProjectName name = TargetProjectName.of("[PROJECT]", "[LOCATION]", "[TARGET_PROJECT]");
   *   vmMigrationClient.deleteTargetProjectAsync(name).get();
   * }
   * }
* * @param name Required. The TargetProject name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteTargetProjectAsync( TargetProjectName name) { DeleteTargetProjectRequest request = DeleteTargetProjectRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return deleteTargetProjectAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single TargetProject. * *

NOTE: TargetProject is a global resource; hence the only supported value for location is * `global`. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String name = TargetProjectName.of("[PROJECT]", "[LOCATION]", "[TARGET_PROJECT]").toString();
   *   vmMigrationClient.deleteTargetProjectAsync(name).get();
   * }
   * }
* * @param name Required. The TargetProject name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteTargetProjectAsync(String name) { DeleteTargetProjectRequest request = DeleteTargetProjectRequest.newBuilder().setName(name).build(); return deleteTargetProjectAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single TargetProject. * *

NOTE: TargetProject is a global resource; hence the only supported value for location is * `global`. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   DeleteTargetProjectRequest request =
   *       DeleteTargetProjectRequest.newBuilder()
   *           .setName(
   *               TargetProjectName.of("[PROJECT]", "[LOCATION]", "[TARGET_PROJECT]").toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   vmMigrationClient.deleteTargetProjectAsync(request).get();
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteTargetProjectAsync( DeleteTargetProjectRequest request) { return deleteTargetProjectOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single TargetProject. * *

NOTE: TargetProject is a global resource; hence the only supported value for location is * `global`. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   DeleteTargetProjectRequest request =
   *       DeleteTargetProjectRequest.newBuilder()
   *           .setName(
   *               TargetProjectName.of("[PROJECT]", "[LOCATION]", "[TARGET_PROJECT]").toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       vmMigrationClient.deleteTargetProjectOperationCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final OperationCallable deleteTargetProjectOperationCallable() { return stub.deleteTargetProjectOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single TargetProject. * *

NOTE: TargetProject is a global resource; hence the only supported value for location is * `global`. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   DeleteTargetProjectRequest request =
   *       DeleteTargetProjectRequest.newBuilder()
   *           .setName(
   *               TargetProjectName.of("[PROJECT]", "[LOCATION]", "[TARGET_PROJECT]").toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.deleteTargetProjectCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteTargetProjectCallable() { return stub.deleteTargetProjectCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists ReplicationCycles in a given MigratingVM. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   MigratingVmName parent =
   *       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]");
   *   for (ReplicationCycle element :
   *       vmMigrationClient.listReplicationCycles(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The parent, which owns this collection of ReplicationCycles. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListReplicationCyclesPagedResponse listReplicationCycles(MigratingVmName parent) { ListReplicationCyclesRequest request = ListReplicationCyclesRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listReplicationCycles(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists ReplicationCycles in a given MigratingVM. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String parent =
   *       MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]").toString();
   *   for (ReplicationCycle element :
   *       vmMigrationClient.listReplicationCycles(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The parent, which owns this collection of ReplicationCycles. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListReplicationCyclesPagedResponse listReplicationCycles(String parent) { ListReplicationCyclesRequest request = ListReplicationCyclesRequest.newBuilder().setParent(parent).build(); return listReplicationCycles(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists ReplicationCycles in a given MigratingVM. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListReplicationCyclesRequest request =
   *       ListReplicationCyclesRequest.newBuilder()
   *           .setParent(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   for (ReplicationCycle element :
   *       vmMigrationClient.listReplicationCycles(request).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListReplicationCyclesPagedResponse listReplicationCycles( ListReplicationCyclesRequest request) { return listReplicationCyclesPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists ReplicationCycles in a given MigratingVM. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListReplicationCyclesRequest request =
   *       ListReplicationCyclesRequest.newBuilder()
   *           .setParent(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.listReplicationCyclesPagedCallable().futureCall(request);
   *   // Do something.
   *   for (ReplicationCycle element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listReplicationCyclesPagedCallable() { return stub.listReplicationCyclesPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists ReplicationCycles in a given MigratingVM. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListReplicationCyclesRequest request =
   *       ListReplicationCyclesRequest.newBuilder()
   *           .setParent(
   *               MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
   *                   .toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   while (true) {
   *     ListReplicationCyclesResponse response =
   *         vmMigrationClient.listReplicationCyclesCallable().call(request);
   *     for (ReplicationCycle element : response.getReplicationCyclesList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listReplicationCyclesCallable() { return stub.listReplicationCyclesCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single ReplicationCycle. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ReplicationCycleName name =
   *       ReplicationCycleName.of(
   *           "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[REPLICATION_CYCLE]");
   *   ReplicationCycle response = vmMigrationClient.getReplicationCycle(name);
   * }
   * }
* * @param name Required. The name of the ReplicationCycle. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ReplicationCycle getReplicationCycle(ReplicationCycleName name) { GetReplicationCycleRequest request = GetReplicationCycleRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return getReplicationCycle(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single ReplicationCycle. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   String name =
   *       ReplicationCycleName.of(
   *               "[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[REPLICATION_CYCLE]")
   *           .toString();
   *   ReplicationCycle response = vmMigrationClient.getReplicationCycle(name);
   * }
   * }
* * @param name Required. The name of the ReplicationCycle. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ReplicationCycle getReplicationCycle(String name) { GetReplicationCycleRequest request = GetReplicationCycleRequest.newBuilder().setName(name).build(); return getReplicationCycle(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single ReplicationCycle. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   GetReplicationCycleRequest request =
   *       GetReplicationCycleRequest.newBuilder()
   *           .setName(
   *               ReplicationCycleName.of(
   *                       "[PROJECT]",
   *                       "[LOCATION]",
   *                       "[SOURCE]",
   *                       "[MIGRATING_VM]",
   *                       "[REPLICATION_CYCLE]")
   *                   .toString())
   *           .build();
   *   ReplicationCycle response = vmMigrationClient.getReplicationCycle(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ReplicationCycle getReplicationCycle(GetReplicationCycleRequest request) { return getReplicationCycleCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single ReplicationCycle. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   GetReplicationCycleRequest request =
   *       GetReplicationCycleRequest.newBuilder()
   *           .setName(
   *               ReplicationCycleName.of(
   *                       "[PROJECT]",
   *                       "[LOCATION]",
   *                       "[SOURCE]",
   *                       "[MIGRATING_VM]",
   *                       "[REPLICATION_CYCLE]")
   *                   .toString())
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.getReplicationCycleCallable().futureCall(request);
   *   // Do something.
   *   ReplicationCycle response = future.get();
   * }
   * }
*/ public final UnaryCallable getReplicationCycleCallable() { return stub.getReplicationCycleCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListLocationsRequest request =
   *       ListLocationsRequest.newBuilder()
   *           .setName("name3373707")
   *           .setFilter("filter-1274492040")
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .build();
   *   for (Location element : vmMigrationClient.listLocations(request).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { return listLocationsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListLocationsRequest request =
   *       ListLocationsRequest.newBuilder()
   *           .setName("name3373707")
   *           .setFilter("filter-1274492040")
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .build();
   *   ApiFuture future =
   *       vmMigrationClient.listLocationsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (Location element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listLocationsPagedCallable() { return stub.listLocationsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   ListLocationsRequest request =
   *       ListLocationsRequest.newBuilder()
   *           .setName("name3373707")
   *           .setFilter("filter-1274492040")
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .build();
   *   while (true) {
   *     ListLocationsResponse response = vmMigrationClient.listLocationsCallable().call(request);
   *     for (Location element : response.getLocationsList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listLocationsCallable() { return stub.listLocationsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets information about a location. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   *   Location response = vmMigrationClient.getLocation(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Location getLocation(GetLocationRequest request) { return getLocationCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets information about a location. * *

Sample code: * *

{@code
   * // 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.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   *   ApiFuture future = vmMigrationClient.getLocationCallable().futureCall(request);
   *   // Do something.
   *   Location response = future.get();
   * }
   * }
*/ public final UnaryCallable getLocationCallable() { return stub.getLocationCallable(); } @Override public final void close() { stub.close(); } @Override public void shutdown() { stub.shutdown(); } @Override public boolean isShutdown() { return stub.isShutdown(); } @Override public boolean isTerminated() { return stub.isTerminated(); } @Override public void shutdownNow() { stub.shutdownNow(); } @Override public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { return stub.awaitTermination(duration, unit); } public static class ListSourcesPagedResponse extends AbstractPagedListResponse< ListSourcesRequest, ListSourcesResponse, Source, ListSourcesPage, ListSourcesFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListSourcesPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListSourcesPagedResponse(input), MoreExecutors.directExecutor()); } private ListSourcesPagedResponse(ListSourcesPage page) { super(page, ListSourcesFixedSizeCollection.createEmptyCollection()); } } public static class ListSourcesPage extends AbstractPage { private ListSourcesPage( PageContext context, ListSourcesResponse response) { super(context, response); } private static ListSourcesPage createEmptyPage() { return new ListSourcesPage(null, null); } @Override protected ListSourcesPage createPage( PageContext context, ListSourcesResponse response) { return new ListSourcesPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListSourcesFixedSizeCollection extends AbstractFixedSizeCollection< ListSourcesRequest, ListSourcesResponse, Source, ListSourcesPage, ListSourcesFixedSizeCollection> { private ListSourcesFixedSizeCollection(List pages, int collectionSize) { super(pages, collectionSize); } private static ListSourcesFixedSizeCollection createEmptyCollection() { return new ListSourcesFixedSizeCollection(null, 0); } @Override protected ListSourcesFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListSourcesFixedSizeCollection(pages, collectionSize); } } public static class ListUtilizationReportsPagedResponse extends AbstractPagedListResponse< ListUtilizationReportsRequest, ListUtilizationReportsResponse, UtilizationReport, ListUtilizationReportsPage, ListUtilizationReportsFixedSizeCollection> { public static ApiFuture createAsync( PageContext< ListUtilizationReportsRequest, ListUtilizationReportsResponse, UtilizationReport> context, ApiFuture futureResponse) { ApiFuture futurePage = ListUtilizationReportsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListUtilizationReportsPagedResponse(input), MoreExecutors.directExecutor()); } private ListUtilizationReportsPagedResponse(ListUtilizationReportsPage page) { super(page, ListUtilizationReportsFixedSizeCollection.createEmptyCollection()); } } public static class ListUtilizationReportsPage extends AbstractPage< ListUtilizationReportsRequest, ListUtilizationReportsResponse, UtilizationReport, ListUtilizationReportsPage> { private ListUtilizationReportsPage( PageContext< ListUtilizationReportsRequest, ListUtilizationReportsResponse, UtilizationReport> context, ListUtilizationReportsResponse response) { super(context, response); } private static ListUtilizationReportsPage createEmptyPage() { return new ListUtilizationReportsPage(null, null); } @Override protected ListUtilizationReportsPage createPage( PageContext< ListUtilizationReportsRequest, ListUtilizationReportsResponse, UtilizationReport> context, ListUtilizationReportsResponse response) { return new ListUtilizationReportsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext< ListUtilizationReportsRequest, ListUtilizationReportsResponse, UtilizationReport> context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListUtilizationReportsFixedSizeCollection extends AbstractFixedSizeCollection< ListUtilizationReportsRequest, ListUtilizationReportsResponse, UtilizationReport, ListUtilizationReportsPage, ListUtilizationReportsFixedSizeCollection> { private ListUtilizationReportsFixedSizeCollection( List pages, int collectionSize) { super(pages, collectionSize); } private static ListUtilizationReportsFixedSizeCollection createEmptyCollection() { return new ListUtilizationReportsFixedSizeCollection(null, 0); } @Override protected ListUtilizationReportsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListUtilizationReportsFixedSizeCollection(pages, collectionSize); } } public static class ListDatacenterConnectorsPagedResponse extends AbstractPagedListResponse< ListDatacenterConnectorsRequest, ListDatacenterConnectorsResponse, DatacenterConnector, ListDatacenterConnectorsPage, ListDatacenterConnectorsFixedSizeCollection> { public static ApiFuture createAsync( PageContext< ListDatacenterConnectorsRequest, ListDatacenterConnectorsResponse, DatacenterConnector> context, ApiFuture futureResponse) { ApiFuture futurePage = ListDatacenterConnectorsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListDatacenterConnectorsPagedResponse(input), MoreExecutors.directExecutor()); } private ListDatacenterConnectorsPagedResponse(ListDatacenterConnectorsPage page) { super(page, ListDatacenterConnectorsFixedSizeCollection.createEmptyCollection()); } } public static class ListDatacenterConnectorsPage extends AbstractPage< ListDatacenterConnectorsRequest, ListDatacenterConnectorsResponse, DatacenterConnector, ListDatacenterConnectorsPage> { private ListDatacenterConnectorsPage( PageContext< ListDatacenterConnectorsRequest, ListDatacenterConnectorsResponse, DatacenterConnector> context, ListDatacenterConnectorsResponse response) { super(context, response); } private static ListDatacenterConnectorsPage createEmptyPage() { return new ListDatacenterConnectorsPage(null, null); } @Override protected ListDatacenterConnectorsPage createPage( PageContext< ListDatacenterConnectorsRequest, ListDatacenterConnectorsResponse, DatacenterConnector> context, ListDatacenterConnectorsResponse response) { return new ListDatacenterConnectorsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext< ListDatacenterConnectorsRequest, ListDatacenterConnectorsResponse, DatacenterConnector> context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListDatacenterConnectorsFixedSizeCollection extends AbstractFixedSizeCollection< ListDatacenterConnectorsRequest, ListDatacenterConnectorsResponse, DatacenterConnector, ListDatacenterConnectorsPage, ListDatacenterConnectorsFixedSizeCollection> { private ListDatacenterConnectorsFixedSizeCollection( List pages, int collectionSize) { super(pages, collectionSize); } private static ListDatacenterConnectorsFixedSizeCollection createEmptyCollection() { return new ListDatacenterConnectorsFixedSizeCollection(null, 0); } @Override protected ListDatacenterConnectorsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListDatacenterConnectorsFixedSizeCollection(pages, collectionSize); } } public static class ListMigratingVmsPagedResponse extends AbstractPagedListResponse< ListMigratingVmsRequest, ListMigratingVmsResponse, MigratingVm, ListMigratingVmsPage, ListMigratingVmsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListMigratingVmsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListMigratingVmsPagedResponse(input), MoreExecutors.directExecutor()); } private ListMigratingVmsPagedResponse(ListMigratingVmsPage page) { super(page, ListMigratingVmsFixedSizeCollection.createEmptyCollection()); } } public static class ListMigratingVmsPage extends AbstractPage< ListMigratingVmsRequest, ListMigratingVmsResponse, MigratingVm, ListMigratingVmsPage> { private ListMigratingVmsPage( PageContext context, ListMigratingVmsResponse response) { super(context, response); } private static ListMigratingVmsPage createEmptyPage() { return new ListMigratingVmsPage(null, null); } @Override protected ListMigratingVmsPage createPage( PageContext context, ListMigratingVmsResponse response) { return new ListMigratingVmsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListMigratingVmsFixedSizeCollection extends AbstractFixedSizeCollection< ListMigratingVmsRequest, ListMigratingVmsResponse, MigratingVm, ListMigratingVmsPage, ListMigratingVmsFixedSizeCollection> { private ListMigratingVmsFixedSizeCollection( List pages, int collectionSize) { super(pages, collectionSize); } private static ListMigratingVmsFixedSizeCollection createEmptyCollection() { return new ListMigratingVmsFixedSizeCollection(null, 0); } @Override protected ListMigratingVmsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListMigratingVmsFixedSizeCollection(pages, collectionSize); } } public static class ListCloneJobsPagedResponse extends AbstractPagedListResponse< ListCloneJobsRequest, ListCloneJobsResponse, CloneJob, ListCloneJobsPage, ListCloneJobsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListCloneJobsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListCloneJobsPagedResponse(input), MoreExecutors.directExecutor()); } private ListCloneJobsPagedResponse(ListCloneJobsPage page) { super(page, ListCloneJobsFixedSizeCollection.createEmptyCollection()); } } public static class ListCloneJobsPage extends AbstractPage< ListCloneJobsRequest, ListCloneJobsResponse, CloneJob, ListCloneJobsPage> { private ListCloneJobsPage( PageContext context, ListCloneJobsResponse response) { super(context, response); } private static ListCloneJobsPage createEmptyPage() { return new ListCloneJobsPage(null, null); } @Override protected ListCloneJobsPage createPage( PageContext context, ListCloneJobsResponse response) { return new ListCloneJobsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListCloneJobsFixedSizeCollection extends AbstractFixedSizeCollection< ListCloneJobsRequest, ListCloneJobsResponse, CloneJob, ListCloneJobsPage, ListCloneJobsFixedSizeCollection> { private ListCloneJobsFixedSizeCollection(List pages, int collectionSize) { super(pages, collectionSize); } private static ListCloneJobsFixedSizeCollection createEmptyCollection() { return new ListCloneJobsFixedSizeCollection(null, 0); } @Override protected ListCloneJobsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListCloneJobsFixedSizeCollection(pages, collectionSize); } } public static class ListCutoverJobsPagedResponse extends AbstractPagedListResponse< ListCutoverJobsRequest, ListCutoverJobsResponse, CutoverJob, ListCutoverJobsPage, ListCutoverJobsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListCutoverJobsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListCutoverJobsPagedResponse(input), MoreExecutors.directExecutor()); } private ListCutoverJobsPagedResponse(ListCutoverJobsPage page) { super(page, ListCutoverJobsFixedSizeCollection.createEmptyCollection()); } } public static class ListCutoverJobsPage extends AbstractPage< ListCutoverJobsRequest, ListCutoverJobsResponse, CutoverJob, ListCutoverJobsPage> { private ListCutoverJobsPage( PageContext context, ListCutoverJobsResponse response) { super(context, response); } private static ListCutoverJobsPage createEmptyPage() { return new ListCutoverJobsPage(null, null); } @Override protected ListCutoverJobsPage createPage( PageContext context, ListCutoverJobsResponse response) { return new ListCutoverJobsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListCutoverJobsFixedSizeCollection extends AbstractFixedSizeCollection< ListCutoverJobsRequest, ListCutoverJobsResponse, CutoverJob, ListCutoverJobsPage, ListCutoverJobsFixedSizeCollection> { private ListCutoverJobsFixedSizeCollection( List pages, int collectionSize) { super(pages, collectionSize); } private static ListCutoverJobsFixedSizeCollection createEmptyCollection() { return new ListCutoverJobsFixedSizeCollection(null, 0); } @Override protected ListCutoverJobsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListCutoverJobsFixedSizeCollection(pages, collectionSize); } } public static class ListGroupsPagedResponse extends AbstractPagedListResponse< ListGroupsRequest, ListGroupsResponse, Group, ListGroupsPage, ListGroupsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListGroupsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListGroupsPagedResponse(input), MoreExecutors.directExecutor()); } private ListGroupsPagedResponse(ListGroupsPage page) { super(page, ListGroupsFixedSizeCollection.createEmptyCollection()); } } public static class ListGroupsPage extends AbstractPage { private ListGroupsPage( PageContext context, ListGroupsResponse response) { super(context, response); } private static ListGroupsPage createEmptyPage() { return new ListGroupsPage(null, null); } @Override protected ListGroupsPage createPage( PageContext context, ListGroupsResponse response) { return new ListGroupsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListGroupsFixedSizeCollection extends AbstractFixedSizeCollection< ListGroupsRequest, ListGroupsResponse, Group, ListGroupsPage, ListGroupsFixedSizeCollection> { private ListGroupsFixedSizeCollection(List pages, int collectionSize) { super(pages, collectionSize); } private static ListGroupsFixedSizeCollection createEmptyCollection() { return new ListGroupsFixedSizeCollection(null, 0); } @Override protected ListGroupsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListGroupsFixedSizeCollection(pages, collectionSize); } } public static class ListTargetProjectsPagedResponse extends AbstractPagedListResponse< ListTargetProjectsRequest, ListTargetProjectsResponse, TargetProject, ListTargetProjectsPage, ListTargetProjectsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListTargetProjectsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListTargetProjectsPagedResponse(input), MoreExecutors.directExecutor()); } private ListTargetProjectsPagedResponse(ListTargetProjectsPage page) { super(page, ListTargetProjectsFixedSizeCollection.createEmptyCollection()); } } public static class ListTargetProjectsPage extends AbstractPage< ListTargetProjectsRequest, ListTargetProjectsResponse, TargetProject, ListTargetProjectsPage> { private ListTargetProjectsPage( PageContext context, ListTargetProjectsResponse response) { super(context, response); } private static ListTargetProjectsPage createEmptyPage() { return new ListTargetProjectsPage(null, null); } @Override protected ListTargetProjectsPage createPage( PageContext context, ListTargetProjectsResponse response) { return new ListTargetProjectsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListTargetProjectsFixedSizeCollection extends AbstractFixedSizeCollection< ListTargetProjectsRequest, ListTargetProjectsResponse, TargetProject, ListTargetProjectsPage, ListTargetProjectsFixedSizeCollection> { private ListTargetProjectsFixedSizeCollection( List pages, int collectionSize) { super(pages, collectionSize); } private static ListTargetProjectsFixedSizeCollection createEmptyCollection() { return new ListTargetProjectsFixedSizeCollection(null, 0); } @Override protected ListTargetProjectsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListTargetProjectsFixedSizeCollection(pages, collectionSize); } } public static class ListReplicationCyclesPagedResponse extends AbstractPagedListResponse< ListReplicationCyclesRequest, ListReplicationCyclesResponse, ReplicationCycle, ListReplicationCyclesPage, ListReplicationCyclesFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListReplicationCyclesPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListReplicationCyclesPagedResponse(input), MoreExecutors.directExecutor()); } private ListReplicationCyclesPagedResponse(ListReplicationCyclesPage page) { super(page, ListReplicationCyclesFixedSizeCollection.createEmptyCollection()); } } public static class ListReplicationCyclesPage extends AbstractPage< ListReplicationCyclesRequest, ListReplicationCyclesResponse, ReplicationCycle, ListReplicationCyclesPage> { private ListReplicationCyclesPage( PageContext context, ListReplicationCyclesResponse response) { super(context, response); } private static ListReplicationCyclesPage createEmptyPage() { return new ListReplicationCyclesPage(null, null); } @Override protected ListReplicationCyclesPage createPage( PageContext context, ListReplicationCyclesResponse response) { return new ListReplicationCyclesPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListReplicationCyclesFixedSizeCollection extends AbstractFixedSizeCollection< ListReplicationCyclesRequest, ListReplicationCyclesResponse, ReplicationCycle, ListReplicationCyclesPage, ListReplicationCyclesFixedSizeCollection> { private ListReplicationCyclesFixedSizeCollection( List pages, int collectionSize) { super(pages, collectionSize); } private static ListReplicationCyclesFixedSizeCollection createEmptyCollection() { return new ListReplicationCyclesFixedSizeCollection(null, 0); } @Override protected ListReplicationCyclesFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListReplicationCyclesFixedSizeCollection(pages, collectionSize); } } public static class ListLocationsPagedResponse extends AbstractPagedListResponse< ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage, ListLocationsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListLocationsPagedResponse(input), MoreExecutors.directExecutor()); } private ListLocationsPagedResponse(ListLocationsPage page) { super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); } } public static class ListLocationsPage extends AbstractPage< ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { private ListLocationsPage( PageContext context, ListLocationsResponse response) { super(context, response); } private static ListLocationsPage createEmptyPage() { return new ListLocationsPage(null, null); } @Override protected ListLocationsPage createPage( PageContext context, ListLocationsResponse response) { return new ListLocationsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListLocationsFixedSizeCollection extends AbstractFixedSizeCollection< ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage, ListLocationsFixedSizeCollection> { private ListLocationsFixedSizeCollection(List pages, int collectionSize) { super(pages, collectionSize); } private static ListLocationsFixedSizeCollection createEmptyCollection() { return new ListLocationsFixedSizeCollection(null, 0); } @Override protected ListLocationsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListLocationsFixedSizeCollection(pages, collectionSize); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy