com.google.cloud.migrationcenter.v1.MigrationCenterClient Maven / Gradle / Ivy
Show all versions of google-cloud-migrationcenter Show documentation
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.cloud.migrationcenter.v1;
import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.httpjson.longrunning.OperationsClient;
import com.google.api.gax.longrunning.OperationFuture;
import com.google.api.gax.paging.AbstractFixedSizeCollection;
import com.google.api.gax.paging.AbstractPage;
import com.google.api.gax.paging.AbstractPagedListResponse;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.PageContext;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
import com.google.cloud.location.Location;
import com.google.cloud.migrationcenter.v1.stub.MigrationCenterStub;
import com.google.cloud.migrationcenter.v1.stub.MigrationCenterStubSettings;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import com.google.protobuf.FieldMask;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* Service Description: Service describing handlers for resources.
*
* This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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().
*
*
* Methods
*
* 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.
*
* listAssets(ListAssetsRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* listAssets(LocationName parent)
*
listAssets(String parent)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* listAssetsPagedCallable()
*
listAssetsCallable()
*
*
*
*
* 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.
*
* getAsset(GetAssetRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getAsset(AssetName name)
*
getAsset(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* getAssetCallable()
*
*
*
*
* 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.
*
* updateAsset(UpdateAssetRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* updateAsset(Asset asset, FieldMask updateMask)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* updateAssetCallable()
*
*
*
*
* 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.
*
* batchUpdateAssets(LocationName parent, List<UpdateAssetRequest> requests)
*
batchUpdateAssets(String parent, List<UpdateAssetRequest> requests)
*
batchUpdateAssets(BatchUpdateAssetsRequest request)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* batchUpdateAssetsCallable()
*
*
*
*
* DeleteAsset
* Deletes an asset.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* deleteAsset(DeleteAssetRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* deleteAsset(AssetName name)
*
deleteAsset(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* deleteAssetCallable()
*
*
*
*
* BatchDeleteAssets
* Deletes list of Assets.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* batchDeleteAssets(BatchDeleteAssetsRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* batchDeleteAssets(LocationName parent, List<String> names)
*
batchDeleteAssets(String parent, List<String> names)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* batchDeleteAssetsCallable()
*
*
*
*
* ReportAssetFrames
* Reports a set of frames.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* reportAssetFrames(ReportAssetFramesRequest request)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* reportAssetFramesCallable()
*
*
*
*
* 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.
*
* aggregateAssetsValues(AggregateAssetsValuesRequest request)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* aggregateAssetsValuesCallable()
*
*
*
*
* CreateImportJob
* Creates an import job.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* createImportJobAsync(CreateImportJobRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* createImportJobAsync(LocationName parent, ImportJob importJob, String importJobId)
*
createImportJobAsync(String parent, ImportJob importJob, String importJobId)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* createImportJobOperationCallable()
*
createImportJobCallable()
*
*
*
*
* ListImportJobs
* Lists all import jobs.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* listImportJobs(ListImportJobsRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* listImportJobs(LocationName parent)
*
listImportJobs(String parent)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* listImportJobsPagedCallable()
*
listImportJobsCallable()
*
*
*
*
* 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.
*
* getImportJob(GetImportJobRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getImportJob(ImportJobName name)
*
getImportJob(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* getImportJobCallable()
*
*
*
*
* DeleteImportJob
* Deletes an import job.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* deleteImportJobAsync(DeleteImportJobRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* deleteImportJobAsync(ImportJobName name)
*
deleteImportJobAsync(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* deleteImportJobOperationCallable()
*
deleteImportJobCallable()
*
*
*
*
* UpdateImportJob
* Updates an import job.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* updateImportJobAsync(UpdateImportJobRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* updateImportJobAsync(ImportJob importJob, FieldMask updateMask)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* updateImportJobOperationCallable()
*
updateImportJobCallable()
*
*
*
*
* ValidateImportJob
* Validates an import job.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* validateImportJobAsync(ValidateImportJobRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* validateImportJobAsync(ImportJobName name)
*
validateImportJobAsync(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* validateImportJobOperationCallable()
*
validateImportJobCallable()
*
*
*
*
* RunImportJob
* Runs an import job.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* runImportJobAsync(RunImportJobRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* runImportJobAsync(ImportJobName name)
*
runImportJobAsync(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* runImportJobOperationCallable()
*
runImportJobCallable()
*
*
*
*
* GetImportDataFile
* Gets an import data file.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* getImportDataFile(GetImportDataFileRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getImportDataFile(ImportDataFileName name)
*
getImportDataFile(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* getImportDataFileCallable()
*
*
*
*
* ListImportDataFiles
* List import data files.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* listImportDataFiles(ListImportDataFilesRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* listImportDataFiles(ImportJobName parent)
*
listImportDataFiles(String parent)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* listImportDataFilesPagedCallable()
*
listImportDataFilesCallable()
*
*
*
*
* CreateImportDataFile
* Creates an import data file.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* createImportDataFileAsync(CreateImportDataFileRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* createImportDataFileAsync(ImportJobName parent, ImportDataFile importDataFile, String importDataFileId)
*
createImportDataFileAsync(String parent, ImportDataFile importDataFile, String importDataFileId)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* createImportDataFileOperationCallable()
*
createImportDataFileCallable()
*
*
*
*
* DeleteImportDataFile
* Delete an import data file.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* deleteImportDataFileAsync(DeleteImportDataFileRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* deleteImportDataFileAsync(ImportDataFileName name)
*
deleteImportDataFileAsync(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* deleteImportDataFileOperationCallable()
*
deleteImportDataFileCallable()
*
*
*
*
* 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.
*
* listGroups(ListGroupsRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* listGroups(LocationName parent)
*
listGroups(String parent)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* listGroupsPagedCallable()
*
listGroupsCallable()
*
*
*
*
* GetGroup
* Gets the details of a group.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* getGroup(GetGroupRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getGroup(GroupName name)
*
getGroup(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* getGroupCallable()
*
*
*
*
* CreateGroup
* Creates a new group in a given project and location.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* createGroupAsync(CreateGroupRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* createGroupAsync(LocationName parent, Group group, String groupId)
*
createGroupAsync(String parent, Group group, String groupId)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* createGroupOperationCallable()
*
createGroupCallable()
*
*
*
*
* UpdateGroup
* Updates the parameters of a group.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* updateGroupAsync(UpdateGroupRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* updateGroupAsync(Group group, FieldMask updateMask)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* updateGroupOperationCallable()
*
updateGroupCallable()
*
*
*
*
* DeleteGroup
* Deletes a group.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* deleteGroupAsync(DeleteGroupRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* deleteGroupAsync(GroupName name)
*
deleteGroupAsync(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* deleteGroupOperationCallable()
*
deleteGroupCallable()
*
*
*
*
* AddAssetsToGroup
* Adds assets to a group.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* addAssetsToGroupAsync(AddAssetsToGroupRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* addAssetsToGroupAsync(GroupName group)
*
addAssetsToGroupAsync(String group)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* addAssetsToGroupOperationCallable()
*
addAssetsToGroupCallable()
*
*
*
*
* RemoveAssetsFromGroup
* Removes assets from a group.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* removeAssetsFromGroupAsync(RemoveAssetsFromGroupRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* removeAssetsFromGroupAsync(GroupName group)
*
removeAssetsFromGroupAsync(String group)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* removeAssetsFromGroupOperationCallable()
*
removeAssetsFromGroupCallable()
*
*
*
*
* 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.
*
* listErrorFrames(ListErrorFramesRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* listErrorFrames(SourceName parent)
*
listErrorFrames(String parent)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* listErrorFramesPagedCallable()
*
listErrorFramesCallable()
*
*
*
*
* 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.
*
* getErrorFrame(GetErrorFrameRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getErrorFrame(ErrorFrameName name)
*
getErrorFrame(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* getErrorFrameCallable()
*
*
*
*
* 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.
*
* listSources(ListSourcesRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* listSources(LocationName parent)
*
listSources(String parent)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* listSourcesPagedCallable()
*
listSourcesCallable()
*
*
*
*
* GetSource
* Gets the details of a source.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* getSource(GetSourceRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getSource(SourceName name)
*
getSource(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* getSourceCallable()
*
*
*
*
* CreateSource
* Creates a new source in a given project and location.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* createSourceAsync(CreateSourceRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* createSourceAsync(LocationName parent, Source source, String sourceId)
*
createSourceAsync(String parent, Source source, String sourceId)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* createSourceOperationCallable()
*
createSourceCallable()
*
*
*
*
* UpdateSource
* Updates the parameters of a source.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* updateSourceAsync(UpdateSourceRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* updateSourceAsync(Source source, FieldMask updateMask)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* updateSourceOperationCallable()
*
updateSourceCallable()
*
*
*
*
* DeleteSource
* Deletes a source.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* deleteSourceAsync(DeleteSourceRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* deleteSourceAsync(SourceName name)
*
deleteSourceAsync(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* deleteSourceOperationCallable()
*
deleteSourceCallable()
*
*
*
*
* 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.
*
* listPreferenceSets(ListPreferenceSetsRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* listPreferenceSets(LocationName parent)
*
listPreferenceSets(String parent)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* listPreferenceSetsPagedCallable()
*
listPreferenceSetsCallable()
*
*
*
*
* 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.
*
* getPreferenceSet(GetPreferenceSetRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getPreferenceSet(PreferenceSetName name)
*
getPreferenceSet(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* getPreferenceSetCallable()
*
*
*
*
* 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.
*
* createPreferenceSetAsync(CreatePreferenceSetRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* createPreferenceSetAsync(LocationName parent, PreferenceSet preferenceSet, String preferenceSetId)
*
createPreferenceSetAsync(String parent, PreferenceSet preferenceSet, String preferenceSetId)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* createPreferenceSetOperationCallable()
*
createPreferenceSetCallable()
*
*
*
*
* 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.
*
* updatePreferenceSetAsync(UpdatePreferenceSetRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* updatePreferenceSetAsync(PreferenceSet preferenceSet, FieldMask updateMask)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* updatePreferenceSetOperationCallable()
*
updatePreferenceSetCallable()
*
*
*
*
* DeletePreferenceSet
* Deletes a preference set.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* deletePreferenceSetAsync(DeletePreferenceSetRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* deletePreferenceSetAsync(PreferenceSetName name)
*
deletePreferenceSetAsync(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* deletePreferenceSetOperationCallable()
*
deletePreferenceSetCallable()
*
*
*
*
* 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.
*
* getSettings(GetSettingsRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getSettings(SettingsName name)
*
getSettings(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* getSettingsCallable()
*
*
*
*
* 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.
*
* updateSettingsAsync(UpdateSettingsRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* updateSettingsAsync(Settings settings, FieldMask updateMask)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* updateSettingsOperationCallable()
*
updateSettingsCallable()
*
*
*
*
* CreateReportConfig
* Creates a report configuration.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* createReportConfigAsync(CreateReportConfigRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* createReportConfigAsync(LocationName parent, ReportConfig reportConfig, String reportConfigId)
*
createReportConfigAsync(String parent, ReportConfig reportConfig, String reportConfigId)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* createReportConfigOperationCallable()
*
createReportConfigCallable()
*
*
*
*
* 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.
*
* getReportConfig(GetReportConfigRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getReportConfig(ReportConfigName name)
*
getReportConfig(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* getReportConfigCallable()
*
*
*
*
* 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.
*
* listReportConfigs(ListReportConfigsRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* listReportConfigs(LocationName parent)
*
listReportConfigs(String parent)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* listReportConfigsPagedCallable()
*
listReportConfigsCallable()
*
*
*
*
* DeleteReportConfig
* Deletes a ReportConfig.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* deleteReportConfigAsync(DeleteReportConfigRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* deleteReportConfigAsync(ReportConfigName name)
*
deleteReportConfigAsync(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* deleteReportConfigOperationCallable()
*
deleteReportConfigCallable()
*
*
*
*
* CreateReport
* Creates a report.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* createReportAsync(CreateReportRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* createReportAsync(ReportConfigName parent, Report report, String reportId)
*
createReportAsync(String parent, Report report, String reportId)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* createReportOperationCallable()
*
createReportCallable()
*
*
*
*
* 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.
*
* getReport(GetReportRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getReport(ReportName name)
*
getReport(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* getReportCallable()
*
*
*
*
* 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.
*
* listReports(ListReportsRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* listReports(ReportConfigName parent)
*
listReports(String parent)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* listReportsPagedCallable()
*
listReportsCallable()
*
*
*
*
* DeleteReport
* Deletes a Report.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* deleteReportAsync(DeleteReportRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* deleteReportAsync(ReportName name)
*
deleteReportAsync(String name)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* deleteReportOperationCallable()
*
deleteReportCallable()
*
*
*
*
* ListLocations
* Lists information about the supported locations for this service.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* listLocations(ListLocationsRequest request)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* listLocationsPagedCallable()
*
listLocationsCallable()
*
*
*
*
* GetLocation
* Gets information about a location.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* getLocation(GetLocationRequest request)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* getLocationCallable()
*
*
*
*
*
* See the individual methods for example code.
*
*
Many parameters require resource names to be formatted in a particular way. To assist with
* these names, this class includes a format method for each type of name, and additionally a parse
* method to extract the individual identifiers contained within names that are returned.
*
*
This class can be customized by passing in a custom instance of MigrationCenterSettings to
* create(). For example:
*
*
To customize credentials:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* MigrationCenterSettings migrationCenterSettings =
* MigrationCenterSettings.newBuilder()
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
* .build();
* MigrationCenterClient migrationCenterClient =
* MigrationCenterClient.create(migrationCenterSettings);
* }
*
* To customize the endpoint:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* 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:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require 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.
*/
@Generated("by gapic-generator-java")
public class MigrationCenterClient implements BackgroundResource {
private final MigrationCenterSettings settings;
private final MigrationCenterStub stub;
private final OperationsClient httpJsonOperationsClient;
private final com.google.longrunning.OperationsClient operationsClient;
/** Constructs an instance of MigrationCenterClient with default settings. */
public static final MigrationCenterClient create() throws IOException {
return create(MigrationCenterSettings.newBuilder().build());
}
/**
* 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.
*/
public static final MigrationCenterClient create(MigrationCenterSettings settings)
throws IOException {
return new MigrationCenterClient(settings);
}
/**
* Constructs an instance of MigrationCenterClient, using the given stub for making calls. This is
* for advanced usage - prefer using create(MigrationCenterSettings).
*/
public static final MigrationCenterClient create(MigrationCenterStub stub) {
return new MigrationCenterClient(stub);
}
/**
* 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.
*/
protected MigrationCenterClient(MigrationCenterSettings settings) throws IOException {
this.settings = settings;
this.stub = ((MigrationCenterStubSettings) settings.getStubSettings()).createStub();
this.operationsClient =
com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
protected MigrationCenterClient(MigrationCenterStub stub) {
this.settings = null;
this.stub = stub;
this.operationsClient =
com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
public final MigrationCenterSettings getSettings() {
return settings;
}
public MigrationCenterStub getStub() {
return stub;
}
/**
* Returns the OperationsClient that can be used to query the status of a long-running operation
* returned by another API method call.
*/
public final com.google.longrunning.OperationsClient getOperationsClient() {
return operationsClient;
}
/**
* Returns the OperationsClient that can be used to query the status of a long-running operation
* returned by another API method call.
*/
@BetaApi
public final OperationsClient getHttpJsonOperationsClient() {
return httpJsonOperationsClient;
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all the assets in a given project and location.
*
*
Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* for (Asset element : migrationCenterClient.listAssets(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. Parent value for `ListAssetsRequest`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListAssetsPagedResponse listAssets(LocationName parent) {
ListAssetsRequest request =
ListAssetsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
return listAssets(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all the assets in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* for (Asset element : migrationCenterClient.listAssets(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. Parent value for `ListAssetsRequest`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListAssetsPagedResponse listAssets(String parent) {
ListAssetsRequest request = ListAssetsRequest.newBuilder().setParent(parent).build();
return listAssets(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all the assets in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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);
* }
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListAssetsPagedResponse listAssets(ListAssetsRequest request) {
return listAssetsPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all the assets in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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 future = migrationCenterClient.listAssetsPagedCallable().futureCall(request);
* // Do something.
* for (Asset element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*/
public final UnaryCallable listAssetsPagedCallable() {
return stub.listAssetsPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all the assets in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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;
* }
* }
* }
* }
*/
public final UnaryCallable listAssetsCallable() {
return stub.listAssetsCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the details of an asset.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]");
* Asset response = migrationCenterClient.getAsset(name);
* }
* }
*
* @param name Required. Name of the resource.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Asset getAsset(AssetName name) {
GetAssetRequest request =
GetAssetRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return getAsset(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the details of an asset.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* String name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString();
* Asset response = migrationCenterClient.getAsset(name);
* }
* }
*
* @param name Required. Name of the resource.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Asset getAsset(String name) {
GetAssetRequest request = GetAssetRequest.newBuilder().setName(name).build();
return getAsset(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the details of an asset.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Asset getAsset(GetAssetRequest request) {
return getAssetCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the details of an asset.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* GetAssetRequest request =
* GetAssetRequest.newBuilder()
* .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString())
* .setView(AssetView.forNumber(0))
* .build();
* ApiFuture future = migrationCenterClient.getAssetCallable().futureCall(request);
* // Do something.
* Asset response = future.get();
* }
* }
*/
public final UnaryCallable getAssetCallable() {
return stub.getAssetCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the parameters of an asset.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* Asset asset = Asset.newBuilder().build();
* FieldMask updateMask = FieldMask.newBuilder().build();
* Asset response = migrationCenterClient.updateAsset(asset, updateMask);
* }
* }
*
* @param asset Required. The resource being updated.
* @param 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 com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Asset updateAsset(Asset asset, FieldMask updateMask) {
UpdateAssetRequest request =
UpdateAssetRequest.newBuilder().setAsset(asset).setUpdateMask(updateMask).build();
return updateAsset(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the parameters of an asset.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* UpdateAssetRequest request =
* UpdateAssetRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setAsset(Asset.newBuilder().build())
* .setRequestId("requestId693933066")
* .build();
* Asset response = migrationCenterClient.updateAsset(request);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Asset updateAsset(UpdateAssetRequest request) {
return updateAssetCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the parameters of an asset.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* UpdateAssetRequest request =
* UpdateAssetRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setAsset(Asset.newBuilder().build())
* .setRequestId("requestId693933066")
* .build();
* ApiFuture future = migrationCenterClient.updateAssetCallable().futureCall(request);
* // Do something.
* Asset response = future.get();
* }
* }
*/
public final UnaryCallable updateAssetCallable() {
return stub.updateAssetCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the parameters of a list of assets.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* List requests = new ArrayList<>();
* BatchUpdateAssetsResponse response =
* migrationCenterClient.batchUpdateAssets(parent, requests);
* }
* }
*
* @param parent Required. Parent value for batch asset update.
* @param requests Required. The request message specifying the resources to update. A maximum of
* 1000 assets can be modified in a batch.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final BatchUpdateAssetsResponse batchUpdateAssets(
LocationName parent, List requests) {
BatchUpdateAssetsRequest request =
BatchUpdateAssetsRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.addAllRequests(requests)
.build();
return batchUpdateAssets(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the parameters of a list of assets.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* List requests = new ArrayList<>();
* BatchUpdateAssetsResponse response =
* migrationCenterClient.batchUpdateAssets(parent, requests);
* }
* }
*
* @param parent Required. Parent value for batch asset update.
* @param requests Required. The request message specifying the resources to update. A maximum of
* 1000 assets can be modified in a batch.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final BatchUpdateAssetsResponse batchUpdateAssets(
String parent, List requests) {
BatchUpdateAssetsRequest request =
BatchUpdateAssetsRequest.newBuilder().setParent(parent).addAllRequests(requests).build();
return batchUpdateAssets(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the parameters of a list of assets.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* BatchUpdateAssetsRequest request =
* BatchUpdateAssetsRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .addAllRequests(new ArrayList())
* .build();
* BatchUpdateAssetsResponse response = migrationCenterClient.batchUpdateAssets(request);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final BatchUpdateAssetsResponse batchUpdateAssets(BatchUpdateAssetsRequest request) {
return batchUpdateAssetsCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the parameters of a list of assets.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* BatchUpdateAssetsRequest request =
* BatchUpdateAssetsRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .addAllRequests(new ArrayList())
* .build();
* ApiFuture future =
* migrationCenterClient.batchUpdateAssetsCallable().futureCall(request);
* // Do something.
* BatchUpdateAssetsResponse response = future.get();
* }
* }
*/
public final UnaryCallable
batchUpdateAssetsCallable() {
return stub.batchUpdateAssetsCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes an asset.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* AssetName name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]");
* migrationCenterClient.deleteAsset(name);
* }
* }
*
* @param name Required. Name of the resource.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteAsset(AssetName name) {
DeleteAssetRequest request =
DeleteAssetRequest.newBuilder().setName(name == null ? null : name.toString()).build();
deleteAsset(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes an asset.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* String name = AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString();
* migrationCenterClient.deleteAsset(name);
* }
* }
*
* @param name Required. Name of the resource.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteAsset(String name) {
DeleteAssetRequest request = DeleteAssetRequest.newBuilder().setName(name).build();
deleteAsset(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes an asset.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* DeleteAssetRequest request =
* DeleteAssetRequest.newBuilder()
* .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString())
* .setRequestId("requestId693933066")
* .build();
* migrationCenterClient.deleteAsset(request);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteAsset(DeleteAssetRequest request) {
deleteAssetCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes an asset.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* DeleteAssetRequest request =
* DeleteAssetRequest.newBuilder()
* .setName(AssetName.of("[PROJECT]", "[LOCATION]", "[ASSET]").toString())
* .setRequestId("requestId693933066")
* .build();
* ApiFuture future = migrationCenterClient.deleteAssetCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final UnaryCallable deleteAssetCallable() {
return stub.deleteAssetCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes list of Assets.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* List names = new ArrayList<>();
* migrationCenterClient.batchDeleteAssets(parent, names);
* }
* }
*
* @param parent Required. Parent value for batch asset delete.
* @param 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 com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void batchDeleteAssets(LocationName parent, List names) {
BatchDeleteAssetsRequest request =
BatchDeleteAssetsRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.addAllNames(names)
.build();
batchDeleteAssets(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes list of Assets.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* List names = new ArrayList<>();
* migrationCenterClient.batchDeleteAssets(parent, names);
* }
* }
*
* @param parent Required. Parent value for batch asset delete.
* @param 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 com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void batchDeleteAssets(String parent, List names) {
BatchDeleteAssetsRequest request =
BatchDeleteAssetsRequest.newBuilder().setParent(parent).addAllNames(names).build();
batchDeleteAssets(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes list of Assets.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* BatchDeleteAssetsRequest request =
* BatchDeleteAssetsRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .addAllNames(new ArrayList())
* .setAllowMissing(true)
* .build();
* migrationCenterClient.batchDeleteAssets(request);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void batchDeleteAssets(BatchDeleteAssetsRequest request) {
batchDeleteAssetsCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes list of Assets.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* BatchDeleteAssetsRequest request =
* BatchDeleteAssetsRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .addAllNames(new ArrayList())
* .setAllowMissing(true)
* .build();
* ApiFuture future =
* migrationCenterClient.batchDeleteAssetsCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final UnaryCallable batchDeleteAssetsCallable() {
return stub.batchDeleteAssetsCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Reports a set of frames.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ReportAssetFramesResponse reportAssetFrames(ReportAssetFramesRequest request) {
return reportAssetFramesCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Reports a set of frames.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* ReportAssetFramesRequest request =
* ReportAssetFramesRequest.newBuilder()
* .setParent("parent-995424086")
* .setFrames(Frames.newBuilder().build())
* .setSource(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
* .build();
* ApiFuture future =
* migrationCenterClient.reportAssetFramesCallable().futureCall(request);
* // Do something.
* ReportAssetFramesResponse response = future.get();
* }
* }
*/
public final UnaryCallable
reportAssetFramesCallable() {
return stub.reportAssetFramesCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Aggregates the requested fields based on provided function.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* AggregateAssetsValuesRequest request =
* AggregateAssetsValuesRequest.newBuilder()
* .setParent("parent-995424086")
* .addAllAggregations(new ArrayList())
* .setFilter("filter-1274492040")
* .build();
* AggregateAssetsValuesResponse response = migrationCenterClient.aggregateAssetsValues(request);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final AggregateAssetsValuesResponse aggregateAssetsValues(
AggregateAssetsValuesRequest request) {
return aggregateAssetsValuesCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Aggregates the requested fields based on provided function.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* AggregateAssetsValuesRequest request =
* AggregateAssetsValuesRequest.newBuilder()
* .setParent("parent-995424086")
* .addAllAggregations(new ArrayList())
* .setFilter("filter-1274492040")
* .build();
* ApiFuture future =
* migrationCenterClient.aggregateAssetsValuesCallable().futureCall(request);
* // Do something.
* AggregateAssetsValuesResponse response = future.get();
* }
* }
*/
public final UnaryCallable
aggregateAssetsValuesCallable() {
return stub.aggregateAssetsValuesCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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();
* }
* }
*
* @param parent Required. Value for parent.
* @param importJob Required. The resource being created.
* @param importJobId Required. ID of the import job.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createImportJobAsync(
LocationName parent, ImportJob importJob, String importJobId) {
CreateImportJobRequest request =
CreateImportJobRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.setImportJob(importJob)
.setImportJobId(importJobId)
.build();
return createImportJobAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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();
* }
* }
*
* @param parent Required. Value for parent.
* @param importJob Required. The resource being created.
* @param importJobId Required. ID of the import job.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createImportJobAsync(
String parent, ImportJob importJob, String importJobId) {
CreateImportJobRequest request =
CreateImportJobRequest.newBuilder()
.setParent(parent)
.setImportJob(importJob)
.setImportJobId(importJobId)
.build();
return createImportJobAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createImportJobAsync(
CreateImportJobRequest request) {
return createImportJobOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* CreateImportJobRequest request =
* CreateImportJobRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setImportJobId("importJobId1449444627")
* .setImportJob(ImportJob.newBuilder().build())
* .setRequestId("requestId693933066")
* .build();
* OperationFuture future =
* migrationCenterClient.createImportJobOperationCallable().futureCall(request);
* // Do something.
* ImportJob response = future.get();
* }
* }
*/
public final OperationCallable
createImportJobOperationCallable() {
return stub.createImportJobOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* CreateImportJobRequest request =
* CreateImportJobRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setImportJobId("importJobId1449444627")
* .setImportJob(ImportJob.newBuilder().build())
* .setRequestId("requestId693933066")
* .build();
* ApiFuture future =
* migrationCenterClient.createImportJobCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable createImportJobCallable() {
return stub.createImportJobCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all import jobs.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* for (ImportJob element : migrationCenterClient.listImportJobs(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. Parent value for `ListImportJobsRequest`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListImportJobsPagedResponse listImportJobs(LocationName parent) {
ListImportJobsRequest request =
ListImportJobsRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.build();
return listImportJobs(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all import jobs.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* for (ImportJob element : migrationCenterClient.listImportJobs(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. Parent value for `ListImportJobsRequest`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListImportJobsPagedResponse listImportJobs(String parent) {
ListImportJobsRequest request = ListImportJobsRequest.newBuilder().setParent(parent).build();
return listImportJobs(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all import jobs.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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);
* }
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListImportJobsPagedResponse listImportJobs(ListImportJobsRequest request) {
return listImportJobsPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all import jobs.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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 future =
* migrationCenterClient.listImportJobsPagedCallable().futureCall(request);
* // Do something.
* for (ImportJob element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*/
public final UnaryCallable
listImportJobsPagedCallable() {
return stub.listImportJobsPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all import jobs.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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;
* }
* }
* }
* }
*/
public final UnaryCallable
listImportJobsCallable() {
return stub.listImportJobsCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the details of an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]");
* ImportJob response = migrationCenterClient.getImportJob(name);
* }
* }
*
* @param name Required. Name of the resource.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ImportJob getImportJob(ImportJobName name) {
GetImportJobRequest request =
GetImportJobRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return getImportJob(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the details of an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* String name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString();
* ImportJob response = migrationCenterClient.getImportJob(name);
* }
* }
*
* @param name Required. Name of the resource.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ImportJob getImportJob(String name) {
GetImportJobRequest request = GetImportJobRequest.newBuilder().setName(name).build();
return getImportJob(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the details of an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ImportJob getImportJob(GetImportJobRequest request) {
return getImportJobCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the details of an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* GetImportJobRequest request =
* GetImportJobRequest.newBuilder()
* .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
* .setView(ImportJobView.forNumber(0))
* .build();
* ApiFuture future =
* migrationCenterClient.getImportJobCallable().futureCall(request);
* // Do something.
* ImportJob response = future.get();
* }
* }
*/
public final UnaryCallable getImportJobCallable() {
return stub.getImportJobCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]");
* migrationCenterClient.deleteImportJobAsync(name).get();
* }
* }
*
* @param name Required. Name of the resource.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteImportJobAsync(ImportJobName name) {
DeleteImportJobRequest request =
DeleteImportJobRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return deleteImportJobAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* String name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString();
* migrationCenterClient.deleteImportJobAsync(name).get();
* }
* }
*
* @param name Required. Name of the resource.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteImportJobAsync(String name) {
DeleteImportJobRequest request = DeleteImportJobRequest.newBuilder().setName(name).build();
return deleteImportJobAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteImportJobAsync(
DeleteImportJobRequest request) {
return deleteImportJobOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* DeleteImportJobRequest request =
* DeleteImportJobRequest.newBuilder()
* .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
* .setRequestId("requestId693933066")
* .setForce(true)
* .build();
* OperationFuture future =
* migrationCenterClient.deleteImportJobOperationCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final OperationCallable
deleteImportJobOperationCallable() {
return stub.deleteImportJobOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* DeleteImportJobRequest request =
* DeleteImportJobRequest.newBuilder()
* .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
* .setRequestId("requestId693933066")
* .setForce(true)
* .build();
* ApiFuture future =
* migrationCenterClient.deleteImportJobCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final UnaryCallable deleteImportJobCallable() {
return stub.deleteImportJobCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* ImportJob importJob = ImportJob.newBuilder().build();
* FieldMask updateMask = FieldMask.newBuilder().build();
* ImportJob response = migrationCenterClient.updateImportJobAsync(importJob, updateMask).get();
* }
* }
*
* @param importJob Required. The resource being updated
* @param 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 com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateImportJobAsync(
ImportJob importJob, FieldMask updateMask) {
UpdateImportJobRequest request =
UpdateImportJobRequest.newBuilder()
.setImportJob(importJob)
.setUpdateMask(updateMask)
.build();
return updateImportJobAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateImportJobAsync(
UpdateImportJobRequest request) {
return updateImportJobOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* UpdateImportJobRequest request =
* UpdateImportJobRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setImportJob(ImportJob.newBuilder().build())
* .setRequestId("requestId693933066")
* .build();
* OperationFuture future =
* migrationCenterClient.updateImportJobOperationCallable().futureCall(request);
* // Do something.
* ImportJob response = future.get();
* }
* }
*/
public final OperationCallable
updateImportJobOperationCallable() {
return stub.updateImportJobOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* UpdateImportJobRequest request =
* UpdateImportJobRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setImportJob(ImportJob.newBuilder().build())
* .setRequestId("requestId693933066")
* .build();
* ApiFuture future =
* migrationCenterClient.updateImportJobCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable updateImportJobCallable() {
return stub.updateImportJobCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Validates an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]");
* migrationCenterClient.validateImportJobAsync(name).get();
* }
* }
*
* @param name Required. The name of the import job to validate.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture validateImportJobAsync(
ImportJobName name) {
ValidateImportJobRequest request =
ValidateImportJobRequest.newBuilder()
.setName(name == null ? null : name.toString())
.build();
return validateImportJobAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Validates an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* String name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString();
* migrationCenterClient.validateImportJobAsync(name).get();
* }
* }
*
* @param name Required. The name of the import job to validate.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture validateImportJobAsync(String name) {
ValidateImportJobRequest request = ValidateImportJobRequest.newBuilder().setName(name).build();
return validateImportJobAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Validates an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* ValidateImportJobRequest request =
* ValidateImportJobRequest.newBuilder()
* .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
* .setRequestId("requestId693933066")
* .build();
* migrationCenterClient.validateImportJobAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture validateImportJobAsync(
ValidateImportJobRequest request) {
return validateImportJobOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Validates an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* ValidateImportJobRequest request =
* ValidateImportJobRequest.newBuilder()
* .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
* .setRequestId("requestId693933066")
* .build();
* OperationFuture future =
* migrationCenterClient.validateImportJobOperationCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final OperationCallable
validateImportJobOperationCallable() {
return stub.validateImportJobOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Validates an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* ValidateImportJobRequest request =
* ValidateImportJobRequest.newBuilder()
* .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
* .setRequestId("requestId693933066")
* .build();
* ApiFuture future =
* migrationCenterClient.validateImportJobCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final UnaryCallable validateImportJobCallable() {
return stub.validateImportJobCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Runs an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* ImportJobName name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]");
* migrationCenterClient.runImportJobAsync(name).get();
* }
* }
*
* @param name Required. The name of the import job to run.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture runImportJobAsync(ImportJobName name) {
RunImportJobRequest request =
RunImportJobRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return runImportJobAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Runs an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* String name = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString();
* migrationCenterClient.runImportJobAsync(name).get();
* }
* }
*
* @param name Required. The name of the import job to run.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture runImportJobAsync(String name) {
RunImportJobRequest request = RunImportJobRequest.newBuilder().setName(name).build();
return runImportJobAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Runs an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* RunImportJobRequest request =
* RunImportJobRequest.newBuilder()
* .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
* .setRequestId("requestId693933066")
* .build();
* migrationCenterClient.runImportJobAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture runImportJobAsync(
RunImportJobRequest request) {
return runImportJobOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Runs an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* RunImportJobRequest request =
* RunImportJobRequest.newBuilder()
* .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
* .setRequestId("requestId693933066")
* .build();
* OperationFuture future =
* migrationCenterClient.runImportJobOperationCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final OperationCallable
runImportJobOperationCallable() {
return stub.runImportJobOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Runs an import job.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* RunImportJobRequest request =
* RunImportJobRequest.newBuilder()
* .setName(ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString())
* .setRequestId("requestId693933066")
* .build();
* ApiFuture future =
* migrationCenterClient.runImportJobCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final UnaryCallable runImportJobCallable() {
return stub.runImportJobCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets an import data file.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* ImportDataFileName name =
* ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]");
* ImportDataFile response = migrationCenterClient.getImportDataFile(name);
* }
* }
*
* @param name Required. Name of the ImportDataFile.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ImportDataFile getImportDataFile(ImportDataFileName name) {
GetImportDataFileRequest request =
GetImportDataFileRequest.newBuilder()
.setName(name == null ? null : name.toString())
.build();
return getImportDataFile(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets an import data file.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* String name =
* ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]")
* .toString();
* ImportDataFile response = migrationCenterClient.getImportDataFile(name);
* }
* }
*
* @param name Required. Name of the ImportDataFile.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ImportDataFile getImportDataFile(String name) {
GetImportDataFileRequest request = GetImportDataFileRequest.newBuilder().setName(name).build();
return getImportDataFile(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets an import data file.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ImportDataFile getImportDataFile(GetImportDataFileRequest request) {
return getImportDataFileCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets an import data file.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* GetImportDataFileRequest request =
* GetImportDataFileRequest.newBuilder()
* .setName(
* ImportDataFileName.of(
* "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]")
* .toString())
* .build();
* ApiFuture future =
* migrationCenterClient.getImportDataFileCallable().futureCall(request);
* // Do something.
* ImportDataFile response = future.get();
* }
* }
*/
public final UnaryCallable getImportDataFileCallable() {
return stub.getImportDataFileCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* List import data files.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* ImportJobName parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]");
* for (ImportDataFile element :
* migrationCenterClient.listImportDataFiles(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. Name of the parent of the `ImportDataFiles` resource.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListImportDataFilesPagedResponse listImportDataFiles(ImportJobName parent) {
ListImportDataFilesRequest request =
ListImportDataFilesRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.build();
return listImportDataFiles(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* List import data files.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* String parent = ImportJobName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]").toString();
* for (ImportDataFile element :
* migrationCenterClient.listImportDataFiles(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. Name of the parent of the `ImportDataFiles` resource.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListImportDataFilesPagedResponse listImportDataFiles(String parent) {
ListImportDataFilesRequest request =
ListImportDataFilesRequest.newBuilder().setParent(parent).build();
return listImportDataFiles(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* List import data files.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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);
* }
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListImportDataFilesPagedResponse listImportDataFiles(
ListImportDataFilesRequest request) {
return listImportDataFilesPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* List import data files.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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 future =
* migrationCenterClient.listImportDataFilesPagedCallable().futureCall(request);
* // Do something.
* for (ImportDataFile element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*/
public final UnaryCallable
listImportDataFilesPagedCallable() {
return stub.listImportDataFilesPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* List import data files.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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;
* }
* }
* }
* }
*/
public final UnaryCallable
listImportDataFilesCallable() {
return stub.listImportDataFilesCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates an import data file.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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();
* }
* }
*
* @param parent Required. Name of the parent of the ImportDataFile.
* @param importDataFile Required. The resource being created.
* @param importDataFileId Required. The ID of the new data file.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createImportDataFileAsync(
ImportJobName parent, ImportDataFile importDataFile, String importDataFileId) {
CreateImportDataFileRequest request =
CreateImportDataFileRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.setImportDataFile(importDataFile)
.setImportDataFileId(importDataFileId)
.build();
return createImportDataFileAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates an import data file.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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();
* }
* }
*
* @param parent Required. Name of the parent of the ImportDataFile.
* @param importDataFile Required. The resource being created.
* @param importDataFileId Required. The ID of the new data file.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createImportDataFileAsync(
String parent, ImportDataFile importDataFile, String importDataFileId) {
CreateImportDataFileRequest request =
CreateImportDataFileRequest.newBuilder()
.setParent(parent)
.setImportDataFile(importDataFile)
.setImportDataFileId(importDataFileId)
.build();
return createImportDataFileAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates an import data file.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createImportDataFileAsync(
CreateImportDataFileRequest request) {
return createImportDataFileOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates an import data file.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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 future =
* migrationCenterClient.createImportDataFileOperationCallable().futureCall(request);
* // Do something.
* ImportDataFile response = future.get();
* }
* }
*/
public final OperationCallable
createImportDataFileOperationCallable() {
return stub.createImportDataFileOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates an import data file.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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 future =
* migrationCenterClient.createImportDataFileCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable
createImportDataFileCallable() {
return stub.createImportDataFileCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Delete an import data file.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* ImportDataFileName name =
* ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]");
* migrationCenterClient.deleteImportDataFileAsync(name).get();
* }
* }
*
* @param name Required. Name of the ImportDataFile to delete.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteImportDataFileAsync(
ImportDataFileName name) {
DeleteImportDataFileRequest request =
DeleteImportDataFileRequest.newBuilder()
.setName(name == null ? null : name.toString())
.build();
return deleteImportDataFileAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Delete an import data file.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* String name =
* ImportDataFileName.of("[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]")
* .toString();
* migrationCenterClient.deleteImportDataFileAsync(name).get();
* }
* }
*
* @param name Required. Name of the ImportDataFile to delete.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteImportDataFileAsync(String name) {
DeleteImportDataFileRequest request =
DeleteImportDataFileRequest.newBuilder().setName(name).build();
return deleteImportDataFileAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Delete an import data file.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteImportDataFileAsync(
DeleteImportDataFileRequest request) {
return deleteImportDataFileOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Delete an import data file.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* DeleteImportDataFileRequest request =
* DeleteImportDataFileRequest.newBuilder()
* .setName(
* ImportDataFileName.of(
* "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]")
* .toString())
* .setRequestId("requestId693933066")
* .build();
* OperationFuture future =
* migrationCenterClient.deleteImportDataFileOperationCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final OperationCallable
deleteImportDataFileOperationCallable() {
return stub.deleteImportDataFileOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Delete an import data file.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* DeleteImportDataFileRequest request =
* DeleteImportDataFileRequest.newBuilder()
* .setName(
* ImportDataFileName.of(
* "[PROJECT]", "[LOCATION]", "[IMPORT_JOB]", "[IMPORT_DATA_FILE]")
* .toString())
* .setRequestId("requestId693933066")
* .build();
* ApiFuture future =
* migrationCenterClient.deleteImportDataFileCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final UnaryCallable
deleteImportDataFileCallable() {
return stub.deleteImportDataFileCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all groups in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* for (Group element : migrationCenterClient.listGroups(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. Parent value for `ListGroupsRequest`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListGroupsPagedResponse listGroups(LocationName parent) {
ListGroupsRequest request =
ListGroupsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
return listGroups(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all groups in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* for (Group element : migrationCenterClient.listGroups(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. Parent value for `ListGroupsRequest`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListGroupsPagedResponse listGroups(String parent) {
ListGroupsRequest request = ListGroupsRequest.newBuilder().setParent(parent).build();
return listGroups(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all groups in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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);
* }
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListGroupsPagedResponse listGroups(ListGroupsRequest request) {
return listGroupsPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all groups in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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 future = migrationCenterClient.listGroupsPagedCallable().futureCall(request);
* // Do something.
* for (Group element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*/
public final UnaryCallable listGroupsPagedCallable() {
return stub.listGroupsPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all groups in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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;
* }
* }
* }
* }
*/
public final UnaryCallable listGroupsCallable() {
return stub.listGroupsCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the details of a group.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* GroupName name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]");
* Group response = migrationCenterClient.getGroup(name);
* }
* }
*
* @param name Required. Name of the resource.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Group getGroup(GroupName name) {
GetGroupRequest request =
GetGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return getGroup(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the details of a group.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* String name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString();
* Group response = migrationCenterClient.getGroup(name);
* }
* }
*
* @param name Required. Name of the resource.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Group getGroup(String name) {
GetGroupRequest request = GetGroupRequest.newBuilder().setName(name).build();
return getGroup(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the details of a group.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* GetGroupRequest request =
* GetGroupRequest.newBuilder()
* .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
* .build();
* Group response = migrationCenterClient.getGroup(request);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Group getGroup(GetGroupRequest request) {
return getGroupCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the details of a group.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* GetGroupRequest request =
* GetGroupRequest.newBuilder()
* .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
* .build();
* ApiFuture future = migrationCenterClient.getGroupCallable().futureCall(request);
* // Do something.
* Group response = future.get();
* }
* }
*/
public final UnaryCallable getGroupCallable() {
return stub.getGroupCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new group in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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();
* }
* }
*
* @param parent Required. Value for parent.
* @param group Required. The group resource being created.
* @param 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 com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createGroupAsync(
LocationName parent, Group group, String groupId) {
CreateGroupRequest request =
CreateGroupRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.setGroup(group)
.setGroupId(groupId)
.build();
return createGroupAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new group in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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();
* }
* }
*
* @param parent Required. Value for parent.
* @param group Required. The group resource being created.
* @param 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 com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createGroupAsync(
String parent, Group group, String groupId) {
CreateGroupRequest request =
CreateGroupRequest.newBuilder()
.setParent(parent)
.setGroup(group)
.setGroupId(groupId)
.build();
return createGroupAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new group in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createGroupAsync(
CreateGroupRequest request) {
return createGroupOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new group in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* CreateGroupRequest request =
* CreateGroupRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setGroupId("groupId293428218")
* .setGroup(Group.newBuilder().build())
* .setRequestId("requestId693933066")
* .build();
* OperationFuture future =
* migrationCenterClient.createGroupOperationCallable().futureCall(request);
* // Do something.
* Group response = future.get();
* }
* }
*/
public final OperationCallable
createGroupOperationCallable() {
return stub.createGroupOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new group in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* CreateGroupRequest request =
* CreateGroupRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setGroupId("groupId293428218")
* .setGroup(Group.newBuilder().build())
* .setRequestId("requestId693933066")
* .build();
* ApiFuture future = migrationCenterClient.createGroupCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable createGroupCallable() {
return stub.createGroupCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the parameters of a group.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* Group group = Group.newBuilder().build();
* FieldMask updateMask = FieldMask.newBuilder().build();
* Group response = migrationCenterClient.updateGroupAsync(group, updateMask).get();
* }
* }
*
* @param group Required. The group resource being updated.
* @param 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 com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateGroupAsync(
Group group, FieldMask updateMask) {
UpdateGroupRequest request =
UpdateGroupRequest.newBuilder().setGroup(group).setUpdateMask(updateMask).build();
return updateGroupAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the parameters of a group.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateGroupAsync(
UpdateGroupRequest request) {
return updateGroupOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the parameters of a group.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* UpdateGroupRequest request =
* UpdateGroupRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setGroup(Group.newBuilder().build())
* .setRequestId("requestId693933066")
* .build();
* OperationFuture future =
* migrationCenterClient.updateGroupOperationCallable().futureCall(request);
* // Do something.
* Group response = future.get();
* }
* }
*/
public final OperationCallable
updateGroupOperationCallable() {
return stub.updateGroupOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the parameters of a group.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* UpdateGroupRequest request =
* UpdateGroupRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setGroup(Group.newBuilder().build())
* .setRequestId("requestId693933066")
* .build();
* ApiFuture future = migrationCenterClient.updateGroupCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable updateGroupCallable() {
return stub.updateGroupCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a group.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* GroupName name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]");
* migrationCenterClient.deleteGroupAsync(name).get();
* }
* }
*
* @param name Required. Name of the group resource.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteGroupAsync(GroupName name) {
DeleteGroupRequest request =
DeleteGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return deleteGroupAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a group.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* String name = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString();
* migrationCenterClient.deleteGroupAsync(name).get();
* }
* }
*
* @param name Required. Name of the group resource.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteGroupAsync(String name) {
DeleteGroupRequest request = DeleteGroupRequest.newBuilder().setName(name).build();
return deleteGroupAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a group.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* DeleteGroupRequest request =
* DeleteGroupRequest.newBuilder()
* .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
* .setRequestId("requestId693933066")
* .build();
* migrationCenterClient.deleteGroupAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteGroupAsync(
DeleteGroupRequest request) {
return deleteGroupOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a group.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* DeleteGroupRequest request =
* DeleteGroupRequest.newBuilder()
* .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
* .setRequestId("requestId693933066")
* .build();
* OperationFuture future =
* migrationCenterClient.deleteGroupOperationCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final OperationCallable
deleteGroupOperationCallable() {
return stub.deleteGroupOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a group.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* DeleteGroupRequest request =
* DeleteGroupRequest.newBuilder()
* .setName(GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString())
* .setRequestId("requestId693933066")
* .build();
* ApiFuture future = migrationCenterClient.deleteGroupCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final UnaryCallable deleteGroupCallable() {
return stub.deleteGroupCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Adds assets to a group.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* GroupName group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]");
* Group response = migrationCenterClient.addAssetsToGroupAsync(group).get();
* }
* }
*
* @param group Required. Group reference.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture addAssetsToGroupAsync(GroupName group) {
AddAssetsToGroupRequest request =
AddAssetsToGroupRequest.newBuilder()
.setGroup(group == null ? null : group.toString())
.build();
return addAssetsToGroupAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Adds assets to a group.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* String group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString();
* Group response = migrationCenterClient.addAssetsToGroupAsync(group).get();
* }
* }
*
* @param group Required. Group reference.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture addAssetsToGroupAsync(String group) {
AddAssetsToGroupRequest request = AddAssetsToGroupRequest.newBuilder().setGroup(group).build();
return addAssetsToGroupAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Adds assets to a group.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture addAssetsToGroupAsync(
AddAssetsToGroupRequest request) {
return addAssetsToGroupOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Adds assets to a group.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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 future =
* migrationCenterClient.addAssetsToGroupOperationCallable().futureCall(request);
* // Do something.
* Group response = future.get();
* }
* }
*/
public final OperationCallable
addAssetsToGroupOperationCallable() {
return stub.addAssetsToGroupOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Adds assets to a group.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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 future =
* migrationCenterClient.addAssetsToGroupCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable addAssetsToGroupCallable() {
return stub.addAssetsToGroupCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Removes assets from a group.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* GroupName group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]");
* Group response = migrationCenterClient.removeAssetsFromGroupAsync(group).get();
* }
* }
*
* @param group Required. Group reference.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture removeAssetsFromGroupAsync(
GroupName group) {
RemoveAssetsFromGroupRequest request =
RemoveAssetsFromGroupRequest.newBuilder()
.setGroup(group == null ? null : group.toString())
.build();
return removeAssetsFromGroupAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Removes assets from a group.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* String group = GroupName.of("[PROJECT]", "[LOCATION]", "[GROUP]").toString();
* Group response = migrationCenterClient.removeAssetsFromGroupAsync(group).get();
* }
* }
*
* @param group Required. Group reference.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture removeAssetsFromGroupAsync(String group) {
RemoveAssetsFromGroupRequest request =
RemoveAssetsFromGroupRequest.newBuilder().setGroup(group).build();
return removeAssetsFromGroupAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Removes assets from a group.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture removeAssetsFromGroupAsync(
RemoveAssetsFromGroupRequest request) {
return removeAssetsFromGroupOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Removes assets from a group.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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 future =
* migrationCenterClient.removeAssetsFromGroupOperationCallable().futureCall(request);
* // Do something.
* Group response = future.get();
* }
* }
*/
public final OperationCallable
removeAssetsFromGroupOperationCallable() {
return stub.removeAssetsFromGroupOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Removes assets from a group.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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 future =
* migrationCenterClient.removeAssetsFromGroupCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable
removeAssetsFromGroupCallable() {
return stub.removeAssetsFromGroupCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all error frames in a given source and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* SourceName parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
* for (ErrorFrame element : migrationCenterClient.listErrorFrames(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. Parent value (the source) for `ListErrorFramesRequest`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListErrorFramesPagedResponse listErrorFrames(SourceName parent) {
ListErrorFramesRequest request =
ListErrorFramesRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.build();
return listErrorFrames(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all error frames in a given source and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* String parent = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString();
* for (ErrorFrame element : migrationCenterClient.listErrorFrames(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. Parent value (the source) for `ListErrorFramesRequest`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListErrorFramesPagedResponse listErrorFrames(String parent) {
ListErrorFramesRequest request = ListErrorFramesRequest.newBuilder().setParent(parent).build();
return listErrorFrames(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all error frames in a given source and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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);
* }
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListErrorFramesPagedResponse listErrorFrames(ListErrorFramesRequest request) {
return listErrorFramesPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all error frames in a given source and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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 future =
* migrationCenterClient.listErrorFramesPagedCallable().futureCall(request);
* // Do something.
* for (ErrorFrame element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*/
public final UnaryCallable
listErrorFramesPagedCallable() {
return stub.listErrorFramesPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all error frames in a given source and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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;
* }
* }
* }
* }
*/
public final UnaryCallable
listErrorFramesCallable() {
return stub.listErrorFramesCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the details of an error frame.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* ErrorFrameName name =
* ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]");
* ErrorFrame response = migrationCenterClient.getErrorFrame(name);
* }
* }
*
* @param name Required. The name of the frame to retrieve. Format:
* projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame}
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ErrorFrame getErrorFrame(ErrorFrameName name) {
GetErrorFrameRequest request =
GetErrorFrameRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return getErrorFrame(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the details of an error frame.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* String name =
* ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]").toString();
* ErrorFrame response = migrationCenterClient.getErrorFrame(name);
* }
* }
*
* @param name Required. The name of the frame to retrieve. Format:
* projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame}
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ErrorFrame getErrorFrame(String name) {
GetErrorFrameRequest request = GetErrorFrameRequest.newBuilder().setName(name).build();
return getErrorFrame(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the details of an error frame.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ErrorFrame getErrorFrame(GetErrorFrameRequest request) {
return getErrorFrameCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the details of an error frame.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* GetErrorFrameRequest request =
* GetErrorFrameRequest.newBuilder()
* .setName(
* ErrorFrameName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[ERROR_FRAME]")
* .toString())
* .setView(ErrorFrameView.forNumber(0))
* .build();
* ApiFuture future =
* migrationCenterClient.getErrorFrameCallable().futureCall(request);
* // Do something.
* ErrorFrame response = future.get();
* }
* }
*/
public final UnaryCallable getErrorFrameCallable() {
return stub.getErrorFrameCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all the sources in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* for (Source element : migrationCenterClient.listSources(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. Parent value for `ListSourcesRequest`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListSourcesPagedResponse listSources(LocationName parent) {
ListSourcesRequest request =
ListSourcesRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.build();
return listSources(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all the sources in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* for (Source element : migrationCenterClient.listSources(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. Parent value for `ListSourcesRequest`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListSourcesPagedResponse listSources(String parent) {
ListSourcesRequest request = ListSourcesRequest.newBuilder().setParent(parent).build();
return listSources(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all the sources in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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);
* }
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListSourcesPagedResponse listSources(ListSourcesRequest request) {
return listSourcesPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all the sources in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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
*/
public final UnaryCallable
listSourcesPagedCallable() {
return stub.listSourcesPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all the sources in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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;
* }
* }
* }
* }
*/
public final UnaryCallable listSourcesCallable() {
return stub.listSourcesCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the details of a source.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* SourceName name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]");
* Source response = migrationCenterClient.getSource(name);
* }
* }
*
* @param name Required. Name of the resource.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Source getSource(SourceName name) {
GetSourceRequest request =
GetSourceRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return getSource(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the details of a source.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* String name = SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString();
* Source response = migrationCenterClient.getSource(name);
* }
* }
*
* @param name Required. Name of the resource.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Source getSource(String name) {
GetSourceRequest request = GetSourceRequest.newBuilder().setName(name).build();
return getSource(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the details of a source.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* GetSourceRequest request =
* GetSourceRequest.newBuilder()
* .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
* .build();
* Source response = migrationCenterClient.getSource(request);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Source getSource(GetSourceRequest request) {
return getSourceCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets the details of a source.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MigrationCenterClient migrationCenterClient = MigrationCenterClient.create()) {
* GetSourceRequest request =
* GetSourceRequest.newBuilder()
* .setName(SourceName.of("[PROJECT]", "[LOCATION]", "[SOURCE]").toString())
* .build();
* ApiFuture
*/
public final UnaryCallable getSourceCallable() {
return stub.getSourceCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new source in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (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();
* }
* }
*
* @param parent Required. Value for parent.
* @param source Required. The resource being created.
* @param 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 com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture