Class MigrationCenterClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
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:
// This snippet has been automatically generated and 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]");
Asset response = migrationCenterClient.getAsset(name);
}
Note: close() needs to be called on the MigrationCenterClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
| Method | Description | Method Variants |
|---|---|---|
ListAssets |
Lists all the assets in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetAsset |
Gets the details of an asset. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateAsset |
Updates the parameters of an asset. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
BatchUpdateAssets |
Updates the parameters of a list of assets. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteAsset |
Deletes an asset. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
BatchDeleteAssets |
Deletes list of Assets. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ReportAssetFrames |
Reports a set of frames. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
AggregateAssetsValues |
Aggregates the requested fields based on provided function. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateImportJob |
Creates an import job. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListImportJobs |
Lists all import jobs. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetImportJob |
Gets the details of an import job. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteImportJob |
Deletes an import job. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateImportJob |
Updates an import job. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ValidateImportJob |
Validates an import job. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
RunImportJob |
Runs an import job. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetImportDataFile |
Gets an import data file. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListImportDataFiles |
List import data files. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateImportDataFile |
Creates an import data file. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteImportDataFile |
Delete an import data file. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListGroups |
Lists all 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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetGroup |
Gets the details of a group. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateGroup |
Updates the parameters of a group. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteGroup |
Deletes a group. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
AddAssetsToGroup |
Adds assets to a group. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
RemoveAssetsFromGroup |
Removes assets from a group. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListErrorFrames |
Lists all error frames in a given source and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetErrorFrame |
Gets the details of an error frame. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListSources |
Lists all the 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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetSource |
Gets the details of a source. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateSource |
Updates the parameters of a source. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteSource |
Deletes a source. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListPreferenceSets |
Lists all the preference sets in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetPreferenceSet |
Gets the details of a preference set. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreatePreferenceSet |
Creates a new preference set in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdatePreferenceSet |
Updates the parameters of a preference set. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeletePreferenceSet |
Deletes a preference set. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetSettings |
Gets the details of regional settings. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateSettings |
Updates the regional-level project settings. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateReportConfig |
Creates a report configuration. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetReportConfig |
Gets details of a single ReportConfig. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListReportConfigs |
Lists ReportConfigs in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteReportConfig |
Deletes a ReportConfig. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateReport |
Creates a report. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetReport |
Gets details of a single Report. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListReports |
Lists Reports in a given ReportConfig. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteReport |
Deletes a Report. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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 MigrationCenterSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated and 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
MigrationCenterSettings migrationCenterSettings =
MigrationCenterSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
MigrationCenterClient migrationCenterClient =
MigrationCenterClient.create(migrationCenterSettings);
To customize the endpoint:
// This snippet has been automatically generated and 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
MigrationCenterSettings migrationCenterSettings =
MigrationCenterSettings.newBuilder().setEndpoint(myEndpoint).build();
MigrationCenterClient migrationCenterClient =
MigrationCenterClient.create(migrationCenterSettings);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// This snippet has been automatically generated and 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
MigrationCenterSettings migrationCenterSettings =
MigrationCenterSettings.newHttpJsonBuilder().build();
MigrationCenterClient migrationCenterClient =
MigrationCenterClient.create(migrationCenterSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMigrationCenterClient(MigrationCenterSettings settings) Constructs an instance of MigrationCenterClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionAdds assets to a group.addAssetsToGroupAsync(GroupName group) Adds assets to a group.addAssetsToGroupAsync(String group) Adds assets to a group.Adds assets to a group.Adds assets to a group.Aggregates the requested fields based on provided function.Aggregates the requested fields based on provided function.booleanawaitTermination(long duration, TimeUnit unit) final voidDeletes list of Assets.final voidbatchDeleteAssets(LocationName parent, List<String> names) Deletes list of Assets.final voidbatchDeleteAssets(String parent, List<String> names) Deletes list of Assets.final UnaryCallable<BatchDeleteAssetsRequest,com.google.protobuf.Empty> Deletes list of Assets.Updates the parameters of a list of assets.batchUpdateAssets(LocationName parent, List<UpdateAssetRequest> requests) Updates the parameters of a list of assets.batchUpdateAssets(String parent, List<UpdateAssetRequest> requests) Updates the parameters of a list of assets.Updates the parameters of a list of assets.final voidclose()static final MigrationCenterClientcreate()Constructs an instance of MigrationCenterClient with default settings.static final MigrationCenterClientcreate(MigrationCenterSettings settings) Constructs an instance of MigrationCenterClient, using the given settings.static final MigrationCenterClientcreate(MigrationCenterStub stub) Constructs an instance of MigrationCenterClient, using the given stub for making calls.createGroupAsync(CreateGroupRequest request) Creates a new group in a given project and location.createGroupAsync(LocationName parent, Group group, String groupId) Creates a new group in a given project and location.createGroupAsync(String parent, Group group, String groupId) Creates a new group in a given project and location.Creates a new group in a given project and location.Creates a new group in a given project and location.Creates an import data file.createImportDataFileAsync(ImportJobName parent, ImportDataFile importDataFile, String importDataFileId) Creates an import data file.createImportDataFileAsync(String parent, ImportDataFile importDataFile, String importDataFileId) Creates an import data file.Creates an import data file.Creates an import data file.Creates an import job.createImportJobAsync(LocationName parent, ImportJob importJob, String importJobId) Creates an import job.createImportJobAsync(String parent, ImportJob importJob, String importJobId) Creates an import job.Creates an import job.Creates an import job.Creates a new preference set in a given project and location.createPreferenceSetAsync(LocationName parent, PreferenceSet preferenceSet, String preferenceSetId) Creates a new preference set in a given project and location.createPreferenceSetAsync(String parent, PreferenceSet preferenceSet, String preferenceSetId) Creates a new preference set in a given project and location.Creates a new preference set in a given project and location.Creates a new preference set in a given project and location.createReportAsync(CreateReportRequest request) Creates a report.createReportAsync(ReportConfigName parent, Report report, String reportId) Creates a report.createReportAsync(String parent, Report report, String reportId) Creates a report.Creates a report.Creates a report configuration.createReportConfigAsync(LocationName parent, ReportConfig reportConfig, String reportConfigId) Creates a report configuration.createReportConfigAsync(String parent, ReportConfig reportConfig, String reportConfigId) Creates a report configuration.Creates a report configuration.Creates a report configuration.Creates a report.createSourceAsync(CreateSourceRequest request) Creates a new source in a given project and location.createSourceAsync(LocationName parent, Source source, String sourceId) Creates a new source in a given project and location.createSourceAsync(String parent, Source source, String sourceId) Creates a new source in a given project and location.Creates a new source in a given project and location.Creates a new source in a given project and location.final voiddeleteAsset(AssetName name) Deletes an asset.final voiddeleteAsset(DeleteAssetRequest request) Deletes an asset.final voiddeleteAsset(String name) Deletes an asset.final UnaryCallable<DeleteAssetRequest,com.google.protobuf.Empty> Deletes an asset.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteGroupAsync(DeleteGroupRequest request) Deletes a group.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteGroupAsync(GroupName name) Deletes a group.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteGroupAsync(String name) Deletes a group.Deletes a group.final OperationCallable<DeleteGroupRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a group.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Delete an import data file.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Delete an import data file.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Delete an import data file.Delete an import data file.final OperationCallable<DeleteImportDataFileRequest,com.google.protobuf.Empty, OperationMetadata> Delete an import data file.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes an import job.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes an import job.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteImportJobAsync(String name) Deletes an import job.Deletes an import job.final OperationCallable<DeleteImportJobRequest,com.google.protobuf.Empty, OperationMetadata> Deletes an import job.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a preference set.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a preference set.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a preference set.Deletes a preference set.final OperationCallable<DeletePreferenceSetRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a preference set.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteReportAsync(DeleteReportRequest request) Deletes a Report.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteReportAsync(ReportName name) Deletes a Report.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteReportAsync(String name) Deletes a Report.Deletes a Report.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a ReportConfig.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a ReportConfig.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a ReportConfig.Deletes a ReportConfig.final OperationCallable<DeleteReportConfigRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a ReportConfig.final OperationCallable<DeleteReportRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a Report.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSourceAsync(DeleteSourceRequest request) Deletes a source.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSourceAsync(SourceName name) Deletes a source.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSourceAsync(String name) Deletes a source.Deletes a source.final OperationCallable<DeleteSourceRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a source.final AssetGets the details of an asset.final AssetgetAsset(GetAssetRequest request) Gets the details of an asset.final AssetGets the details of an asset.final UnaryCallable<GetAssetRequest,Asset> Gets the details of an asset.final ErrorFramegetErrorFrame(ErrorFrameName name) Gets the details of an error frame.final ErrorFramegetErrorFrame(GetErrorFrameRequest request) Gets the details of an error frame.final ErrorFramegetErrorFrame(String name) Gets the details of an error frame.Gets the details of an error frame.final GroupgetGroup(GetGroupRequest request) Gets the details of a group.final GroupGets the details of a group.final GroupGets the details of a group.final UnaryCallable<GetGroupRequest,Group> Gets the details of a group.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final ImportDataFileGets an import data file.final ImportDataFileGets an import data file.final ImportDataFilegetImportDataFile(String name) Gets an import data file.Gets an import data file.final ImportJobgetImportJob(GetImportJobRequest request) Gets the details of an import job.final ImportJobgetImportJob(ImportJobName name) Gets the details of an import job.final ImportJobgetImportJob(String name) Gets the details of an import job.Gets the details of an import job.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final PreferenceSetgetPreferenceSet(GetPreferenceSetRequest request) Gets the details of a preference set.final PreferenceSetGets the details of a preference set.final PreferenceSetgetPreferenceSet(String name) Gets the details of a preference set.Gets the details of a preference set.final ReportgetReport(GetReportRequest request) Gets details of a single Report.final ReportgetReport(ReportName name) Gets details of a single Report.final ReportGets details of a single Report.final UnaryCallable<GetReportRequest,Report> Gets details of a single Report.final ReportConfiggetReportConfig(GetReportConfigRequest request) Gets details of a single ReportConfig.final ReportConfigGets details of a single ReportConfig.final ReportConfiggetReportConfig(String name) Gets details of a single ReportConfig.Gets details of a single ReportConfig.final MigrationCenterSettingsfinal SettingsgetSettings(GetSettingsRequest request) Gets the details of regional settings.final SettingsgetSettings(SettingsName name) Gets the details of regional settings.final SettingsgetSettings(String name) Gets the details of regional settings.Gets the details of regional settings.final SourcegetSource(GetSourceRequest request) Gets the details of a source.final SourcegetSource(SourceName name) Gets the details of a source.final SourceGets the details of a source.final UnaryCallable<GetSourceRequest,Source> Gets the details of a source.getStub()booleanbooleanlistAssets(ListAssetsRequest request) Lists all the assets in a given project and location.listAssets(LocationName parent) Lists all the assets in a given project and location.listAssets(String parent) Lists all the assets in a given project and location.Lists all the assets in a given project and location.Lists all the assets in a given project and location.listErrorFrames(ListErrorFramesRequest request) Lists all error frames in a given source and location.listErrorFrames(SourceName parent) Lists all error frames in a given source and location.listErrorFrames(String parent) Lists all error frames in a given source and location.Lists all error frames in a given source and location.Lists all error frames in a given source and location.listGroups(ListGroupsRequest request) Lists all groups in a given project and location.listGroups(LocationName parent) Lists all groups in a given project and location.listGroups(String parent) Lists all groups in a given project and location.Lists all groups in a given project and location.Lists all groups in a given project and location.listImportDataFiles(ImportJobName parent) List import data files.List import data files.listImportDataFiles(String parent) List import data files.List import data files.final UnaryCallable<ListImportDataFilesRequest,MigrationCenterClient.ListImportDataFilesPagedResponse> List import data files.listImportJobs(ListImportJobsRequest request) Lists all import jobs.listImportJobs(LocationName parent) Lists all import jobs.listImportJobs(String parent) Lists all import jobs.Lists all import jobs.Lists all import jobs.listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists all the preference sets in a given project and location.listPreferenceSets(LocationName parent) Lists all the preference sets in a given project and location.listPreferenceSets(String parent) Lists all the preference sets in a given project and location.Lists all the preference sets in a given project and location.final UnaryCallable<ListPreferenceSetsRequest,MigrationCenterClient.ListPreferenceSetsPagedResponse> Lists all the preference sets in a given project and location.Lists ReportConfigs in a given project and location.listReportConfigs(LocationName parent) Lists ReportConfigs in a given project and location.listReportConfigs(String parent) Lists ReportConfigs in a given project and location.Lists ReportConfigs in a given project and location.Lists ReportConfigs in a given project and location.listReports(ListReportsRequest request) Lists Reports in a given ReportConfig.listReports(ReportConfigName parent) Lists Reports in a given ReportConfig.listReports(String parent) Lists Reports in a given ReportConfig.Lists Reports in a given ReportConfig.Lists Reports in a given ReportConfig.listSources(ListSourcesRequest request) Lists all the sources in a given project and location.listSources(LocationName parent) Lists all the sources in a given project and location.listSources(String parent) Lists all the sources in a given project and location.Lists all the sources in a given project and location.Lists all the sources in a given project and location.Removes assets from a group.Removes assets from a group.removeAssetsFromGroupAsync(String group) Removes assets from a group.Removes assets from a group.Removes assets from a group.Reports a set of frames.Reports a set of frames.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Runs an import job.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> runImportJobAsync(RunImportJobRequest request) Runs an import job.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> runImportJobAsync(String name) Runs an import job.Runs an import job.final OperationCallable<RunImportJobRequest,com.google.protobuf.Empty, OperationMetadata> Runs an import job.voidshutdown()voidfinal AssetupdateAsset(Asset asset, com.google.protobuf.FieldMask updateMask) Updates the parameters of an asset.final AssetupdateAsset(UpdateAssetRequest request) Updates the parameters of an asset.final UnaryCallable<UpdateAssetRequest,Asset> Updates the parameters of an asset.updateGroupAsync(Group group, com.google.protobuf.FieldMask updateMask) Updates the parameters of a group.updateGroupAsync(UpdateGroupRequest request) Updates the parameters of a group.Updates the parameters of a group.Updates the parameters of a group.updateImportJobAsync(ImportJob importJob, com.google.protobuf.FieldMask updateMask) Updates an import job.Updates an import job.Updates an import job.Updates an import job.updatePreferenceSetAsync(PreferenceSet preferenceSet, com.google.protobuf.FieldMask updateMask) Updates the parameters of a preference set.Updates the parameters of a preference set.Updates the parameters of a preference set.Updates the parameters of a preference set.updateSettingsAsync(Settings settings, com.google.protobuf.FieldMask updateMask) Updates the regional-level project settings.updateSettingsAsync(UpdateSettingsRequest request) Updates the regional-level project settings.Updates the regional-level project settings.Updates the regional-level project settings.updateSourceAsync(Source source, com.google.protobuf.FieldMask updateMask) Updates the parameters of a source.updateSourceAsync(UpdateSourceRequest request) Updates the parameters of a source.Updates the parameters of a source.Updates the parameters of a source.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Validates an import job.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Validates an import job.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> validateImportJobAsync(String name) Validates an import job.Validates an import job.final OperationCallable<ValidateImportJobRequest,com.google.protobuf.Empty, OperationMetadata> Validates an import job.
-
Constructor Details
-
MigrationCenterClient
Constructs an instance of MigrationCenterClient, 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.- Throws:
IOException
-
MigrationCenterClient
-
-
Method Details
-
create
Constructs an instance of MigrationCenterClient with default settings.- Throws:
IOException
-
create
public static final MigrationCenterClient create(MigrationCenterSettings settings) throws IOException Constructs an instance of MigrationCenterClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.- Throws:
IOException
-
create
Constructs an instance of MigrationCenterClient, using the given stub for making calls. This is for advanced usage - prefer using create(MigrationCenterSettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
getHttpJsonOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
listAssets
Lists all the assets in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Asset element : migrationCenterClient.listAssets(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for `ListAssetsRequest`.- Throws:
ApiException- if the remote call fails
-
listAssets
Lists all the assets in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Asset element : migrationCenterClient.listAssets(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for `ListAssetsRequest`.- Throws:
ApiException- if the remote call fails
-
listAssets
Lists all the assets in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListAssetsRequest request = ListAssetsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .setView(AssetView.forNumber(0)) .build(); for (Asset element : migrationCenterClient.listAssets(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listAssetsPagedCallable
public final UnaryCallable<ListAssetsRequest,MigrationCenterClient.ListAssetsPagedResponse> listAssetsPagedCallable()Lists all the assets in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListAssetsRequest request = ListAssetsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .setView(AssetView.forNumber(0)) .build(); ApiFuture<Asset> future = migrationCenterClient.listAssetsPagedCallable().futureCall(request); // Do something. for (Asset element : future.get().iterateAll()) { // doThingsWith(element); } } -
listAssetsCallable
Lists all the assets in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListAssetsRequest request = ListAssetsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .setView(AssetView.forNumber(0)) .build(); while (true) { ListAssetsResponse response = migrationCenterClient.listAssetsCallable().call(request); for (Asset element : response.getAssetsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getAsset
Gets the details of an asset.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]"); Asset response = migrationCenterClient.getAsset(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getAsset
Gets the details of an asset.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString(); Asset response = migrationCenterClient.getAsset(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getAsset
Gets the details of an asset.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GetAssetRequest request = GetAssetRequest.newBuilder() .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString()) .setView(AssetView.forNumber(0)) .build(); Asset response = migrationCenterClient.getAsset(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getAssetCallable
Gets the details of an asset.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GetAssetRequest request = GetAssetRequest.newBuilder() .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString()) .setView(AssetView.forNumber(0)) .build(); ApiFuture<Asset> future = migrationCenterClient.getAssetCallable().futureCall(request); // Do something. Asset response = future.get(); } -
updateAsset
Updates the parameters of an asset.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { Asset asset = Asset.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Asset response = migrationCenterClient.updateAsset(asset, updateMask); }- Parameters:
asset- Required. The resource being updated.updateMask- Required. Field mask is used to specify the fields to be overwritten in the `Asset` resource by the update. The values specified in the `update_mask` field are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.- Throws:
ApiException- if the remote call fails
-
updateAsset
Updates the parameters of an asset.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { UpdateAssetRequest request = UpdateAssetRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setAsset(Asset.newBuilder().build()) .setRequestId("requestId693933066") .build(); Asset response = migrationCenterClient.updateAsset(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateAssetCallable
Updates the parameters of an asset.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { UpdateAssetRequest request = UpdateAssetRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setAsset(Asset.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Asset> future = migrationCenterClient.updateAssetCallable().futureCall(request); // Do something. Asset response = future.get(); } -
batchUpdateAssets
public final BatchUpdateAssetsResponse batchUpdateAssets(LocationName parent, List<UpdateAssetRequest> requests) Updates the parameters of a list of assets.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); List<UpdateAssetRequest> requests = new ArrayList<>(); BatchUpdateAssetsResponse response = migrationCenterClient.batchUpdateAssets(parent, requests); }- Parameters:
parent- Required. Parent value for batch asset update.requests- Required. The request message specifying the resources to update. A maximum of 1000 assets can be modified in a batch.- Throws:
ApiException- if the remote call fails
-
batchUpdateAssets
public final BatchUpdateAssetsResponse batchUpdateAssets(String parent, List<UpdateAssetRequest> requests) Updates the parameters of a list of assets.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); List<UpdateAssetRequest> requests = new ArrayList<>(); BatchUpdateAssetsResponse response = migrationCenterClient.batchUpdateAssets(parent, requests); }- Parameters:
parent- Required. Parent value for batch asset update.requests- Required. The request message specifying the resources to update. A maximum of 1000 assets can be modified in a batch.- Throws:
ApiException- if the remote call fails
-
batchUpdateAssets
Updates the parameters of a list of assets.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { BatchUpdateAssetsRequest request = BatchUpdateAssetsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .addAllRequests(new ArrayList<UpdateAssetRequest>()) .build(); BatchUpdateAssetsResponse response = migrationCenterClient.batchUpdateAssets(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
batchUpdateAssetsCallable
public final UnaryCallable<BatchUpdateAssetsRequest,BatchUpdateAssetsResponse> batchUpdateAssetsCallable()Updates the parameters of a list of assets.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { BatchUpdateAssetsRequest request = BatchUpdateAssetsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .addAllRequests(new ArrayList<UpdateAssetRequest>()) .build(); ApiFuture<BatchUpdateAssetsResponse> future = migrationCenterClient.batchUpdateAssetsCallable().futureCall(request); // Do something. BatchUpdateAssetsResponse response = future.get(); } -
deleteAsset
Deletes an asset.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]"); migrationCenterClient.deleteAsset(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
deleteAsset
Deletes an asset.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString(); migrationCenterClient.deleteAsset(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
deleteAsset
Deletes an asset.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { DeleteAssetRequest request = DeleteAssetRequest.newBuilder() .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString()) .setRequestId("requestId693933066") .build(); migrationCenterClient.deleteAsset(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteAssetCallable
Deletes an asset.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { DeleteAssetRequest request = DeleteAssetRequest.newBuilder() .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Empty> future = migrationCenterClient.deleteAssetCallable().futureCall(request); // Do something. future.get(); } -
batchDeleteAssets
Deletes list of Assets.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); List<String> names = new ArrayList<>(); migrationCenterClient.batchDeleteAssets(parent, names); }- Parameters:
parent- Required. Parent value for batch asset delete.names- Required. The IDs of the assets to delete. A maximum of 1000 assets can be deleted in a batch. Format: projects/{project}/locations/{location}/assets/{name}.- Throws:
ApiException- if the remote call fails
-
batchDeleteAssets
Deletes list of Assets.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); List<String> names = new ArrayList<>(); migrationCenterClient.batchDeleteAssets(parent, names); }- Parameters:
parent- Required. Parent value for batch asset delete.names- Required. The IDs of the assets to delete. A maximum of 1000 assets can be deleted in a batch. Format: projects/{project}/locations/{location}/assets/{name}.- Throws:
ApiException- if the remote call fails
-
batchDeleteAssets
Deletes list of Assets.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { BatchDeleteAssetsRequest request = BatchDeleteAssetsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .addAllNames(new ArrayList<String>()) .setAllowMissing(true) .build(); migrationCenterClient.batchDeleteAssets(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
batchDeleteAssetsCallable
public final UnaryCallable<BatchDeleteAssetsRequest,com.google.protobuf.Empty> batchDeleteAssetsCallable()Deletes list of Assets.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { BatchDeleteAssetsRequest request = BatchDeleteAssetsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .addAllNames(new ArrayList<String>()) .setAllowMissing(true) .build(); ApiFuture<Empty> future = migrationCenterClient.batchDeleteAssetsCallable().futureCall(request); // Do something. future.get(); } -
reportAssetFrames
Reports a set of frames.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ReportAssetFramesRequest request = ReportAssetFramesRequest.newBuilder() .setParent("parent-995424086") .setFrames(Frames.newBuilder().build()) .setSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) .build(); ReportAssetFramesResponse response = migrationCenterClient.reportAssetFrames(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
reportAssetFramesCallable
public final UnaryCallable<ReportAssetFramesRequest,ReportAssetFramesResponse> reportAssetFramesCallable()Reports a set of frames.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ReportAssetFramesRequest request = ReportAssetFramesRequest.newBuilder() .setParent("parent-995424086") .setFrames(Frames.newBuilder().build()) .setSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) .build(); ApiFuture<ReportAssetFramesResponse> future = migrationCenterClient.reportAssetFramesCallable().futureCall(request); // Do something. ReportAssetFramesResponse response = future.get(); } -
aggregateAssetsValues
public final AggregateAssetsValuesResponse aggregateAssetsValues(AggregateAssetsValuesRequest request) Aggregates the requested fields based on provided function.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { AggregateAssetsValuesRequest request = AggregateAssetsValuesRequest.newBuilder() .setParent("parent-995424086") .addAllAggregations(new ArrayList<Aggregation>()) .setFilter("filter-1274492040") .build(); AggregateAssetsValuesResponse response = migrationCenterClient.aggregateAssetsValues(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
aggregateAssetsValuesCallable
public final UnaryCallable<AggregateAssetsValuesRequest,AggregateAssetsValuesResponse> aggregateAssetsValuesCallable()Aggregates the requested fields based on provided function.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { AggregateAssetsValuesRequest request = AggregateAssetsValuesRequest.newBuilder() .setParent("parent-995424086") .addAllAggregations(new ArrayList<Aggregation>()) .setFilter("filter-1274492040") .build(); ApiFuture<AggregateAssetsValuesResponse> future = migrationCenterClient.aggregateAssetsValuesCallable().futureCall(request); // Do something. AggregateAssetsValuesResponse response = future.get(); } -
createImportJobAsync
public final OperationFuture<ImportJob,OperationMetadata> createImportJobAsync(LocationName parent, ImportJob importJob, String importJobId) Creates an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); ImportJob importJob = ImportJob.newBuilder().build(); String importJobId = "importJobId1449444627"; ImportJob response = migrationCenterClient.createImportJobAsync(parent, importJob, importJobId).get(); }- Parameters:
parent- Required. Value for parent.importJob- Required. The resource being created.importJobId- Required. ID of the import job.- Throws:
ApiException- if the remote call fails
-
createImportJobAsync
public final OperationFuture<ImportJob,OperationMetadata> createImportJobAsync(String parent, ImportJob importJob, String importJobId) Creates an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); ImportJob importJob = ImportJob.newBuilder().build(); String importJobId = "importJobId1449444627"; ImportJob response = migrationCenterClient.createImportJobAsync(parent, importJob, importJobId).get(); }- Parameters:
parent- Required. Value for parent.importJob- Required. The resource being created.importJobId- Required. ID of the import job.- Throws:
ApiException- if the remote call fails
-
createImportJobAsync
public final OperationFuture<ImportJob,OperationMetadata> createImportJobAsync(CreateImportJobRequest request) Creates an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { CreateImportJobRequest request = CreateImportJobRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setImportJobId("importJobId1449444627") .setImportJob(ImportJob.newBuilder().build()) .setRequestId("requestId693933066") .build(); ImportJob response = migrationCenterClient.createImportJobAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createImportJobOperationCallable
public final OperationCallable<CreateImportJobRequest,ImportJob, createImportJobOperationCallable()OperationMetadata> Creates an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { CreateImportJobRequest request = CreateImportJobRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setImportJobId("importJobId1449444627") .setImportJob(ImportJob.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<ImportJob, OperationMetadata> future = migrationCenterClient.createImportJobOperationCallable().futureCall(request); // Do something. ImportJob response = future.get(); } -
createImportJobCallable
Creates an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { CreateImportJobRequest request = CreateImportJobRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setImportJobId("importJobId1449444627") .setImportJob(ImportJob.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = migrationCenterClient.createImportJobCallable().futureCall(request); // Do something. Operation response = future.get(); } -
listImportJobs
Lists all import jobs.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (ImportJob element : migrationCenterClient.listImportJobs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for `ListImportJobsRequest`.- Throws:
ApiException- if the remote call fails
-
listImportJobs
Lists all import jobs.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (ImportJob element : migrationCenterClient.listImportJobs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for `ListImportJobsRequest`.- Throws:
ApiException- if the remote call fails
-
listImportJobs
public final MigrationCenterClient.ListImportJobsPagedResponse listImportJobs(ListImportJobsRequest request) Lists all import jobs.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListImportJobsRequest request = ListImportJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .setView(ImportJobView.forNumber(0)) .build(); for (ImportJob element : migrationCenterClient.listImportJobs(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listImportJobsPagedCallable
public final UnaryCallable<ListImportJobsRequest,MigrationCenterClient.ListImportJobsPagedResponse> listImportJobsPagedCallable()Lists all import jobs.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListImportJobsRequest request = ListImportJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .setView(ImportJobView.forNumber(0)) .build(); ApiFuture<ImportJob> future = migrationCenterClient.listImportJobsPagedCallable().futureCall(request); // Do something. for (ImportJob element : future.get().iterateAll()) { // doThingsWith(element); } } -
listImportJobsCallable
Lists all import jobs.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListImportJobsRequest request = ListImportJobsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .setView(ImportJobView.forNumber(0)) .build(); while (true) { ListImportJobsResponse response = migrationCenterClient.listImportJobsCallable().call(request); for (ImportJob element : response.getImportJobsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getImportJob
Gets the details of an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); ImportJob response = migrationCenterClient.getImportJob(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getImportJob
Gets the details of an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString(); ImportJob response = migrationCenterClient.getImportJob(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getImportJob
Gets the details of an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GetImportJobRequest request = GetImportJobRequest.newBuilder() .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) .setView(ImportJobView.forNumber(0)) .build(); ImportJob response = migrationCenterClient.getImportJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getImportJobCallable
Gets the details of an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GetImportJobRequest request = GetImportJobRequest.newBuilder() .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) .setView(ImportJobView.forNumber(0)) .build(); ApiFuture<ImportJob> future = migrationCenterClient.getImportJobCallable().futureCall(request); // Do something. ImportJob response = future.get(); } -
deleteImportJobAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteImportJobAsync(ImportJobName name) Deletes an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); migrationCenterClient.deleteImportJobAsync(name).get(); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
deleteImportJobAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteImportJobAsync(String name) Deletes an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString(); migrationCenterClient.deleteImportJobAsync(name).get(); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
deleteImportJobAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteImportJobAsync(DeleteImportJobRequest request) Deletes an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { DeleteImportJobRequest request = DeleteImportJobRequest.newBuilder() .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) .setRequestId("requestId693933066") .setForce(true) .build(); migrationCenterClient.deleteImportJobAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteImportJobOperationCallable
public final OperationCallable<DeleteImportJobRequest,com.google.protobuf.Empty, deleteImportJobOperationCallable()OperationMetadata> Deletes an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { DeleteImportJobRequest request = DeleteImportJobRequest.newBuilder() .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) .setRequestId("requestId693933066") .setForce(true) .build(); OperationFuture<Empty, OperationMetadata> future = migrationCenterClient.deleteImportJobOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteImportJobCallable
Deletes an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { DeleteImportJobRequest request = DeleteImportJobRequest.newBuilder() .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) .setRequestId("requestId693933066") .setForce(true) .build(); ApiFuture<Operation> future = migrationCenterClient.deleteImportJobCallable().futureCall(request); // Do something. future.get(); } -
updateImportJobAsync
public final OperationFuture<ImportJob,OperationMetadata> updateImportJobAsync(ImportJob importJob, com.google.protobuf.FieldMask updateMask) Updates an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ImportJob importJob = ImportJob.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); ImportJob response = migrationCenterClient.updateImportJobAsync(importJob, updateMask).get(); }- Parameters:
importJob- Required. The resource being updatedupdateMask- Required. Field mask is used to specify the fields to be overwritten in the `Asset` resource by the update. The values specified in the `update_mask` field are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.- Throws:
ApiException- if the remote call fails
-
updateImportJobAsync
public final OperationFuture<ImportJob,OperationMetadata> updateImportJobAsync(UpdateImportJobRequest request) Updates an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { UpdateImportJobRequest request = UpdateImportJobRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setImportJob(ImportJob.newBuilder().build()) .setRequestId("requestId693933066") .build(); ImportJob response = migrationCenterClient.updateImportJobAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateImportJobOperationCallable
public final OperationCallable<UpdateImportJobRequest,ImportJob, updateImportJobOperationCallable()OperationMetadata> Updates an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { UpdateImportJobRequest request = UpdateImportJobRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setImportJob(ImportJob.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<ImportJob, OperationMetadata> future = migrationCenterClient.updateImportJobOperationCallable().futureCall(request); // Do something. ImportJob response = future.get(); } -
updateImportJobCallable
Updates an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { UpdateImportJobRequest request = UpdateImportJobRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setImportJob(ImportJob.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = migrationCenterClient.updateImportJobCallable().futureCall(request); // Do something. Operation response = future.get(); } -
validateImportJobAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> validateImportJobAsync(ImportJobName name) Validates an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); migrationCenterClient.validateImportJobAsync(name).get(); }- Parameters:
name- Required. The name of the import job to validate.- Throws:
ApiException- if the remote call fails
-
validateImportJobAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> validateImportJobAsync(String name) Validates an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString(); migrationCenterClient.validateImportJobAsync(name).get(); }- Parameters:
name- Required. The name of the import job to validate.- Throws:
ApiException- if the remote call fails
-
validateImportJobAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> validateImportJobAsync(ValidateImportJobRequest request) Validates an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ValidateImportJobRequest request = ValidateImportJobRequest.newBuilder() .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) .setRequestId("requestId693933066") .build(); migrationCenterClient.validateImportJobAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
validateImportJobOperationCallable
public final OperationCallable<ValidateImportJobRequest,com.google.protobuf.Empty, validateImportJobOperationCallable()OperationMetadata> Validates an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ValidateImportJobRequest request = ValidateImportJobRequest.newBuilder() .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = migrationCenterClient.validateImportJobOperationCallable().futureCall(request); // Do something. future.get(); } -
validateImportJobCallable
Validates an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ValidateImportJobRequest request = ValidateImportJobRequest.newBuilder() .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = migrationCenterClient.validateImportJobCallable().futureCall(request); // Do something. future.get(); } -
runImportJobAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> runImportJobAsync(ImportJobName name) Runs an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); migrationCenterClient.runImportJobAsync(name).get(); }- Parameters:
name- Required. The name of the import job to run.- Throws:
ApiException- if the remote call fails
-
runImportJobAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> runImportJobAsync(String name) Runs an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString(); migrationCenterClient.runImportJobAsync(name).get(); }- Parameters:
name- Required. The name of the import job to run.- Throws:
ApiException- if the remote call fails
-
runImportJobAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> runImportJobAsync(RunImportJobRequest request) Runs an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { RunImportJobRequest request = RunImportJobRequest.newBuilder() .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) .setRequestId("requestId693933066") .build(); migrationCenterClient.runImportJobAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
runImportJobOperationCallable
public final OperationCallable<RunImportJobRequest,com.google.protobuf.Empty, runImportJobOperationCallable()OperationMetadata> Runs an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { RunImportJobRequest request = RunImportJobRequest.newBuilder() .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = migrationCenterClient.runImportJobOperationCallable().futureCall(request); // Do something. future.get(); } -
runImportJobCallable
Runs an import job.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { RunImportJobRequest request = RunImportJobRequest.newBuilder() .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = migrationCenterClient.runImportJobCallable().futureCall(request); // Do something. future.get(); } -
getImportDataFile
Gets an import data file.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ImportDataFileName name = ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]"); ImportDataFile response = migrationCenterClient.getImportDataFile(name); }- Parameters:
name- Required. Name of the ImportDataFile.- Throws:
ApiException- if the remote call fails
-
getImportDataFile
Gets an import data file.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String name = ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]") .toString(); ImportDataFile response = migrationCenterClient.getImportDataFile(name); }- Parameters:
name- Required. Name of the ImportDataFile.- Throws:
ApiException- if the remote call fails
-
getImportDataFile
Gets an import data file.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GetImportDataFileRequest request = GetImportDataFileRequest.newBuilder() .setName( ImportDataFileName.of( "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]") .toString()) .build(); ImportDataFile response = migrationCenterClient.getImportDataFile(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getImportDataFileCallable
Gets an import data file.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GetImportDataFileRequest request = GetImportDataFileRequest.newBuilder() .setName( ImportDataFileName.of( "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]") .toString()) .build(); ApiFuture<ImportDataFile> future = migrationCenterClient.getImportDataFileCallable().futureCall(request); // Do something. ImportDataFile response = future.get(); } -
listImportDataFiles
public final MigrationCenterClient.ListImportDataFilesPagedResponse listImportDataFiles(ImportJobName parent) List import data files.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ImportJobName parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); for (ImportDataFile element : migrationCenterClient.listImportDataFiles(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Name of the parent of the `ImportDataFiles` resource.- Throws:
ApiException- if the remote call fails
-
listImportDataFiles
public final MigrationCenterClient.ListImportDataFilesPagedResponse listImportDataFiles(String parent) List import data files.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString(); for (ImportDataFile element : migrationCenterClient.listImportDataFiles(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Name of the parent of the `ImportDataFiles` resource.- Throws:
ApiException- if the remote call fails
-
listImportDataFiles
public final MigrationCenterClient.ListImportDataFilesPagedResponse listImportDataFiles(ListImportDataFilesRequest request) List import data files.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListImportDataFilesRequest request = ListImportDataFilesRequest.newBuilder() .setParent(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (ImportDataFile element : migrationCenterClient.listImportDataFiles(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listImportDataFilesPagedCallable
public final UnaryCallable<ListImportDataFilesRequest,MigrationCenterClient.ListImportDataFilesPagedResponse> listImportDataFilesPagedCallable()List import data files.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListImportDataFilesRequest request = ListImportDataFilesRequest.newBuilder() .setParent(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<ImportDataFile> future = migrationCenterClient.listImportDataFilesPagedCallable().futureCall(request); // Do something. for (ImportDataFile element : future.get().iterateAll()) { // doThingsWith(element); } } -
listImportDataFilesCallable
public final UnaryCallable<ListImportDataFilesRequest,ListImportDataFilesResponse> listImportDataFilesCallable()List import data files.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListImportDataFilesRequest request = ListImportDataFilesRequest.newBuilder() .setParent(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListImportDataFilesResponse response = migrationCenterClient.listImportDataFilesCallable().call(request); for (ImportDataFile element : response.getImportDataFilesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
createImportDataFileAsync
public final OperationFuture<ImportDataFile,OperationMetadata> createImportDataFileAsync(ImportJobName parent, ImportDataFile importDataFile, String importDataFileId) Creates an import data file.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ImportJobName parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]"); ImportDataFile importDataFile = ImportDataFile.newBuilder().build(); String importDataFileId = "importDataFileId-1812510330"; ImportDataFile response = migrationCenterClient .createImportDataFileAsync(parent, importDataFile, importDataFileId) .get(); }- Parameters:
parent- Required. Name of the parent of the ImportDataFile.importDataFile- Required. The resource being created.importDataFileId- Required. The ID of the new data file.- Throws:
ApiException- if the remote call fails
-
createImportDataFileAsync
public final OperationFuture<ImportDataFile,OperationMetadata> createImportDataFileAsync(String parent, ImportDataFile importDataFile, String importDataFileId) Creates an import data file.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString(); ImportDataFile importDataFile = ImportDataFile.newBuilder().build(); String importDataFileId = "importDataFileId-1812510330"; ImportDataFile response = migrationCenterClient .createImportDataFileAsync(parent, importDataFile, importDataFileId) .get(); }- Parameters:
parent- Required. Name of the parent of the ImportDataFile.importDataFile- Required. The resource being created.importDataFileId- Required. The ID of the new data file.- Throws:
ApiException- if the remote call fails
-
createImportDataFileAsync
public final OperationFuture<ImportDataFile,OperationMetadata> createImportDataFileAsync(CreateImportDataFileRequest request) Creates an import data file.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { CreateImportDataFileRequest request = CreateImportDataFileRequest.newBuilder() .setParent(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) .setImportDataFileId("importDataFileId-1812510330") .setImportDataFile(ImportDataFile.newBuilder().build()) .setRequestId("requestId693933066") .build(); ImportDataFile response = migrationCenterClient.createImportDataFileAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createImportDataFileOperationCallable
public final OperationCallable<CreateImportDataFileRequest,ImportDataFile, createImportDataFileOperationCallable()OperationMetadata> Creates an import data file.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { CreateImportDataFileRequest request = CreateImportDataFileRequest.newBuilder() .setParent(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) .setImportDataFileId("importDataFileId-1812510330") .setImportDataFile(ImportDataFile.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<ImportDataFile, OperationMetadata> future = migrationCenterClient.createImportDataFileOperationCallable().futureCall(request); // Do something. ImportDataFile response = future.get(); } -
createImportDataFileCallable
Creates an import data file.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { CreateImportDataFileRequest request = CreateImportDataFileRequest.newBuilder() .setParent(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString()) .setImportDataFileId("importDataFileId-1812510330") .setImportDataFile(ImportDataFile.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = migrationCenterClient.createImportDataFileCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteImportDataFileAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteImportDataFileAsync(ImportDataFileName name) Delete an import data file.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ImportDataFileName name = ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]"); migrationCenterClient.deleteImportDataFileAsync(name).get(); }- Parameters:
name- Required. Name of the ImportDataFile to delete.- Throws:
ApiException- if the remote call fails
-
deleteImportDataFileAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteImportDataFileAsync(String name) Delete an import data file.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String name = ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]") .toString(); migrationCenterClient.deleteImportDataFileAsync(name).get(); }- Parameters:
name- Required. Name of the ImportDataFile to delete.- Throws:
ApiException- if the remote call fails
-
deleteImportDataFileAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteImportDataFileAsync(DeleteImportDataFileRequest request) Delete an import data file.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { DeleteImportDataFileRequest request = DeleteImportDataFileRequest.newBuilder() .setName( ImportDataFileName.of( "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]") .toString()) .setRequestId("requestId693933066") .build(); migrationCenterClient.deleteImportDataFileAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteImportDataFileOperationCallable
public final OperationCallable<DeleteImportDataFileRequest,com.google.protobuf.Empty, deleteImportDataFileOperationCallable()OperationMetadata> Delete an import data file.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { DeleteImportDataFileRequest request = DeleteImportDataFileRequest.newBuilder() .setName( ImportDataFileName.of( "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]") .toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = migrationCenterClient.deleteImportDataFileOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteImportDataFileCallable
Delete an import data file.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { DeleteImportDataFileRequest request = DeleteImportDataFileRequest.newBuilder() .setName( ImportDataFileName.of( "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]") .toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = migrationCenterClient.deleteImportDataFileCallable().futureCall(request); // Do something. future.get(); } -
listGroups
Lists all groups in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Group element : migrationCenterClient.listGroups(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for `ListGroupsRequest`.- Throws:
ApiException- if the remote call fails
-
listGroups
Lists all groups in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Group element : migrationCenterClient.listGroups(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for `ListGroupsRequest`.- Throws:
ApiException- if the remote call fails
-
listGroups
Lists all groups in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.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 : migrationCenterClient.listGroups(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listGroupsPagedCallable
public final UnaryCallable<ListGroupsRequest,MigrationCenterClient.ListGroupsPagedResponse> listGroupsPagedCallable()Lists all groups in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListGroupsRequest request = ListGroupsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<Group> future = migrationCenterClient.listGroupsPagedCallable().futureCall(request); // Do something. for (Group element : future.get().iterateAll()) { // doThingsWith(element); } } -
listGroupsCallable
Lists all groups in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.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 = migrationCenterClient.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; } } } -
getGroup
Gets the details of a group.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GroupName name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]"); Group response = migrationCenterClient.getGroup(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getGroup
Gets the details of a group.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString(); Group response = migrationCenterClient.getGroup(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getGroup
Gets the details of a group.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GetGroupRequest request = GetGroupRequest.newBuilder() .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) .build(); Group response = migrationCenterClient.getGroup(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getGroupCallable
Gets the details of a group.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GetGroupRequest request = GetGroupRequest.newBuilder() .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) .build(); ApiFuture<Group> future = migrationCenterClient.getGroupCallable().futureCall(request); // Do something. Group response = future.get(); } -
createGroupAsync
public final OperationFuture<Group,OperationMetadata> createGroupAsync(LocationName parent, Group group, String groupId) Creates a new group in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Group group = Group.newBuilder().build(); String groupId = "groupId293428218"; Group response = migrationCenterClient.createGroupAsync(parent, group, groupId).get(); }- Parameters:
parent- Required. Value for parent.group- Required. The group resource being created.groupId- Required. User specified ID for the group. It will become the last component of the group name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.- Throws:
ApiException- if the remote call fails
-
createGroupAsync
public final OperationFuture<Group,OperationMetadata> createGroupAsync(String parent, Group group, String groupId) Creates a new group in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); Group group = Group.newBuilder().build(); String groupId = "groupId293428218"; Group response = migrationCenterClient.createGroupAsync(parent, group, groupId).get(); }- Parameters:
parent- Required. Value for parent.group- Required. The group resource being created.groupId- Required. User specified ID for the group. It will become the last component of the group name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.- Throws:
ApiException- if the remote call fails
-
createGroupAsync
Creates a new group in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { CreateGroupRequest request = CreateGroupRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setGroupId("groupId293428218") .setGroup(Group.newBuilder().build()) .setRequestId("requestId693933066") .build(); Group response = migrationCenterClient.createGroupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createGroupOperationCallable
public final OperationCallable<CreateGroupRequest,Group, createGroupOperationCallable()OperationMetadata> Creates a new group in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { CreateGroupRequest request = CreateGroupRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setGroupId("groupId293428218") .setGroup(Group.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<Group, OperationMetadata> future = migrationCenterClient.createGroupOperationCallable().futureCall(request); // Do something. Group response = future.get(); } -
createGroupCallable
Creates a new group in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { CreateGroupRequest request = CreateGroupRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setGroupId("groupId293428218") .setGroup(Group.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = migrationCenterClient.createGroupCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateGroupAsync
public final OperationFuture<Group,OperationMetadata> updateGroupAsync(Group group, com.google.protobuf.FieldMask updateMask) Updates the parameters of a group.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { Group group = Group.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Group response = migrationCenterClient.updateGroupAsync(group, updateMask).get(); }- Parameters:
group- Required. The group resource being updated.updateMask- Required. Field mask is used to specify the fields to be overwritten in the `Group` resource by the update. The values specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.- Throws:
ApiException- if the remote call fails
-
updateGroupAsync
Updates the parameters of a group.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { UpdateGroupRequest request = UpdateGroupRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setGroup(Group.newBuilder().build()) .setRequestId("requestId693933066") .build(); Group response = migrationCenterClient.updateGroupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateGroupOperationCallable
public final OperationCallable<UpdateGroupRequest,Group, updateGroupOperationCallable()OperationMetadata> Updates the parameters of a group.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { UpdateGroupRequest request = UpdateGroupRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setGroup(Group.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<Group, OperationMetadata> future = migrationCenterClient.updateGroupOperationCallable().futureCall(request); // Do something. Group response = future.get(); } -
updateGroupCallable
Updates the parameters of a group.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { UpdateGroupRequest request = UpdateGroupRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setGroup(Group.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = migrationCenterClient.updateGroupCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteGroupAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteGroupAsync(GroupName name) Deletes a group.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GroupName name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]"); migrationCenterClient.deleteGroupAsync(name).get(); }- Parameters:
name- Required. Name of the group resource.- Throws:
ApiException- if the remote call fails
-
deleteGroupAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteGroupAsync(String name) Deletes a group.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString(); migrationCenterClient.deleteGroupAsync(name).get(); }- Parameters:
name- Required. Name of the group resource.- Throws:
ApiException- if the remote call fails
-
deleteGroupAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteGroupAsync(DeleteGroupRequest request) Deletes a group.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { DeleteGroupRequest request = DeleteGroupRequest.newBuilder() .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) .setRequestId("requestId693933066") .build(); migrationCenterClient.deleteGroupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteGroupOperationCallable
public final OperationCallable<DeleteGroupRequest,com.google.protobuf.Empty, deleteGroupOperationCallable()OperationMetadata> Deletes a group.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { DeleteGroupRequest request = DeleteGroupRequest.newBuilder() .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = migrationCenterClient.deleteGroupOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteGroupCallable
Deletes a group.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { DeleteGroupRequest request = DeleteGroupRequest.newBuilder() .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = migrationCenterClient.deleteGroupCallable().futureCall(request); // Do something. future.get(); } -
addAssetsToGroupAsync
Adds assets to a group.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GroupName group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]"); Group response = migrationCenterClient.addAssetsToGroupAsync(group).get(); }- Parameters:
group- Required. Group reference.- Throws:
ApiException- if the remote call fails
-
addAssetsToGroupAsync
Adds assets to a group.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString(); Group response = migrationCenterClient.addAssetsToGroupAsync(group).get(); }- Parameters:
group- Required. Group reference.- Throws:
ApiException- if the remote call fails
-
addAssetsToGroupAsync
public final OperationFuture<Group,OperationMetadata> addAssetsToGroupAsync(AddAssetsToGroupRequest request) Adds assets to a group.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { AddAssetsToGroupRequest request = AddAssetsToGroupRequest.newBuilder() .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) .setRequestId("requestId693933066") .setAssets(AssetList.newBuilder().build()) .setAllowExisting(true) .build(); Group response = migrationCenterClient.addAssetsToGroupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
addAssetsToGroupOperationCallable
public final OperationCallable<AddAssetsToGroupRequest,Group, addAssetsToGroupOperationCallable()OperationMetadata> Adds assets to a group.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { AddAssetsToGroupRequest request = AddAssetsToGroupRequest.newBuilder() .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) .setRequestId("requestId693933066") .setAssets(AssetList.newBuilder().build()) .setAllowExisting(true) .build(); OperationFuture<Group, OperationMetadata> future = migrationCenterClient.addAssetsToGroupOperationCallable().futureCall(request); // Do something. Group response = future.get(); } -
addAssetsToGroupCallable
Adds assets to a group.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { AddAssetsToGroupRequest request = AddAssetsToGroupRequest.newBuilder() .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) .setRequestId("requestId693933066") .setAssets(AssetList.newBuilder().build()) .setAllowExisting(true) .build(); ApiFuture<Operation> future = migrationCenterClient.addAssetsToGroupCallable().futureCall(request); // Do something. Operation response = future.get(); } -
removeAssetsFromGroupAsync
Removes assets from a group.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GroupName group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]"); Group response = migrationCenterClient.removeAssetsFromGroupAsync(group).get(); }- Parameters:
group- Required. Group reference.- Throws:
ApiException- if the remote call fails
-
removeAssetsFromGroupAsync
Removes assets from a group.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString(); Group response = migrationCenterClient.removeAssetsFromGroupAsync(group).get(); }- Parameters:
group- Required. Group reference.- Throws:
ApiException- if the remote call fails
-
removeAssetsFromGroupAsync
public final OperationFuture<Group,OperationMetadata> removeAssetsFromGroupAsync(RemoveAssetsFromGroupRequest request) Removes assets from a group.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { RemoveAssetsFromGroupRequest request = RemoveAssetsFromGroupRequest.newBuilder() .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) .setRequestId("requestId693933066") .setAssets(AssetList.newBuilder().build()) .setAllowMissing(true) .build(); Group response = migrationCenterClient.removeAssetsFromGroupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
removeAssetsFromGroupOperationCallable
public final OperationCallable<RemoveAssetsFromGroupRequest,Group, removeAssetsFromGroupOperationCallable()OperationMetadata> Removes assets from a group.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { RemoveAssetsFromGroupRequest request = RemoveAssetsFromGroupRequest.newBuilder() .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) .setRequestId("requestId693933066") .setAssets(AssetList.newBuilder().build()) .setAllowMissing(true) .build(); OperationFuture<Group, OperationMetadata> future = migrationCenterClient.removeAssetsFromGroupOperationCallable().futureCall(request); // Do something. Group response = future.get(); } -
removeAssetsFromGroupCallable
Removes assets from a group.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { RemoveAssetsFromGroupRequest request = RemoveAssetsFromGroupRequest.newBuilder() .setGroup(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString()) .setRequestId("requestId693933066") .setAssets(AssetList.newBuilder().build()) .setAllowMissing(true) .build(); ApiFuture<Operation> future = migrationCenterClient.removeAssetsFromGroupCallable().futureCall(request); // Do something. Operation response = future.get(); } -
listErrorFrames
Lists all error frames in a given source and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { SourceName parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]"); for (ErrorFrame element : migrationCenterClient.listErrorFrames(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value (the source) for `ListErrorFramesRequest`.- Throws:
ApiException- if the remote call fails
-
listErrorFrames
Lists all error frames in a given source and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString(); for (ErrorFrame element : migrationCenterClient.listErrorFrames(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value (the source) for `ListErrorFramesRequest`.- Throws:
ApiException- if the remote call fails
-
listErrorFrames
public final MigrationCenterClient.ListErrorFramesPagedResponse listErrorFrames(ListErrorFramesRequest request) Lists all error frames in a given source and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListErrorFramesRequest request = ListErrorFramesRequest.newBuilder() .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setView(ErrorFrameView.forNumber(0)) .build(); for (ErrorFrame element : migrationCenterClient.listErrorFrames(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listErrorFramesPagedCallable
public final UnaryCallable<ListErrorFramesRequest,MigrationCenterClient.ListErrorFramesPagedResponse> listErrorFramesPagedCallable()Lists all error frames in a given source and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListErrorFramesRequest request = ListErrorFramesRequest.newBuilder() .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setView(ErrorFrameView.forNumber(0)) .build(); ApiFuture<ErrorFrame> future = migrationCenterClient.listErrorFramesPagedCallable().futureCall(request); // Do something. for (ErrorFrame element : future.get().iterateAll()) { // doThingsWith(element); } } -
listErrorFramesCallable
public final UnaryCallable<ListErrorFramesRequest,ListErrorFramesResponse> listErrorFramesCallable()Lists all error frames in a given source and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListErrorFramesRequest request = ListErrorFramesRequest.newBuilder() .setParent(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setView(ErrorFrameView.forNumber(0)) .build(); while (true) { ListErrorFramesResponse response = migrationCenterClient.listErrorFramesCallable().call(request); for (ErrorFrame element : response.getErrorFramesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getErrorFrame
Gets the details of an error frame.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ErrorFrameName name = ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]"); ErrorFrame response = migrationCenterClient.getErrorFrame(name); }- Parameters:
name- Required. The name of the frame to retrieve. Format: projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame}- Throws:
ApiException- if the remote call fails
-
getErrorFrame
Gets the details of an error frame.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String name = ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]").toString(); ErrorFrame response = migrationCenterClient.getErrorFrame(name); }- Parameters:
name- Required. The name of the frame to retrieve. Format: projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame}- Throws:
ApiException- if the remote call fails
-
getErrorFrame
Gets the details of an error frame.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GetErrorFrameRequest request = GetErrorFrameRequest.newBuilder() .setName( ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]") .toString()) .setView(ErrorFrameView.forNumber(0)) .build(); ErrorFrame response = migrationCenterClient.getErrorFrame(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getErrorFrameCallable
Gets the details of an error frame.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GetErrorFrameRequest request = GetErrorFrameRequest.newBuilder() .setName( ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]") .toString()) .setView(ErrorFrameView.forNumber(0)) .build(); ApiFuture<ErrorFrame> future = migrationCenterClient.getErrorFrameCallable().futureCall(request); // Do something. ErrorFrame response = future.get(); } -
listSources
Lists all the sources in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Source element : migrationCenterClient.listSources(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for `ListSourcesRequest`.- Throws:
ApiException- if the remote call fails
-
listSources
Lists all the sources in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Source element : migrationCenterClient.listSources(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for `ListSourcesRequest`.- Throws:
ApiException- if the remote call fails
-
listSources
Lists all the sources in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.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 : migrationCenterClient.listSources(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listSourcesPagedCallable
public final UnaryCallable<ListSourcesRequest,MigrationCenterClient.ListSourcesPagedResponse> listSourcesPagedCallable()Lists all the sources in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListSourcesRequest request = ListSourcesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<Source> future = migrationCenterClient.listSourcesPagedCallable().futureCall(request); // Do something. for (Source element : future.get().iterateAll()) { // doThingsWith(element); } } -
listSourcesCallable
Lists all the sources in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.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 = migrationCenterClient.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; } } } -
getSource
Gets the details of a source.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { SourceName name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]"); Source response = migrationCenterClient.getSource(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getSource
Gets the details of a source.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString(); Source response = migrationCenterClient.getSource(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getSource
Gets the details of a source.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GetSourceRequest request = GetSourceRequest.newBuilder() .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) .build(); Source response = migrationCenterClient.getSource(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getSourceCallable
Gets the details of a source.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GetSourceRequest request = GetSourceRequest.newBuilder() .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) .build(); ApiFuture<Source> future = migrationCenterClient.getSourceCallable().futureCall(request); // Do something. Source response = future.get(); } -
createSourceAsync
public final OperationFuture<Source,OperationMetadata> createSourceAsync(LocationName parent, Source source, String sourceId) Creates a new source in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Source source = Source.newBuilder().build(); String sourceId = "sourceId1746327190"; Source response = migrationCenterClient.createSourceAsync(parent, source, sourceId).get(); }- Parameters:
parent- Required. Value for parent.source- Required. The resource being created.sourceId- Required. User specified ID for the source. It will become the last component of the source name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.- Throws:
ApiException- if the remote call fails
-
createSourceAsync
public final OperationFuture<Source,OperationMetadata> createSourceAsync(String parent, Source source, String sourceId) Creates a new source in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); Source source = Source.newBuilder().build(); String sourceId = "sourceId1746327190"; Source response = migrationCenterClient.createSourceAsync(parent, source, sourceId).get(); }- Parameters:
parent- Required. Value for parent.source- Required. The resource being created.sourceId- Required. User specified ID for the source. It will become the last component of the source name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.- Throws:
ApiException- if the remote call fails
-
createSourceAsync
public final OperationFuture<Source,OperationMetadata> createSourceAsync(CreateSourceRequest request) Creates a new source in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { CreateSourceRequest request = CreateSourceRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setSourceId("sourceId1746327190") .setSource(Source.newBuilder().build()) .setRequestId("requestId693933066") .build(); Source response = migrationCenterClient.createSourceAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createSourceOperationCallable
public final OperationCallable<CreateSourceRequest,Source, createSourceOperationCallable()OperationMetadata> Creates a new source in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { CreateSourceRequest request = CreateSourceRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setSourceId("sourceId1746327190") .setSource(Source.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<Source, OperationMetadata> future = migrationCenterClient.createSourceOperationCallable().futureCall(request); // Do something. Source response = future.get(); } -
createSourceCallable
Creates a new source in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { CreateSourceRequest request = CreateSourceRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setSourceId("sourceId1746327190") .setSource(Source.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = migrationCenterClient.createSourceCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateSourceAsync
public final OperationFuture<Source,OperationMetadata> updateSourceAsync(Source source, com.google.protobuf.FieldMask updateMask) Updates the parameters of a source.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { Source source = Source.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Source response = migrationCenterClient.updateSourceAsync(source, updateMask).get(); }- Parameters:
source- Required. The resource being updatedupdateMask- Required. Field mask is used to specify the fields to be overwritten in the `Source` resource by the update. The values specified in the `update_mask` field are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.- Throws:
ApiException- if the remote call fails
-
updateSourceAsync
public final OperationFuture<Source,OperationMetadata> updateSourceAsync(UpdateSourceRequest request) Updates the parameters of a source.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { UpdateSourceRequest request = UpdateSourceRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setSource(Source.newBuilder().build()) .setRequestId("requestId693933066") .build(); Source response = migrationCenterClient.updateSourceAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateSourceOperationCallable
public final OperationCallable<UpdateSourceRequest,Source, updateSourceOperationCallable()OperationMetadata> Updates the parameters of a source.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { UpdateSourceRequest request = UpdateSourceRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setSource(Source.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<Source, OperationMetadata> future = migrationCenterClient.updateSourceOperationCallable().futureCall(request); // Do something. Source response = future.get(); } -
updateSourceCallable
Updates the parameters of a source.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { UpdateSourceRequest request = UpdateSourceRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setSource(Source.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = migrationCenterClient.updateSourceCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteSourceAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSourceAsync(SourceName name) Deletes a source.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { SourceName name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]"); migrationCenterClient.deleteSourceAsync(name).get(); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
deleteSourceAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSourceAsync(String name) Deletes a source.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString(); migrationCenterClient.deleteSourceAsync(name).get(); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
deleteSourceAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSourceAsync(DeleteSourceRequest request) Deletes a source.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { DeleteSourceRequest request = DeleteSourceRequest.newBuilder() .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) .setRequestId("requestId693933066") .build(); migrationCenterClient.deleteSourceAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteSourceOperationCallable
public final OperationCallable<DeleteSourceRequest,com.google.protobuf.Empty, deleteSourceOperationCallable()OperationMetadata> Deletes a source.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { DeleteSourceRequest request = DeleteSourceRequest.newBuilder() .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = migrationCenterClient.deleteSourceOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteSourceCallable
Deletes a source.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { DeleteSourceRequest request = DeleteSourceRequest.newBuilder() .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = migrationCenterClient.deleteSourceCallable().futureCall(request); // Do something. future.get(); } -
listPreferenceSets
public final MigrationCenterClient.ListPreferenceSetsPagedResponse listPreferenceSets(LocationName parent) Lists all the preference sets in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (PreferenceSet element : migrationCenterClient.listPreferenceSets(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for `ListPreferenceSetsRequest`.- Throws:
ApiException- if the remote call fails
-
listPreferenceSets
public final MigrationCenterClient.ListPreferenceSetsPagedResponse listPreferenceSets(String parent) Lists all the preference sets in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (PreferenceSet element : migrationCenterClient.listPreferenceSets(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for `ListPreferenceSetsRequest`.- Throws:
ApiException- if the remote call fails
-
listPreferenceSets
public final MigrationCenterClient.ListPreferenceSetsPagedResponse listPreferenceSets(ListPreferenceSetsRequest request) Lists all the preference sets in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListPreferenceSetsRequest request = ListPreferenceSetsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .build(); for (PreferenceSet element : migrationCenterClient.listPreferenceSets(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listPreferenceSetsPagedCallable
public final UnaryCallable<ListPreferenceSetsRequest,MigrationCenterClient.ListPreferenceSetsPagedResponse> listPreferenceSetsPagedCallable()Lists all the preference sets in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListPreferenceSetsRequest request = ListPreferenceSetsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<PreferenceSet> future = migrationCenterClient.listPreferenceSetsPagedCallable().futureCall(request); // Do something. for (PreferenceSet element : future.get().iterateAll()) { // doThingsWith(element); } } -
listPreferenceSetsCallable
public final UnaryCallable<ListPreferenceSetsRequest,ListPreferenceSetsResponse> listPreferenceSetsCallable()Lists all the preference sets in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListPreferenceSetsRequest request = ListPreferenceSetsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListPreferenceSetsResponse response = migrationCenterClient.listPreferenceSetsCallable().call(request); for (PreferenceSet element : response.getPreferenceSetsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getPreferenceSet
Gets the details of a preference set.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { PreferenceSetName name = PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]"); PreferenceSet response = migrationCenterClient.getPreferenceSet(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getPreferenceSet
Gets the details of a preference set.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String name = PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString(); PreferenceSet response = migrationCenterClient.getPreferenceSet(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getPreferenceSet
Gets the details of a preference set.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GetPreferenceSetRequest request = GetPreferenceSetRequest.newBuilder() .setName( PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) .build(); PreferenceSet response = migrationCenterClient.getPreferenceSet(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getPreferenceSetCallable
Gets the details of a preference set.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GetPreferenceSetRequest request = GetPreferenceSetRequest.newBuilder() .setName( PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) .build(); ApiFuture<PreferenceSet> future = migrationCenterClient.getPreferenceSetCallable().futureCall(request); // Do something. PreferenceSet response = future.get(); } -
createPreferenceSetAsync
public final OperationFuture<PreferenceSet,OperationMetadata> createPreferenceSetAsync(LocationName parent, PreferenceSet preferenceSet, String preferenceSetId) Creates a new preference set in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); PreferenceSet preferenceSet = PreferenceSet.newBuilder().build(); String preferenceSetId = "preferenceSetId-569419518"; PreferenceSet response = migrationCenterClient .createPreferenceSetAsync(parent, preferenceSet, preferenceSetId) .get(); }- Parameters:
parent- Required. Value for parent.preferenceSet- Required. The preference set resource being created.preferenceSetId- Required. User specified ID for the preference set. It will become the last component of the preference set name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.- Throws:
ApiException- if the remote call fails
-
createPreferenceSetAsync
public final OperationFuture<PreferenceSet,OperationMetadata> createPreferenceSetAsync(String parent, PreferenceSet preferenceSet, String preferenceSetId) Creates a new preference set in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); PreferenceSet preferenceSet = PreferenceSet.newBuilder().build(); String preferenceSetId = "preferenceSetId-569419518"; PreferenceSet response = migrationCenterClient .createPreferenceSetAsync(parent, preferenceSet, preferenceSetId) .get(); }- Parameters:
parent- Required. Value for parent.preferenceSet- Required. The preference set resource being created.preferenceSetId- Required. User specified ID for the preference set. It will become the last component of the preference set name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`.- Throws:
ApiException- if the remote call fails
-
createPreferenceSetAsync
public final OperationFuture<PreferenceSet,OperationMetadata> createPreferenceSetAsync(CreatePreferenceSetRequest request) Creates a new preference set in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { CreatePreferenceSetRequest request = CreatePreferenceSetRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPreferenceSetId("preferenceSetId-569419518") .setPreferenceSet(PreferenceSet.newBuilder().build()) .setRequestId("requestId693933066") .build(); PreferenceSet response = migrationCenterClient.createPreferenceSetAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createPreferenceSetOperationCallable
public final OperationCallable<CreatePreferenceSetRequest,PreferenceSet, createPreferenceSetOperationCallable()OperationMetadata> Creates a new preference set in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { CreatePreferenceSetRequest request = CreatePreferenceSetRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPreferenceSetId("preferenceSetId-569419518") .setPreferenceSet(PreferenceSet.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<PreferenceSet, OperationMetadata> future = migrationCenterClient.createPreferenceSetOperationCallable().futureCall(request); // Do something. PreferenceSet response = future.get(); } -
createPreferenceSetCallable
Creates a new preference set in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { CreatePreferenceSetRequest request = CreatePreferenceSetRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPreferenceSetId("preferenceSetId-569419518") .setPreferenceSet(PreferenceSet.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = migrationCenterClient.createPreferenceSetCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updatePreferenceSetAsync
public final OperationFuture<PreferenceSet,OperationMetadata> updatePreferenceSetAsync(PreferenceSet preferenceSet, com.google.protobuf.FieldMask updateMask) Updates the parameters of a preference set.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { PreferenceSet preferenceSet = PreferenceSet.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); PreferenceSet response = migrationCenterClient.updatePreferenceSetAsync(preferenceSet, updateMask).get(); }- Parameters:
preferenceSet- Required. The preference set resource being updated.updateMask- Required. Field mask is used to specify the fields to be overwritten in the `PreferenceSet` resource by the update. The values specified in the `update_mask` field are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.- Throws:
ApiException- if the remote call fails
-
updatePreferenceSetAsync
public final OperationFuture<PreferenceSet,OperationMetadata> updatePreferenceSetAsync(UpdatePreferenceSetRequest request) Updates the parameters of a preference set.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { UpdatePreferenceSetRequest request = UpdatePreferenceSetRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setPreferenceSet(PreferenceSet.newBuilder().build()) .setRequestId("requestId693933066") .build(); PreferenceSet response = migrationCenterClient.updatePreferenceSetAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updatePreferenceSetOperationCallable
public final OperationCallable<UpdatePreferenceSetRequest,PreferenceSet, updatePreferenceSetOperationCallable()OperationMetadata> Updates the parameters of a preference set.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { UpdatePreferenceSetRequest request = UpdatePreferenceSetRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setPreferenceSet(PreferenceSet.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<PreferenceSet, OperationMetadata> future = migrationCenterClient.updatePreferenceSetOperationCallable().futureCall(request); // Do something. PreferenceSet response = future.get(); } -
updatePreferenceSetCallable
Updates the parameters of a preference set.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { UpdatePreferenceSetRequest request = UpdatePreferenceSetRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setPreferenceSet(PreferenceSet.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = migrationCenterClient.updatePreferenceSetCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deletePreferenceSetAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deletePreferenceSetAsync(PreferenceSetName name) Deletes a preference set.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { PreferenceSetName name = PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]"); migrationCenterClient.deletePreferenceSetAsync(name).get(); }- Parameters:
name- Required. Name of the group resource.- Throws:
ApiException- if the remote call fails
-
deletePreferenceSetAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deletePreferenceSetAsync(String name) Deletes a preference set.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String name = PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString(); migrationCenterClient.deletePreferenceSetAsync(name).get(); }- Parameters:
name- Required. Name of the group resource.- Throws:
ApiException- if the remote call fails
-
deletePreferenceSetAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deletePreferenceSetAsync(DeletePreferenceSetRequest request) Deletes a preference set.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { DeletePreferenceSetRequest request = DeletePreferenceSetRequest.newBuilder() .setName( PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) .setRequestId("requestId693933066") .build(); migrationCenterClient.deletePreferenceSetAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deletePreferenceSetOperationCallable
public final OperationCallable<DeletePreferenceSetRequest,com.google.protobuf.Empty, deletePreferenceSetOperationCallable()OperationMetadata> Deletes a preference set.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { DeletePreferenceSetRequest request = DeletePreferenceSetRequest.newBuilder() .setName( PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = migrationCenterClient.deletePreferenceSetOperationCallable().futureCall(request); // Do something. future.get(); } -
deletePreferenceSetCallable
Deletes a preference set.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { DeletePreferenceSetRequest request = DeletePreferenceSetRequest.newBuilder() .setName( PreferenceSetName.of("[PROJECT]", "[LOCATION]", "[PREFERENCE_SET]").toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = migrationCenterClient.deletePreferenceSetCallable().futureCall(request); // Do something. future.get(); } -
getSettings
Gets the details of regional settings.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { SettingsName name = SettingsName.of("[PROJECT]", "[LOCATION]"); Settings response = migrationCenterClient.getSettings(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getSettings
Gets the details of regional settings.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String name = SettingsName.of("[PROJECT]", "[LOCATION]").toString(); Settings response = migrationCenterClient.getSettings(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getSettings
Gets the details of regional settings.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GetSettingsRequest request = GetSettingsRequest.newBuilder() .setName(SettingsName.of("[PROJECT]", "[LOCATION]").toString()) .build(); Settings response = migrationCenterClient.getSettings(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getSettingsCallable
Gets the details of regional settings.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GetSettingsRequest request = GetSettingsRequest.newBuilder() .setName(SettingsName.of("[PROJECT]", "[LOCATION]").toString()) .build(); ApiFuture<Settings> future = migrationCenterClient.getSettingsCallable().futureCall(request); // Do something. Settings response = future.get(); } -
updateSettingsAsync
public final OperationFuture<Settings,OperationMetadata> updateSettingsAsync(Settings settings, com.google.protobuf.FieldMask updateMask) Updates the regional-level project settings.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { Settings settings = Settings.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Settings response = migrationCenterClient.updateSettingsAsync(settings, updateMask).get(); }- Parameters:
settings- Required. The project settings resource being updated.updateMask- Required. Field mask is used to specify the fields to be overwritten in the `Settings` resource by the update. The values specified in the `update_mask` field are relative to the resource, not the full request. A field will be overwritten if it is in the mask. A single * value in the mask lets you to overwrite all fields.- Throws:
ApiException- if the remote call fails
-
updateSettingsAsync
public final OperationFuture<Settings,OperationMetadata> updateSettingsAsync(UpdateSettingsRequest request) Updates the regional-level project settings.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { UpdateSettingsRequest request = UpdateSettingsRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setSettings(Settings.newBuilder().build()) .setRequestId("requestId693933066") .build(); Settings response = migrationCenterClient.updateSettingsAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateSettingsOperationCallable
public final OperationCallable<UpdateSettingsRequest,Settings, updateSettingsOperationCallable()OperationMetadata> Updates the regional-level project settings.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { UpdateSettingsRequest request = UpdateSettingsRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setSettings(Settings.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<Settings, OperationMetadata> future = migrationCenterClient.updateSettingsOperationCallable().futureCall(request); // Do something. Settings response = future.get(); } -
updateSettingsCallable
Updates the regional-level project settings.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { UpdateSettingsRequest request = UpdateSettingsRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setSettings(Settings.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = migrationCenterClient.updateSettingsCallable().futureCall(request); // Do something. Operation response = future.get(); } -
createReportConfigAsync
public final OperationFuture<ReportConfig,OperationMetadata> createReportConfigAsync(LocationName parent, ReportConfig reportConfig, String reportConfigId) Creates a report configuration.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); ReportConfig reportConfig = ReportConfig.newBuilder().build(); String reportConfigId = "reportConfigId1951664465"; ReportConfig response = migrationCenterClient.createReportConfigAsync(parent, reportConfig, reportConfigId).get(); }- Parameters:
parent- Required. Value for parent.reportConfig- Required. The report config set resource being created.reportConfigId- Required. User specified ID for the report config. It will become the last component of the report config name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.- Throws:
ApiException- if the remote call fails
-
createReportConfigAsync
public final OperationFuture<ReportConfig,OperationMetadata> createReportConfigAsync(String parent, ReportConfig reportConfig, String reportConfigId) Creates a report configuration.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); ReportConfig reportConfig = ReportConfig.newBuilder().build(); String reportConfigId = "reportConfigId1951664465"; ReportConfig response = migrationCenterClient.createReportConfigAsync(parent, reportConfig, reportConfigId).get(); }- Parameters:
parent- Required. Value for parent.reportConfig- Required. The report config set resource being created.reportConfigId- Required. User specified ID for the report config. It will become the last component of the report config name. The ID must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The ID must match the regular expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.- Throws:
ApiException- if the remote call fails
-
createReportConfigAsync
public final OperationFuture<ReportConfig,OperationMetadata> createReportConfigAsync(CreateReportConfigRequest request) Creates a report configuration.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { CreateReportConfigRequest request = CreateReportConfigRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setReportConfigId("reportConfigId1951664465") .setReportConfig(ReportConfig.newBuilder().build()) .setRequestId("requestId693933066") .build(); ReportConfig response = migrationCenterClient.createReportConfigAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createReportConfigOperationCallable
public final OperationCallable<CreateReportConfigRequest,ReportConfig, createReportConfigOperationCallable()OperationMetadata> Creates a report configuration.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { CreateReportConfigRequest request = CreateReportConfigRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setReportConfigId("reportConfigId1951664465") .setReportConfig(ReportConfig.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<ReportConfig, OperationMetadata> future = migrationCenterClient.createReportConfigOperationCallable().futureCall(request); // Do something. ReportConfig response = future.get(); } -
createReportConfigCallable
Creates a report configuration.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { CreateReportConfigRequest request = CreateReportConfigRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setReportConfigId("reportConfigId1951664465") .setReportConfig(ReportConfig.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = migrationCenterClient.createReportConfigCallable().futureCall(request); // Do something. Operation response = future.get(); } -
getReportConfig
Gets details of a single ReportConfig.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ReportConfigName name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); ReportConfig response = migrationCenterClient.getReportConfig(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getReportConfig
Gets details of a single ReportConfig.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString(); ReportConfig response = migrationCenterClient.getReportConfig(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getReportConfig
Gets details of a single ReportConfig.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GetReportConfigRequest request = GetReportConfigRequest.newBuilder() .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) .build(); ReportConfig response = migrationCenterClient.getReportConfig(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getReportConfigCallable
Gets details of a single ReportConfig.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GetReportConfigRequest request = GetReportConfigRequest.newBuilder() .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) .build(); ApiFuture<ReportConfig> future = migrationCenterClient.getReportConfigCallable().futureCall(request); // Do something. ReportConfig response = future.get(); } -
listReportConfigs
public final MigrationCenterClient.ListReportConfigsPagedResponse listReportConfigs(LocationName parent) Lists ReportConfigs in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (ReportConfig element : migrationCenterClient.listReportConfigs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for `ListReportConfigsRequest`.- Throws:
ApiException- if the remote call fails
-
listReportConfigs
Lists ReportConfigs in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (ReportConfig element : migrationCenterClient.listReportConfigs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for `ListReportConfigsRequest`.- Throws:
ApiException- if the remote call fails
-
listReportConfigs
public final MigrationCenterClient.ListReportConfigsPagedResponse listReportConfigs(ListReportConfigsRequest request) Lists ReportConfigs in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListReportConfigsRequest request = ListReportConfigsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (ReportConfig element : migrationCenterClient.listReportConfigs(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listReportConfigsPagedCallable
public final UnaryCallable<ListReportConfigsRequest,MigrationCenterClient.ListReportConfigsPagedResponse> listReportConfigsPagedCallable()Lists ReportConfigs in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListReportConfigsRequest request = ListReportConfigsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<ReportConfig> future = migrationCenterClient.listReportConfigsPagedCallable().futureCall(request); // Do something. for (ReportConfig element : future.get().iterateAll()) { // doThingsWith(element); } } -
listReportConfigsCallable
public final UnaryCallable<ListReportConfigsRequest,ListReportConfigsResponse> listReportConfigsCallable()Lists ReportConfigs in a given project and location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListReportConfigsRequest request = ListReportConfigsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListReportConfigsResponse response = migrationCenterClient.listReportConfigsCallable().call(request); for (ReportConfig element : response.getReportConfigsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
deleteReportConfigAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteReportConfigAsync(ReportConfigName name) Deletes a ReportConfig.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ReportConfigName name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); migrationCenterClient.deleteReportConfigAsync(name).get(); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
deleteReportConfigAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteReportConfigAsync(String name) Deletes a ReportConfig.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String name = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString(); migrationCenterClient.deleteReportConfigAsync(name).get(); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
deleteReportConfigAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteReportConfigAsync(DeleteReportConfigRequest request) Deletes a ReportConfig.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { DeleteReportConfigRequest request = DeleteReportConfigRequest.newBuilder() .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) .setRequestId("requestId693933066") .setForce(true) .build(); migrationCenterClient.deleteReportConfigAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteReportConfigOperationCallable
public final OperationCallable<DeleteReportConfigRequest,com.google.protobuf.Empty, deleteReportConfigOperationCallable()OperationMetadata> Deletes a ReportConfig.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { DeleteReportConfigRequest request = DeleteReportConfigRequest.newBuilder() .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) .setRequestId("requestId693933066") .setForce(true) .build(); OperationFuture<Empty, OperationMetadata> future = migrationCenterClient.deleteReportConfigOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteReportConfigCallable
Deletes a ReportConfig.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { DeleteReportConfigRequest request = DeleteReportConfigRequest.newBuilder() .setName(ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) .setRequestId("requestId693933066") .setForce(true) .build(); ApiFuture<Operation> future = migrationCenterClient.deleteReportConfigCallable().futureCall(request); // Do something. future.get(); } -
createReportAsync
public final OperationFuture<Report,OperationMetadata> createReportAsync(ReportConfigName parent, Report report, String reportId) Creates a report.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ReportConfigName parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); Report report = Report.newBuilder().build(); String reportId = "reportId-427040401"; Report response = migrationCenterClient.createReportAsync(parent, report, reportId).get(); }- Parameters:
parent- Required. Value for parent.report- Required. The report resource being created.reportId- Required. User specified id for the report. It will become the last component of the report name. The id must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The id must match the regular expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.- Throws:
ApiException- if the remote call fails
-
createReportAsync
public final OperationFuture<Report,OperationMetadata> createReportAsync(String parent, Report report, String reportId) Creates a report.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString(); Report report = Report.newBuilder().build(); String reportId = "reportId-427040401"; Report response = migrationCenterClient.createReportAsync(parent, report, reportId).get(); }- Parameters:
parent- Required. Value for parent.report- Required. The report resource being created.reportId- Required. User specified id for the report. It will become the last component of the report name. The id must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. The id must match the regular expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?.- Throws:
ApiException- if the remote call fails
-
createReportAsync
public final OperationFuture<Report,OperationMetadata> createReportAsync(CreateReportRequest request) Creates a report.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { CreateReportRequest request = CreateReportRequest.newBuilder() .setParent( ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) .setReportId("reportId-427040401") .setReport(Report.newBuilder().build()) .setRequestId("requestId693933066") .build(); Report response = migrationCenterClient.createReportAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createReportOperationCallable
public final OperationCallable<CreateReportRequest,Report, createReportOperationCallable()OperationMetadata> Creates a report.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { CreateReportRequest request = CreateReportRequest.newBuilder() .setParent( ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) .setReportId("reportId-427040401") .setReport(Report.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<Report, OperationMetadata> future = migrationCenterClient.createReportOperationCallable().futureCall(request); // Do something. Report response = future.get(); } -
createReportCallable
Creates a report.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { CreateReportRequest request = CreateReportRequest.newBuilder() .setParent( ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) .setReportId("reportId-427040401") .setReport(Report.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = migrationCenterClient.createReportCallable().futureCall(request); // Do something. Operation response = future.get(); } -
getReport
Gets details of a single Report.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ReportName name = ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]"); Report response = migrationCenterClient.getReport(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getReport
Gets details of a single Report.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String name = ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]").toString(); Report response = migrationCenterClient.getReport(name); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
getReport
Gets details of a single Report.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GetReportRequest request = GetReportRequest.newBuilder() .setName( ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]") .toString()) .setView(ReportView.forNumber(0)) .build(); Report response = migrationCenterClient.getReport(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getReportCallable
Gets details of a single Report.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GetReportRequest request = GetReportRequest.newBuilder() .setName( ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]") .toString()) .setView(ReportView.forNumber(0)) .build(); ApiFuture<Report> future = migrationCenterClient.getReportCallable().futureCall(request); // Do something. Report response = future.get(); } -
listReports
Lists Reports in a given ReportConfig.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ReportConfigName parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]"); for (Report element : migrationCenterClient.listReports(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for `ListReportsRequest`.- Throws:
ApiException- if the remote call fails
-
listReports
Lists Reports in a given ReportConfig.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String parent = ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString(); for (Report element : migrationCenterClient.listReports(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for `ListReportsRequest`.- Throws:
ApiException- if the remote call fails
-
listReports
Lists Reports in a given ReportConfig.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListReportsRequest request = ListReportsRequest.newBuilder() .setParent( ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .setView(ReportView.forNumber(0)) .build(); for (Report element : migrationCenterClient.listReports(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listReportsPagedCallable
public final UnaryCallable<ListReportsRequest,MigrationCenterClient.ListReportsPagedResponse> listReportsPagedCallable()Lists Reports in a given ReportConfig.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListReportsRequest request = ListReportsRequest.newBuilder() .setParent( ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .setView(ReportView.forNumber(0)) .build(); ApiFuture<Report> future = migrationCenterClient.listReportsPagedCallable().futureCall(request); // Do something. for (Report element : future.get().iterateAll()) { // doThingsWith(element); } } -
listReportsCallable
Lists Reports in a given ReportConfig.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListReportsRequest request = ListReportsRequest.newBuilder() .setParent( ReportConfigName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .setView(ReportView.forNumber(0)) .build(); while (true) { ListReportsResponse response = migrationCenterClient.listReportsCallable().call(request); for (Report element : response.getReportsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
deleteReportAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteReportAsync(ReportName name) Deletes a Report.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ReportName name = ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]"); migrationCenterClient.deleteReportAsync(name).get(); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
deleteReportAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteReportAsync(String name) Deletes a Report.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { String name = ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]").toString(); migrationCenterClient.deleteReportAsync(name).get(); }- Parameters:
name- Required. Name of the resource.- Throws:
ApiException- if the remote call fails
-
deleteReportAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteReportAsync(DeleteReportRequest request) Deletes a Report.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { DeleteReportRequest request = DeleteReportRequest.newBuilder() .setName( ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]") .toString()) .setRequestId("requestId693933066") .build(); migrationCenterClient.deleteReportAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteReportOperationCallable
public final OperationCallable<DeleteReportRequest,com.google.protobuf.Empty, deleteReportOperationCallable()OperationMetadata> Deletes a Report.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { DeleteReportRequest request = DeleteReportRequest.newBuilder() .setName( ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]") .toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = migrationCenterClient.deleteReportOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteReportCallable
Deletes a Report.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { DeleteReportRequest request = DeleteReportRequest.newBuilder() .setName( ReportName.of("[PROJECT]", "[LOCATION]", "[REPORT_CONFIG]", "[REPORT]") .toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = migrationCenterClient.deleteReportCallable().futureCall(request); // Do something. future.get(); } -
listLocations
public final MigrationCenterClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (Location element : migrationCenterClient.listLocations(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listLocationsPagedCallable
public final UnaryCallable<ListLocationsRequest,MigrationCenterClient.ListLocationsPagedResponse> listLocationsPagedCallable()Lists information about the supported locations for this service.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<Location> future = migrationCenterClient.listLocationsPagedCallable().futureCall(request); // Do something. for (Location element : future.get().iterateAll()) { // doThingsWith(element); } } -
listLocationsCallable
Lists information about the supported locations for this service.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListLocationsResponse response = migrationCenterClient.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; } } } -
getLocation
Gets information about a location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); Location response = migrationCenterClient.getLocation(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getLocationCallable
Gets information about a location.Sample 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 (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); ApiFuture<Location> future = migrationCenterClient.getLocationCallable().futureCall(request); // Do something. Location response = future.get(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-