Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
Migration Center API Google Cloud Migration Center is a unified platform that helps you accelerate your end-to-end cloud journey from your current on-premises or cloud environments to Google Cloud
/*
* 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.stub;
import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListAssetsPagedResponse;
import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListErrorFramesPagedResponse;
import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListGroupsPagedResponse;
import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListImportDataFilesPagedResponse;
import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListImportJobsPagedResponse;
import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListLocationsPagedResponse;
import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListPreferenceSetsPagedResponse;
import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListReportConfigsPagedResponse;
import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListReportsPagedResponse;
import static com.google.cloud.migrationcenter.v1.MigrationCenterClient.ListSourcesPagedResponse;
import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.GaxProperties;
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
import com.google.api.gax.grpc.GaxGrpcProperties;
import com.google.api.gax.grpc.GrpcTransportChannel;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
import com.google.api.gax.grpc.ProtoOperationTransformers;
import com.google.api.gax.httpjson.GaxHttpJsonProperties;
import com.google.api.gax.httpjson.HttpJsonTransportChannel;
import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.longrunning.OperationSnapshot;
import com.google.api.gax.longrunning.OperationTimedPollAlgorithm;
import com.google.api.gax.retrying.RetrySettings;
import com.google.api.gax.rpc.ApiCallContext;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.OperationCallSettings;
import com.google.api.gax.rpc.PageContext;
import com.google.api.gax.rpc.PagedCallSettings;
import com.google.api.gax.rpc.PagedListDescriptor;
import com.google.api.gax.rpc.PagedListResponseFactory;
import com.google.api.gax.rpc.StatusCode;
import com.google.api.gax.rpc.StubSettings;
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
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.AddAssetsToGroupRequest;
import com.google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest;
import com.google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse;
import com.google.cloud.migrationcenter.v1.Asset;
import com.google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest;
import com.google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest;
import com.google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse;
import com.google.cloud.migrationcenter.v1.CreateGroupRequest;
import com.google.cloud.migrationcenter.v1.CreateImportDataFileRequest;
import com.google.cloud.migrationcenter.v1.CreateImportJobRequest;
import com.google.cloud.migrationcenter.v1.CreatePreferenceSetRequest;
import com.google.cloud.migrationcenter.v1.CreateReportConfigRequest;
import com.google.cloud.migrationcenter.v1.CreateReportRequest;
import com.google.cloud.migrationcenter.v1.CreateSourceRequest;
import com.google.cloud.migrationcenter.v1.DeleteAssetRequest;
import com.google.cloud.migrationcenter.v1.DeleteGroupRequest;
import com.google.cloud.migrationcenter.v1.DeleteImportDataFileRequest;
import com.google.cloud.migrationcenter.v1.DeleteImportJobRequest;
import com.google.cloud.migrationcenter.v1.DeletePreferenceSetRequest;
import com.google.cloud.migrationcenter.v1.DeleteReportConfigRequest;
import com.google.cloud.migrationcenter.v1.DeleteReportRequest;
import com.google.cloud.migrationcenter.v1.DeleteSourceRequest;
import com.google.cloud.migrationcenter.v1.ErrorFrame;
import com.google.cloud.migrationcenter.v1.GetAssetRequest;
import com.google.cloud.migrationcenter.v1.GetErrorFrameRequest;
import com.google.cloud.migrationcenter.v1.GetGroupRequest;
import com.google.cloud.migrationcenter.v1.GetImportDataFileRequest;
import com.google.cloud.migrationcenter.v1.GetImportJobRequest;
import com.google.cloud.migrationcenter.v1.GetPreferenceSetRequest;
import com.google.cloud.migrationcenter.v1.GetReportConfigRequest;
import com.google.cloud.migrationcenter.v1.GetReportRequest;
import com.google.cloud.migrationcenter.v1.GetSettingsRequest;
import com.google.cloud.migrationcenter.v1.GetSourceRequest;
import com.google.cloud.migrationcenter.v1.Group;
import com.google.cloud.migrationcenter.v1.ImportDataFile;
import com.google.cloud.migrationcenter.v1.ImportJob;
import com.google.cloud.migrationcenter.v1.ListAssetsRequest;
import com.google.cloud.migrationcenter.v1.ListAssetsResponse;
import com.google.cloud.migrationcenter.v1.ListErrorFramesRequest;
import com.google.cloud.migrationcenter.v1.ListErrorFramesResponse;
import com.google.cloud.migrationcenter.v1.ListGroupsRequest;
import com.google.cloud.migrationcenter.v1.ListGroupsResponse;
import com.google.cloud.migrationcenter.v1.ListImportDataFilesRequest;
import com.google.cloud.migrationcenter.v1.ListImportDataFilesResponse;
import com.google.cloud.migrationcenter.v1.ListImportJobsRequest;
import com.google.cloud.migrationcenter.v1.ListImportJobsResponse;
import com.google.cloud.migrationcenter.v1.ListPreferenceSetsRequest;
import com.google.cloud.migrationcenter.v1.ListPreferenceSetsResponse;
import com.google.cloud.migrationcenter.v1.ListReportConfigsRequest;
import com.google.cloud.migrationcenter.v1.ListReportConfigsResponse;
import com.google.cloud.migrationcenter.v1.ListReportsRequest;
import com.google.cloud.migrationcenter.v1.ListReportsResponse;
import com.google.cloud.migrationcenter.v1.ListSourcesRequest;
import com.google.cloud.migrationcenter.v1.ListSourcesResponse;
import com.google.cloud.migrationcenter.v1.OperationMetadata;
import com.google.cloud.migrationcenter.v1.PreferenceSet;
import com.google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest;
import com.google.cloud.migrationcenter.v1.Report;
import com.google.cloud.migrationcenter.v1.ReportAssetFramesRequest;
import com.google.cloud.migrationcenter.v1.ReportAssetFramesResponse;
import com.google.cloud.migrationcenter.v1.ReportConfig;
import com.google.cloud.migrationcenter.v1.RunImportJobRequest;
import com.google.cloud.migrationcenter.v1.Settings;
import com.google.cloud.migrationcenter.v1.Source;
import com.google.cloud.migrationcenter.v1.UpdateAssetRequest;
import com.google.cloud.migrationcenter.v1.UpdateGroupRequest;
import com.google.cloud.migrationcenter.v1.UpdateImportJobRequest;
import com.google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest;
import com.google.cloud.migrationcenter.v1.UpdateSettingsRequest;
import com.google.cloud.migrationcenter.v1.UpdateSourceRequest;
import com.google.cloud.migrationcenter.v1.ValidateImportJobRequest;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Lists;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import java.io.IOException;
import java.util.List;
import javax.annotation.Generated;
import org.threeten.bp.Duration;
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* Settings class to configure an instance of {@link MigrationCenterStub}.
*
*
The default instance has everything set to sensible defaults:
*
*
*
The default service address (migrationcenter.googleapis.com) and default port (443) are
* used.
*
Credentials are acquired automatically through Application Default Credentials.
*
Retries are configured for idempotent methods but not for non-idempotent methods.
*
*
*
The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
*
For example, to set the total timeout of getAsset to 30 seconds:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* MigrationCenterStubSettings.Builder migrationCenterSettingsBuilder =
* MigrationCenterStubSettings.newBuilder();
* migrationCenterSettingsBuilder
* .getAssetSettings()
* .setRetrySettings(
* migrationCenterSettingsBuilder
* .getAssetSettings()
* .getRetrySettings()
* .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* MigrationCenterStubSettings migrationCenterSettings = migrationCenterSettingsBuilder.build();
* }
*/
@Generated("by gapic-generator-java")
public class MigrationCenterStubSettings extends StubSettings {
/** The default scopes of the service. */
private static final ImmutableList DEFAULT_SERVICE_SCOPES =
ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build();
private final PagedCallSettings
listAssetsSettings;
private final UnaryCallSettings getAssetSettings;
private final UnaryCallSettings updateAssetSettings;
private final UnaryCallSettings
batchUpdateAssetsSettings;
private final UnaryCallSettings deleteAssetSettings;
private final UnaryCallSettings batchDeleteAssetsSettings;
private final UnaryCallSettings
reportAssetFramesSettings;
private final UnaryCallSettings
aggregateAssetsValuesSettings;
private final UnaryCallSettings createImportJobSettings;
private final OperationCallSettings
createImportJobOperationSettings;
private final PagedCallSettings<
ListImportJobsRequest, ListImportJobsResponse, ListImportJobsPagedResponse>
listImportJobsSettings;
private final UnaryCallSettings getImportJobSettings;
private final UnaryCallSettings deleteImportJobSettings;
private final OperationCallSettings
deleteImportJobOperationSettings;
private final UnaryCallSettings updateImportJobSettings;
private final OperationCallSettings
updateImportJobOperationSettings;
private final UnaryCallSettings validateImportJobSettings;
private final OperationCallSettings
validateImportJobOperationSettings;
private final UnaryCallSettings runImportJobSettings;
private final OperationCallSettings
runImportJobOperationSettings;
private final UnaryCallSettings
getImportDataFileSettings;
private final PagedCallSettings<
ListImportDataFilesRequest, ListImportDataFilesResponse, ListImportDataFilesPagedResponse>
listImportDataFilesSettings;
private final UnaryCallSettings
createImportDataFileSettings;
private final OperationCallSettings<
CreateImportDataFileRequest, ImportDataFile, OperationMetadata>
createImportDataFileOperationSettings;
private final UnaryCallSettings
deleteImportDataFileSettings;
private final OperationCallSettings
deleteImportDataFileOperationSettings;
private final PagedCallSettings
listGroupsSettings;
private final UnaryCallSettings getGroupSettings;
private final UnaryCallSettings createGroupSettings;
private final OperationCallSettings
createGroupOperationSettings;
private final UnaryCallSettings updateGroupSettings;
private final OperationCallSettings
updateGroupOperationSettings;
private final UnaryCallSettings deleteGroupSettings;
private final OperationCallSettings
deleteGroupOperationSettings;
private final UnaryCallSettings addAssetsToGroupSettings;
private final OperationCallSettings
addAssetsToGroupOperationSettings;
private final UnaryCallSettings
removeAssetsFromGroupSettings;
private final OperationCallSettings
removeAssetsFromGroupOperationSettings;
private final PagedCallSettings<
ListErrorFramesRequest, ListErrorFramesResponse, ListErrorFramesPagedResponse>
listErrorFramesSettings;
private final UnaryCallSettings getErrorFrameSettings;
private final PagedCallSettings
listSourcesSettings;
private final UnaryCallSettings getSourceSettings;
private final UnaryCallSettings createSourceSettings;
private final OperationCallSettings
createSourceOperationSettings;
private final UnaryCallSettings updateSourceSettings;
private final OperationCallSettings
updateSourceOperationSettings;
private final UnaryCallSettings deleteSourceSettings;
private final OperationCallSettings
deleteSourceOperationSettings;
private final PagedCallSettings<
ListPreferenceSetsRequest, ListPreferenceSetsResponse, ListPreferenceSetsPagedResponse>
listPreferenceSetsSettings;
private final UnaryCallSettings getPreferenceSetSettings;
private final UnaryCallSettings
createPreferenceSetSettings;
private final OperationCallSettings
createPreferenceSetOperationSettings;
private final UnaryCallSettings
updatePreferenceSetSettings;
private final OperationCallSettings
updatePreferenceSetOperationSettings;
private final UnaryCallSettings
deletePreferenceSetSettings;
private final OperationCallSettings
deletePreferenceSetOperationSettings;
private final UnaryCallSettings getSettingsSettings;
private final UnaryCallSettings updateSettingsSettings;
private final OperationCallSettings
updateSettingsOperationSettings;
private final UnaryCallSettings createReportConfigSettings;
private final OperationCallSettings
createReportConfigOperationSettings;
private final UnaryCallSettings getReportConfigSettings;
private final PagedCallSettings<
ListReportConfigsRequest, ListReportConfigsResponse, ListReportConfigsPagedResponse>
listReportConfigsSettings;
private final UnaryCallSettings deleteReportConfigSettings;
private final OperationCallSettings
deleteReportConfigOperationSettings;
private final UnaryCallSettings createReportSettings;
private final OperationCallSettings
createReportOperationSettings;
private final UnaryCallSettings getReportSettings;
private final PagedCallSettings
listReportsSettings;
private final UnaryCallSettings deleteReportSettings;
private final OperationCallSettings
deleteReportOperationSettings;
private final PagedCallSettings<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings;
private final UnaryCallSettings getLocationSettings;
private static final PagedListDescriptor
LIST_ASSETS_PAGE_STR_DESC =
new PagedListDescriptor() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListAssetsRequest injectToken(ListAssetsRequest payload, String token) {
return ListAssetsRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListAssetsRequest injectPageSize(ListAssetsRequest payload, int pageSize) {
return ListAssetsRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListAssetsRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListAssetsResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable extractResources(ListAssetsResponse payload) {
return payload.getAssetsList() == null
? ImmutableList.of()
: payload.getAssetsList();
}
};
private static final PagedListDescriptor
LIST_IMPORT_JOBS_PAGE_STR_DESC =
new PagedListDescriptor() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListImportJobsRequest injectToken(ListImportJobsRequest payload, String token) {
return ListImportJobsRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListImportJobsRequest injectPageSize(
ListImportJobsRequest payload, int pageSize) {
return ListImportJobsRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListImportJobsRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListImportJobsResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable extractResources(ListImportJobsResponse payload) {
return payload.getImportJobsList() == null
? ImmutableList.of()
: payload.getImportJobsList();
}
};
private static final PagedListDescriptor<
ListImportDataFilesRequest, ListImportDataFilesResponse, ImportDataFile>
LIST_IMPORT_DATA_FILES_PAGE_STR_DESC =
new PagedListDescriptor<
ListImportDataFilesRequest, ListImportDataFilesResponse, ImportDataFile>() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListImportDataFilesRequest injectToken(
ListImportDataFilesRequest payload, String token) {
return ListImportDataFilesRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListImportDataFilesRequest injectPageSize(
ListImportDataFilesRequest payload, int pageSize) {
return ListImportDataFilesRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListImportDataFilesRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListImportDataFilesResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable extractResources(ListImportDataFilesResponse payload) {
return payload.getImportDataFilesList() == null
? ImmutableList.of()
: payload.getImportDataFilesList();
}
};
private static final PagedListDescriptor
LIST_GROUPS_PAGE_STR_DESC =
new PagedListDescriptor() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListGroupsRequest injectToken(ListGroupsRequest payload, String token) {
return ListGroupsRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListGroupsRequest injectPageSize(ListGroupsRequest payload, int pageSize) {
return ListGroupsRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListGroupsRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListGroupsResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable extractResources(ListGroupsResponse payload) {
return payload.getGroupsList() == null
? ImmutableList.of()
: payload.getGroupsList();
}
};
private static final PagedListDescriptor<
ListErrorFramesRequest, ListErrorFramesResponse, ErrorFrame>
LIST_ERROR_FRAMES_PAGE_STR_DESC =
new PagedListDescriptor() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListErrorFramesRequest injectToken(
ListErrorFramesRequest payload, String token) {
return ListErrorFramesRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListErrorFramesRequest injectPageSize(
ListErrorFramesRequest payload, int pageSize) {
return ListErrorFramesRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListErrorFramesRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListErrorFramesResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable extractResources(ListErrorFramesResponse payload) {
return payload.getErrorFramesList() == null
? ImmutableList.of()
: payload.getErrorFramesList();
}
};
private static final PagedListDescriptor
LIST_SOURCES_PAGE_STR_DESC =
new PagedListDescriptor() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListSourcesRequest injectToken(ListSourcesRequest payload, String token) {
return ListSourcesRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListSourcesRequest injectPageSize(ListSourcesRequest payload, int pageSize) {
return ListSourcesRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListSourcesRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListSourcesResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable