Please wait. This can take some minutes ...
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.
com.google.cloud.vmmigration.v1.stub.VmMigrationStubSettings Maven / Gradle / Ivy
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.cloud.vmmigration.v1.stub;
import static com.google.cloud.vmmigration.v1.VmMigrationClient.ListCloneJobsPagedResponse;
import static com.google.cloud.vmmigration.v1.VmMigrationClient.ListCutoverJobsPagedResponse;
import static com.google.cloud.vmmigration.v1.VmMigrationClient.ListDatacenterConnectorsPagedResponse;
import static com.google.cloud.vmmigration.v1.VmMigrationClient.ListGroupsPagedResponse;
import static com.google.cloud.vmmigration.v1.VmMigrationClient.ListLocationsPagedResponse;
import static com.google.cloud.vmmigration.v1.VmMigrationClient.ListMigratingVmsPagedResponse;
import static com.google.cloud.vmmigration.v1.VmMigrationClient.ListReplicationCyclesPagedResponse;
import static com.google.cloud.vmmigration.v1.VmMigrationClient.ListSourcesPagedResponse;
import static com.google.cloud.vmmigration.v1.VmMigrationClient.ListTargetProjectsPagedResponse;
import static com.google.cloud.vmmigration.v1.VmMigrationClient.ListUtilizationReportsPagedResponse;
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.vmmigration.v1.AddGroupMigrationRequest;
import com.google.cloud.vmmigration.v1.AddGroupMigrationResponse;
import com.google.cloud.vmmigration.v1.CancelCloneJobRequest;
import com.google.cloud.vmmigration.v1.CancelCloneJobResponse;
import com.google.cloud.vmmigration.v1.CancelCutoverJobRequest;
import com.google.cloud.vmmigration.v1.CancelCutoverJobResponse;
import com.google.cloud.vmmigration.v1.CloneJob;
import com.google.cloud.vmmigration.v1.CreateCloneJobRequest;
import com.google.cloud.vmmigration.v1.CreateCutoverJobRequest;
import com.google.cloud.vmmigration.v1.CreateDatacenterConnectorRequest;
import com.google.cloud.vmmigration.v1.CreateGroupRequest;
import com.google.cloud.vmmigration.v1.CreateMigratingVmRequest;
import com.google.cloud.vmmigration.v1.CreateSourceRequest;
import com.google.cloud.vmmigration.v1.CreateTargetProjectRequest;
import com.google.cloud.vmmigration.v1.CreateUtilizationReportRequest;
import com.google.cloud.vmmigration.v1.CutoverJob;
import com.google.cloud.vmmigration.v1.DatacenterConnector;
import com.google.cloud.vmmigration.v1.DeleteDatacenterConnectorRequest;
import com.google.cloud.vmmigration.v1.DeleteGroupRequest;
import com.google.cloud.vmmigration.v1.DeleteMigratingVmRequest;
import com.google.cloud.vmmigration.v1.DeleteSourceRequest;
import com.google.cloud.vmmigration.v1.DeleteTargetProjectRequest;
import com.google.cloud.vmmigration.v1.DeleteUtilizationReportRequest;
import com.google.cloud.vmmigration.v1.FetchInventoryRequest;
import com.google.cloud.vmmigration.v1.FetchInventoryResponse;
import com.google.cloud.vmmigration.v1.FinalizeMigrationRequest;
import com.google.cloud.vmmigration.v1.FinalizeMigrationResponse;
import com.google.cloud.vmmigration.v1.GetCloneJobRequest;
import com.google.cloud.vmmigration.v1.GetCutoverJobRequest;
import com.google.cloud.vmmigration.v1.GetDatacenterConnectorRequest;
import com.google.cloud.vmmigration.v1.GetGroupRequest;
import com.google.cloud.vmmigration.v1.GetMigratingVmRequest;
import com.google.cloud.vmmigration.v1.GetReplicationCycleRequest;
import com.google.cloud.vmmigration.v1.GetSourceRequest;
import com.google.cloud.vmmigration.v1.GetTargetProjectRequest;
import com.google.cloud.vmmigration.v1.GetUtilizationReportRequest;
import com.google.cloud.vmmigration.v1.Group;
import com.google.cloud.vmmigration.v1.ListCloneJobsRequest;
import com.google.cloud.vmmigration.v1.ListCloneJobsResponse;
import com.google.cloud.vmmigration.v1.ListCutoverJobsRequest;
import com.google.cloud.vmmigration.v1.ListCutoverJobsResponse;
import com.google.cloud.vmmigration.v1.ListDatacenterConnectorsRequest;
import com.google.cloud.vmmigration.v1.ListDatacenterConnectorsResponse;
import com.google.cloud.vmmigration.v1.ListGroupsRequest;
import com.google.cloud.vmmigration.v1.ListGroupsResponse;
import com.google.cloud.vmmigration.v1.ListMigratingVmsRequest;
import com.google.cloud.vmmigration.v1.ListMigratingVmsResponse;
import com.google.cloud.vmmigration.v1.ListReplicationCyclesRequest;
import com.google.cloud.vmmigration.v1.ListReplicationCyclesResponse;
import com.google.cloud.vmmigration.v1.ListSourcesRequest;
import com.google.cloud.vmmigration.v1.ListSourcesResponse;
import com.google.cloud.vmmigration.v1.ListTargetProjectsRequest;
import com.google.cloud.vmmigration.v1.ListTargetProjectsResponse;
import com.google.cloud.vmmigration.v1.ListUtilizationReportsRequest;
import com.google.cloud.vmmigration.v1.ListUtilizationReportsResponse;
import com.google.cloud.vmmigration.v1.MigratingVm;
import com.google.cloud.vmmigration.v1.OperationMetadata;
import com.google.cloud.vmmigration.v1.PauseMigrationRequest;
import com.google.cloud.vmmigration.v1.PauseMigrationResponse;
import com.google.cloud.vmmigration.v1.RemoveGroupMigrationRequest;
import com.google.cloud.vmmigration.v1.RemoveGroupMigrationResponse;
import com.google.cloud.vmmigration.v1.ReplicationCycle;
import com.google.cloud.vmmigration.v1.ResumeMigrationRequest;
import com.google.cloud.vmmigration.v1.ResumeMigrationResponse;
import com.google.cloud.vmmigration.v1.Source;
import com.google.cloud.vmmigration.v1.StartMigrationRequest;
import com.google.cloud.vmmigration.v1.StartMigrationResponse;
import com.google.cloud.vmmigration.v1.TargetProject;
import com.google.cloud.vmmigration.v1.UpdateGroupRequest;
import com.google.cloud.vmmigration.v1.UpdateMigratingVmRequest;
import com.google.cloud.vmmigration.v1.UpdateSourceRequest;
import com.google.cloud.vmmigration.v1.UpdateTargetProjectRequest;
import com.google.cloud.vmmigration.v1.UpgradeApplianceRequest;
import com.google.cloud.vmmigration.v1.UpgradeApplianceResponse;
import com.google.cloud.vmmigration.v1.UtilizationReport;
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 VmMigrationStub}.
*
* The default instance has everything set to sensible defaults:
*
*
* The default service address (vmmigration.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 getSource 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
* VmMigrationStubSettings.Builder vmMigrationSettingsBuilder =
* VmMigrationStubSettings.newBuilder();
* vmMigrationSettingsBuilder
* .getSourceSettings()
* .setRetrySettings(
* vmMigrationSettingsBuilder
* .getSourceSettings()
* .getRetrySettings()
* .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* VmMigrationStubSettings vmMigrationSettings = vmMigrationSettingsBuilder.build();
* }
*/
@Generated("by gapic-generator-java")
public class VmMigrationStubSettings 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
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 UnaryCallSettings
fetchInventorySettings;
private final PagedCallSettings<
ListUtilizationReportsRequest,
ListUtilizationReportsResponse,
ListUtilizationReportsPagedResponse>
listUtilizationReportsSettings;
private final UnaryCallSettings
getUtilizationReportSettings;
private final UnaryCallSettings
createUtilizationReportSettings;
private final OperationCallSettings<
CreateUtilizationReportRequest, UtilizationReport, OperationMetadata>
createUtilizationReportOperationSettings;
private final UnaryCallSettings
deleteUtilizationReportSettings;
private final OperationCallSettings
deleteUtilizationReportOperationSettings;
private final PagedCallSettings<
ListDatacenterConnectorsRequest,
ListDatacenterConnectorsResponse,
ListDatacenterConnectorsPagedResponse>
listDatacenterConnectorsSettings;
private final UnaryCallSettings
getDatacenterConnectorSettings;
private final UnaryCallSettings
createDatacenterConnectorSettings;
private final OperationCallSettings<
CreateDatacenterConnectorRequest, DatacenterConnector, OperationMetadata>
createDatacenterConnectorOperationSettings;
private final UnaryCallSettings
deleteDatacenterConnectorSettings;
private final OperationCallSettings
deleteDatacenterConnectorOperationSettings;
private final UnaryCallSettings upgradeApplianceSettings;
private final OperationCallSettings<
UpgradeApplianceRequest, UpgradeApplianceResponse, OperationMetadata>
upgradeApplianceOperationSettings;
private final UnaryCallSettings createMigratingVmSettings;
private final OperationCallSettings
createMigratingVmOperationSettings;
private final PagedCallSettings<
ListMigratingVmsRequest, ListMigratingVmsResponse, ListMigratingVmsPagedResponse>
listMigratingVmsSettings;
private final UnaryCallSettings getMigratingVmSettings;
private final UnaryCallSettings updateMigratingVmSettings;
private final OperationCallSettings
updateMigratingVmOperationSettings;
private final UnaryCallSettings deleteMigratingVmSettings;
private final OperationCallSettings
deleteMigratingVmOperationSettings;
private final UnaryCallSettings startMigrationSettings;
private final OperationCallSettings<
StartMigrationRequest, StartMigrationResponse, OperationMetadata>
startMigrationOperationSettings;
private final UnaryCallSettings resumeMigrationSettings;
private final OperationCallSettings<
ResumeMigrationRequest, ResumeMigrationResponse, OperationMetadata>
resumeMigrationOperationSettings;
private final UnaryCallSettings pauseMigrationSettings;
private final OperationCallSettings<
PauseMigrationRequest, PauseMigrationResponse, OperationMetadata>
pauseMigrationOperationSettings;
private final UnaryCallSettings finalizeMigrationSettings;
private final OperationCallSettings<
FinalizeMigrationRequest, FinalizeMigrationResponse, OperationMetadata>
finalizeMigrationOperationSettings;
private final UnaryCallSettings createCloneJobSettings;
private final OperationCallSettings
createCloneJobOperationSettings;
private final UnaryCallSettings cancelCloneJobSettings;
private final OperationCallSettings<
CancelCloneJobRequest, CancelCloneJobResponse, OperationMetadata>
cancelCloneJobOperationSettings;
private final PagedCallSettings<
ListCloneJobsRequest, ListCloneJobsResponse, ListCloneJobsPagedResponse>
listCloneJobsSettings;
private final UnaryCallSettings getCloneJobSettings;
private final UnaryCallSettings createCutoverJobSettings;
private final OperationCallSettings
createCutoverJobOperationSettings;
private final UnaryCallSettings cancelCutoverJobSettings;
private final OperationCallSettings<
CancelCutoverJobRequest, CancelCutoverJobResponse, OperationMetadata>
cancelCutoverJobOperationSettings;
private final PagedCallSettings<
ListCutoverJobsRequest, ListCutoverJobsResponse, ListCutoverJobsPagedResponse>
listCutoverJobsSettings;
private final UnaryCallSettings getCutoverJobSettings;
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 addGroupMigrationSettings;
private final OperationCallSettings<
AddGroupMigrationRequest, AddGroupMigrationResponse, OperationMetadata>
addGroupMigrationOperationSettings;
private final UnaryCallSettings
removeGroupMigrationSettings;
private final OperationCallSettings<
RemoveGroupMigrationRequest, RemoveGroupMigrationResponse, OperationMetadata>
removeGroupMigrationOperationSettings;
private final PagedCallSettings<
ListTargetProjectsRequest, ListTargetProjectsResponse, ListTargetProjectsPagedResponse>
listTargetProjectsSettings;
private final UnaryCallSettings getTargetProjectSettings;
private final UnaryCallSettings
createTargetProjectSettings;
private final OperationCallSettings
createTargetProjectOperationSettings;
private final UnaryCallSettings
updateTargetProjectSettings;
private final OperationCallSettings
updateTargetProjectOperationSettings;
private final UnaryCallSettings
deleteTargetProjectSettings;
private final OperationCallSettings
deleteTargetProjectOperationSettings;
private final PagedCallSettings<
ListReplicationCyclesRequest,
ListReplicationCyclesResponse,
ListReplicationCyclesPagedResponse>
listReplicationCyclesSettings;
private final UnaryCallSettings
getReplicationCycleSettings;
private final PagedCallSettings<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings;
private final UnaryCallSettings getLocationSettings;
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 extractResources(ListSourcesResponse payload) {
return payload.getSourcesList() == null
? ImmutableList.of()
: payload.getSourcesList();
}
};
private static final PagedListDescriptor<
ListUtilizationReportsRequest, ListUtilizationReportsResponse, UtilizationReport>
LIST_UTILIZATION_REPORTS_PAGE_STR_DESC =
new PagedListDescriptor<
ListUtilizationReportsRequest, ListUtilizationReportsResponse, UtilizationReport>() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListUtilizationReportsRequest injectToken(
ListUtilizationReportsRequest payload, String token) {
return ListUtilizationReportsRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListUtilizationReportsRequest injectPageSize(
ListUtilizationReportsRequest payload, int pageSize) {
return ListUtilizationReportsRequest.newBuilder(payload)
.setPageSize(pageSize)
.build();
}
@Override
public Integer extractPageSize(ListUtilizationReportsRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListUtilizationReportsResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable extractResources(
ListUtilizationReportsResponse payload) {
return payload.getUtilizationReportsList() == null
? ImmutableList.of()
: payload.getUtilizationReportsList();
}
};
private static final PagedListDescriptor<
ListDatacenterConnectorsRequest, ListDatacenterConnectorsResponse, DatacenterConnector>
LIST_DATACENTER_CONNECTORS_PAGE_STR_DESC =
new PagedListDescriptor<
ListDatacenterConnectorsRequest,
ListDatacenterConnectorsResponse,
DatacenterConnector>() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListDatacenterConnectorsRequest injectToken(
ListDatacenterConnectorsRequest payload, String token) {
return ListDatacenterConnectorsRequest.newBuilder(payload)
.setPageToken(token)
.build();
}
@Override
public ListDatacenterConnectorsRequest injectPageSize(
ListDatacenterConnectorsRequest payload, int pageSize) {
return ListDatacenterConnectorsRequest.newBuilder(payload)
.setPageSize(pageSize)
.build();
}
@Override
public Integer extractPageSize(ListDatacenterConnectorsRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListDatacenterConnectorsResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable extractResources(
ListDatacenterConnectorsResponse payload) {
return payload.getDatacenterConnectorsList() == null
? ImmutableList.of()
: payload.getDatacenterConnectorsList();
}
};
private static final PagedListDescriptor<
ListMigratingVmsRequest, ListMigratingVmsResponse, MigratingVm>
LIST_MIGRATING_VMS_PAGE_STR_DESC =
new PagedListDescriptor<
ListMigratingVmsRequest, ListMigratingVmsResponse, MigratingVm>() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListMigratingVmsRequest injectToken(
ListMigratingVmsRequest payload, String token) {
return ListMigratingVmsRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListMigratingVmsRequest injectPageSize(
ListMigratingVmsRequest payload, int pageSize) {
return ListMigratingVmsRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListMigratingVmsRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListMigratingVmsResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable extractResources(ListMigratingVmsResponse payload) {
return payload.getMigratingVmsList() == null
? ImmutableList.of()
: payload.getMigratingVmsList();
}
};
private static final PagedListDescriptor
LIST_CLONE_JOBS_PAGE_STR_DESC =
new PagedListDescriptor() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListCloneJobsRequest injectToken(ListCloneJobsRequest payload, String token) {
return ListCloneJobsRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListCloneJobsRequest injectPageSize(ListCloneJobsRequest payload, int pageSize) {
return ListCloneJobsRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListCloneJobsRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListCloneJobsResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable extractResources(ListCloneJobsResponse payload) {
return payload.getCloneJobsList() == null
? ImmutableList.of()
: payload.getCloneJobsList();
}
};
private static final PagedListDescriptor<
ListCutoverJobsRequest, ListCutoverJobsResponse, CutoverJob>
LIST_CUTOVER_JOBS_PAGE_STR_DESC =
new PagedListDescriptor() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListCutoverJobsRequest injectToken(
ListCutoverJobsRequest payload, String token) {
return ListCutoverJobsRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListCutoverJobsRequest injectPageSize(
ListCutoverJobsRequest payload, int pageSize) {
return ListCutoverJobsRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListCutoverJobsRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListCutoverJobsResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable extractResources(ListCutoverJobsResponse payload) {
return payload.getCutoverJobsList() == null
? ImmutableList.of()
: payload.getCutoverJobsList();
}
};
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<
ListTargetProjectsRequest, ListTargetProjectsResponse, TargetProject>
LIST_TARGET_PROJECTS_PAGE_STR_DESC =
new PagedListDescriptor<
ListTargetProjectsRequest, ListTargetProjectsResponse, TargetProject>() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListTargetProjectsRequest injectToken(
ListTargetProjectsRequest payload, String token) {
return ListTargetProjectsRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListTargetProjectsRequest injectPageSize(
ListTargetProjectsRequest payload, int pageSize) {
return ListTargetProjectsRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListTargetProjectsRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListTargetProjectsResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable extractResources(ListTargetProjectsResponse payload) {
return payload.getTargetProjectsList() == null
? ImmutableList.of()
: payload.getTargetProjectsList();
}
};
private static final PagedListDescriptor<
ListReplicationCyclesRequest, ListReplicationCyclesResponse, ReplicationCycle>
LIST_REPLICATION_CYCLES_PAGE_STR_DESC =
new PagedListDescriptor<
ListReplicationCyclesRequest, ListReplicationCyclesResponse, ReplicationCycle>() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListReplicationCyclesRequest injectToken(
ListReplicationCyclesRequest payload, String token) {
return ListReplicationCyclesRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListReplicationCyclesRequest injectPageSize(
ListReplicationCyclesRequest payload, int pageSize) {
return ListReplicationCyclesRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListReplicationCyclesRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListReplicationCyclesResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable extractResources(
ListReplicationCyclesResponse payload) {
return payload.getReplicationCyclesList() == null
? ImmutableList.of()
: payload.getReplicationCyclesList();
}
};
private static final PagedListDescriptor
LIST_LOCATIONS_PAGE_STR_DESC =
new PagedListDescriptor() {
@Override
public String emptyToken() {
return "";
}
@Override
public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) {
return ListLocationsRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) {
return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
public Integer extractPageSize(ListLocationsRequest payload) {
return payload.getPageSize();
}
@Override
public String extractNextToken(ListLocationsResponse payload) {
return payload.getNextPageToken();
}
@Override
public Iterable extractResources(ListLocationsResponse payload) {
return payload.getLocationsList() == null
? ImmutableList.of()
: payload.getLocationsList();
}
};
private static final PagedListResponseFactory<
ListSourcesRequest, ListSourcesResponse, ListSourcesPagedResponse>
LIST_SOURCES_PAGE_STR_FACT =
new PagedListResponseFactory<
ListSourcesRequest, ListSourcesResponse, ListSourcesPagedResponse>() {
@Override
public ApiFuture getFuturePagedResponse(
UnaryCallable callable,
ListSourcesRequest request,
ApiCallContext context,
ApiFuture futureResponse) {
PageContext pageContext =
PageContext.create(callable, LIST_SOURCES_PAGE_STR_DESC, request, context);
return ListSourcesPagedResponse.createAsync(pageContext, futureResponse);
}
};
private static final PagedListResponseFactory<
ListUtilizationReportsRequest,
ListUtilizationReportsResponse,
ListUtilizationReportsPagedResponse>
LIST_UTILIZATION_REPORTS_PAGE_STR_FACT =
new PagedListResponseFactory<
ListUtilizationReportsRequest,
ListUtilizationReportsResponse,
ListUtilizationReportsPagedResponse>() {
@Override
public ApiFuture getFuturePagedResponse(
UnaryCallable
callable,
ListUtilizationReportsRequest request,
ApiCallContext context,
ApiFuture futureResponse) {
PageContext<
ListUtilizationReportsRequest,
ListUtilizationReportsResponse,
UtilizationReport>
pageContext =
PageContext.create(
callable, LIST_UTILIZATION_REPORTS_PAGE_STR_DESC, request, context);
return ListUtilizationReportsPagedResponse.createAsync(pageContext, futureResponse);
}
};
private static final PagedListResponseFactory<
ListDatacenterConnectorsRequest,
ListDatacenterConnectorsResponse,
ListDatacenterConnectorsPagedResponse>
LIST_DATACENTER_CONNECTORS_PAGE_STR_FACT =
new PagedListResponseFactory<
ListDatacenterConnectorsRequest,
ListDatacenterConnectorsResponse,
ListDatacenterConnectorsPagedResponse>() {
@Override
public ApiFuture getFuturePagedResponse(
UnaryCallable
callable,
ListDatacenterConnectorsRequest request,
ApiCallContext context,
ApiFuture futureResponse) {
PageContext<
ListDatacenterConnectorsRequest,
ListDatacenterConnectorsResponse,
DatacenterConnector>
pageContext =
PageContext.create(
callable, LIST_DATACENTER_CONNECTORS_PAGE_STR_DESC, request, context);
return ListDatacenterConnectorsPagedResponse.createAsync(pageContext, futureResponse);
}
};
private static final PagedListResponseFactory<
ListMigratingVmsRequest, ListMigratingVmsResponse, ListMigratingVmsPagedResponse>
LIST_MIGRATING_VMS_PAGE_STR_FACT =
new PagedListResponseFactory<
ListMigratingVmsRequest, ListMigratingVmsResponse, ListMigratingVmsPagedResponse>() {
@Override
public ApiFuture getFuturePagedResponse(
UnaryCallable callable,
ListMigratingVmsRequest request,
ApiCallContext context,
ApiFuture futureResponse) {
PageContext
pageContext =
PageContext.create(
callable, LIST_MIGRATING_VMS_PAGE_STR_DESC, request, context);
return ListMigratingVmsPagedResponse.createAsync(pageContext, futureResponse);
}
};
private static final PagedListResponseFactory<
ListCloneJobsRequest, ListCloneJobsResponse, ListCloneJobsPagedResponse>
LIST_CLONE_JOBS_PAGE_STR_FACT =
new PagedListResponseFactory<
ListCloneJobsRequest, ListCloneJobsResponse, ListCloneJobsPagedResponse>() {
@Override
public ApiFuture getFuturePagedResponse(
UnaryCallable callable,
ListCloneJobsRequest request,
ApiCallContext context,
ApiFuture futureResponse) {
PageContext pageContext =
PageContext.create(callable, LIST_CLONE_JOBS_PAGE_STR_DESC, request, context);
return ListCloneJobsPagedResponse.createAsync(pageContext, futureResponse);
}
};
private static final PagedListResponseFactory<
ListCutoverJobsRequest, ListCutoverJobsResponse, ListCutoverJobsPagedResponse>
LIST_CUTOVER_JOBS_PAGE_STR_FACT =
new PagedListResponseFactory<
ListCutoverJobsRequest, ListCutoverJobsResponse, ListCutoverJobsPagedResponse>() {
@Override
public ApiFuture getFuturePagedResponse(
UnaryCallable callable,
ListCutoverJobsRequest request,
ApiCallContext context,
ApiFuture futureResponse) {
PageContext pageContext =
PageContext.create(callable, LIST_CUTOVER_JOBS_PAGE_STR_DESC, request, context);
return ListCutoverJobsPagedResponse.createAsync(pageContext, futureResponse);
}
};
private static final PagedListResponseFactory<
ListGroupsRequest, ListGroupsResponse, ListGroupsPagedResponse>
LIST_GROUPS_PAGE_STR_FACT =
new PagedListResponseFactory<
ListGroupsRequest, ListGroupsResponse, ListGroupsPagedResponse>() {
@Override
public ApiFuture getFuturePagedResponse(
UnaryCallable callable,
ListGroupsRequest request,
ApiCallContext context,
ApiFuture futureResponse) {
PageContext pageContext =
PageContext.create(callable, LIST_GROUPS_PAGE_STR_DESC, request, context);
return ListGroupsPagedResponse.createAsync(pageContext, futureResponse);
}
};
private static final PagedListResponseFactory<
ListTargetProjectsRequest, ListTargetProjectsResponse, ListTargetProjectsPagedResponse>
LIST_TARGET_PROJECTS_PAGE_STR_FACT =
new PagedListResponseFactory<
ListTargetProjectsRequest,
ListTargetProjectsResponse,
ListTargetProjectsPagedResponse>() {
@Override
public ApiFuture getFuturePagedResponse(
UnaryCallable callable,
ListTargetProjectsRequest request,
ApiCallContext context,
ApiFuture futureResponse) {
PageContext
pageContext =
PageContext.create(
callable, LIST_TARGET_PROJECTS_PAGE_STR_DESC, request, context);
return ListTargetProjectsPagedResponse.createAsync(pageContext, futureResponse);
}
};
private static final PagedListResponseFactory<
ListReplicationCyclesRequest,
ListReplicationCyclesResponse,
ListReplicationCyclesPagedResponse>
LIST_REPLICATION_CYCLES_PAGE_STR_FACT =
new PagedListResponseFactory<
ListReplicationCyclesRequest,
ListReplicationCyclesResponse,
ListReplicationCyclesPagedResponse>() {
@Override
public ApiFuture getFuturePagedResponse(
UnaryCallable callable,
ListReplicationCyclesRequest request,
ApiCallContext context,
ApiFuture futureResponse) {
PageContext<
ListReplicationCyclesRequest, ListReplicationCyclesResponse, ReplicationCycle>
pageContext =
PageContext.create(
callable, LIST_REPLICATION_CYCLES_PAGE_STR_DESC, request, context);
return ListReplicationCyclesPagedResponse.createAsync(pageContext, futureResponse);
}
};
private static final PagedListResponseFactory<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
LIST_LOCATIONS_PAGE_STR_FACT =
new PagedListResponseFactory<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() {
@Override
public ApiFuture getFuturePagedResponse(
UnaryCallable callable,
ListLocationsRequest request,
ApiCallContext context,
ApiFuture futureResponse) {
PageContext pageContext =
PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context);
return ListLocationsPagedResponse.createAsync(pageContext, futureResponse);
}
};
/** Returns the object with the settings used for calls to listSources. */
public PagedCallSettings
listSourcesSettings() {
return listSourcesSettings;
}
/** Returns the object with the settings used for calls to getSource. */
public UnaryCallSettings getSourceSettings() {
return getSourceSettings;
}
/** Returns the object with the settings used for calls to createSource. */
public UnaryCallSettings createSourceSettings() {
return createSourceSettings;
}
/** Returns the object with the settings used for calls to createSource. */
public OperationCallSettings
createSourceOperationSettings() {
return createSourceOperationSettings;
}
/** Returns the object with the settings used for calls to updateSource. */
public UnaryCallSettings updateSourceSettings() {
return updateSourceSettings;
}
/** Returns the object with the settings used for calls to updateSource. */
public OperationCallSettings
updateSourceOperationSettings() {
return updateSourceOperationSettings;
}
/** Returns the object with the settings used for calls to deleteSource. */
public UnaryCallSettings deleteSourceSettings() {
return deleteSourceSettings;
}
/** Returns the object with the settings used for calls to deleteSource. */
public OperationCallSettings
deleteSourceOperationSettings() {
return deleteSourceOperationSettings;
}
/** Returns the object with the settings used for calls to fetchInventory. */
public UnaryCallSettings fetchInventorySettings() {
return fetchInventorySettings;
}
/** Returns the object with the settings used for calls to listUtilizationReports. */
public PagedCallSettings<
ListUtilizationReportsRequest,
ListUtilizationReportsResponse,
ListUtilizationReportsPagedResponse>
listUtilizationReportsSettings() {
return listUtilizationReportsSettings;
}
/** Returns the object with the settings used for calls to getUtilizationReport. */
public UnaryCallSettings
getUtilizationReportSettings() {
return getUtilizationReportSettings;
}
/** Returns the object with the settings used for calls to createUtilizationReport. */
public UnaryCallSettings
createUtilizationReportSettings() {
return createUtilizationReportSettings;
}
/** Returns the object with the settings used for calls to createUtilizationReport. */
public OperationCallSettings
createUtilizationReportOperationSettings() {
return createUtilizationReportOperationSettings;
}
/** Returns the object with the settings used for calls to deleteUtilizationReport. */
public UnaryCallSettings
deleteUtilizationReportSettings() {
return deleteUtilizationReportSettings;
}
/** Returns the object with the settings used for calls to deleteUtilizationReport. */
public OperationCallSettings
deleteUtilizationReportOperationSettings() {
return deleteUtilizationReportOperationSettings;
}
/** Returns the object with the settings used for calls to listDatacenterConnectors. */
public PagedCallSettings<
ListDatacenterConnectorsRequest,
ListDatacenterConnectorsResponse,
ListDatacenterConnectorsPagedResponse>
listDatacenterConnectorsSettings() {
return listDatacenterConnectorsSettings;
}
/** Returns the object with the settings used for calls to getDatacenterConnector. */
public UnaryCallSettings
getDatacenterConnectorSettings() {
return getDatacenterConnectorSettings;
}
/** Returns the object with the settings used for calls to createDatacenterConnector. */
public UnaryCallSettings
createDatacenterConnectorSettings() {
return createDatacenterConnectorSettings;
}
/** Returns the object with the settings used for calls to createDatacenterConnector. */
public OperationCallSettings<
CreateDatacenterConnectorRequest, DatacenterConnector, OperationMetadata>
createDatacenterConnectorOperationSettings() {
return createDatacenterConnectorOperationSettings;
}
/** Returns the object with the settings used for calls to deleteDatacenterConnector. */
public UnaryCallSettings
deleteDatacenterConnectorSettings() {
return deleteDatacenterConnectorSettings;
}
/** Returns the object with the settings used for calls to deleteDatacenterConnector. */
public OperationCallSettings
deleteDatacenterConnectorOperationSettings() {
return deleteDatacenterConnectorOperationSettings;
}
/** Returns the object with the settings used for calls to upgradeAppliance. */
public UnaryCallSettings upgradeApplianceSettings() {
return upgradeApplianceSettings;
}
/** Returns the object with the settings used for calls to upgradeAppliance. */
public OperationCallSettings
upgradeApplianceOperationSettings() {
return upgradeApplianceOperationSettings;
}
/** Returns the object with the settings used for calls to createMigratingVm. */
public UnaryCallSettings createMigratingVmSettings() {
return createMigratingVmSettings;
}
/** Returns the object with the settings used for calls to createMigratingVm. */
public OperationCallSettings
createMigratingVmOperationSettings() {
return createMigratingVmOperationSettings;
}
/** Returns the object with the settings used for calls to listMigratingVms. */
public PagedCallSettings<
ListMigratingVmsRequest, ListMigratingVmsResponse, ListMigratingVmsPagedResponse>
listMigratingVmsSettings() {
return listMigratingVmsSettings;
}
/** Returns the object with the settings used for calls to getMigratingVm. */
public UnaryCallSettings getMigratingVmSettings() {
return getMigratingVmSettings;
}
/** Returns the object with the settings used for calls to updateMigratingVm. */
public UnaryCallSettings updateMigratingVmSettings() {
return updateMigratingVmSettings;
}
/** Returns the object with the settings used for calls to updateMigratingVm. */
public OperationCallSettings
updateMigratingVmOperationSettings() {
return updateMigratingVmOperationSettings;
}
/** Returns the object with the settings used for calls to deleteMigratingVm. */
public UnaryCallSettings deleteMigratingVmSettings() {
return deleteMigratingVmSettings;
}
/** Returns the object with the settings used for calls to deleteMigratingVm. */
public OperationCallSettings
deleteMigratingVmOperationSettings() {
return deleteMigratingVmOperationSettings;
}
/** Returns the object with the settings used for calls to startMigration. */
public UnaryCallSettings startMigrationSettings() {
return startMigrationSettings;
}
/** Returns the object with the settings used for calls to startMigration. */
public OperationCallSettings
startMigrationOperationSettings() {
return startMigrationOperationSettings;
}
/** Returns the object with the settings used for calls to resumeMigration. */
public UnaryCallSettings resumeMigrationSettings() {
return resumeMigrationSettings;
}
/** Returns the object with the settings used for calls to resumeMigration. */
public OperationCallSettings
resumeMigrationOperationSettings() {
return resumeMigrationOperationSettings;
}
/** Returns the object with the settings used for calls to pauseMigration. */
public UnaryCallSettings pauseMigrationSettings() {
return pauseMigrationSettings;
}
/** Returns the object with the settings used for calls to pauseMigration. */
public OperationCallSettings
pauseMigrationOperationSettings() {
return pauseMigrationOperationSettings;
}
/** Returns the object with the settings used for calls to finalizeMigration. */
public UnaryCallSettings finalizeMigrationSettings() {
return finalizeMigrationSettings;
}
/** Returns the object with the settings used for calls to finalizeMigration. */
public OperationCallSettings<
FinalizeMigrationRequest, FinalizeMigrationResponse, OperationMetadata>
finalizeMigrationOperationSettings() {
return finalizeMigrationOperationSettings;
}
/** Returns the object with the settings used for calls to createCloneJob. */
public UnaryCallSettings createCloneJobSettings() {
return createCloneJobSettings;
}
/** Returns the object with the settings used for calls to createCloneJob. */
public OperationCallSettings
createCloneJobOperationSettings() {
return createCloneJobOperationSettings;
}
/** Returns the object with the settings used for calls to cancelCloneJob. */
public UnaryCallSettings cancelCloneJobSettings() {
return cancelCloneJobSettings;
}
/** Returns the object with the settings used for calls to cancelCloneJob. */
public OperationCallSettings
cancelCloneJobOperationSettings() {
return cancelCloneJobOperationSettings;
}
/** Returns the object with the settings used for calls to listCloneJobs. */
public PagedCallSettings
listCloneJobsSettings() {
return listCloneJobsSettings;
}
/** Returns the object with the settings used for calls to getCloneJob. */
public UnaryCallSettings getCloneJobSettings() {
return getCloneJobSettings;
}
/** Returns the object with the settings used for calls to createCutoverJob. */
public UnaryCallSettings createCutoverJobSettings() {
return createCutoverJobSettings;
}
/** Returns the object with the settings used for calls to createCutoverJob. */
public OperationCallSettings
createCutoverJobOperationSettings() {
return createCutoverJobOperationSettings;
}
/** Returns the object with the settings used for calls to cancelCutoverJob. */
public UnaryCallSettings cancelCutoverJobSettings() {
return cancelCutoverJobSettings;
}
/** Returns the object with the settings used for calls to cancelCutoverJob. */
public OperationCallSettings
cancelCutoverJobOperationSettings() {
return cancelCutoverJobOperationSettings;
}
/** Returns the object with the settings used for calls to listCutoverJobs. */
public PagedCallSettings<
ListCutoverJobsRequest, ListCutoverJobsResponse, ListCutoverJobsPagedResponse>
listCutoverJobsSettings() {
return listCutoverJobsSettings;
}
/** Returns the object with the settings used for calls to getCutoverJob. */
public UnaryCallSettings getCutoverJobSettings() {
return getCutoverJobSettings;
}
/** Returns the object with the settings used for calls to listGroups. */
public PagedCallSettings
listGroupsSettings() {
return listGroupsSettings;
}
/** Returns the object with the settings used for calls to getGroup. */
public UnaryCallSettings getGroupSettings() {
return getGroupSettings;
}
/** Returns the object with the settings used for calls to createGroup. */
public UnaryCallSettings createGroupSettings() {
return createGroupSettings;
}
/** Returns the object with the settings used for calls to createGroup. */
public OperationCallSettings
createGroupOperationSettings() {
return createGroupOperationSettings;
}
/** Returns the object with the settings used for calls to updateGroup. */
public UnaryCallSettings updateGroupSettings() {
return updateGroupSettings;
}
/** Returns the object with the settings used for calls to updateGroup. */
public OperationCallSettings
updateGroupOperationSettings() {
return updateGroupOperationSettings;
}
/** Returns the object with the settings used for calls to deleteGroup. */
public UnaryCallSettings deleteGroupSettings() {
return deleteGroupSettings;
}
/** Returns the object with the settings used for calls to deleteGroup. */
public OperationCallSettings
deleteGroupOperationSettings() {
return deleteGroupOperationSettings;
}
/** Returns the object with the settings used for calls to addGroupMigration. */
public UnaryCallSettings addGroupMigrationSettings() {
return addGroupMigrationSettings;
}
/** Returns the object with the settings used for calls to addGroupMigration. */
public OperationCallSettings<
AddGroupMigrationRequest, AddGroupMigrationResponse, OperationMetadata>
addGroupMigrationOperationSettings() {
return addGroupMigrationOperationSettings;
}
/** Returns the object with the settings used for calls to removeGroupMigration. */
public UnaryCallSettings removeGroupMigrationSettings() {
return removeGroupMigrationSettings;
}
/** Returns the object with the settings used for calls to removeGroupMigration. */
public OperationCallSettings<
RemoveGroupMigrationRequest, RemoveGroupMigrationResponse, OperationMetadata>
removeGroupMigrationOperationSettings() {
return removeGroupMigrationOperationSettings;
}
/** Returns the object with the settings used for calls to listTargetProjects. */
public PagedCallSettings<
ListTargetProjectsRequest, ListTargetProjectsResponse, ListTargetProjectsPagedResponse>
listTargetProjectsSettings() {
return listTargetProjectsSettings;
}
/** Returns the object with the settings used for calls to getTargetProject. */
public UnaryCallSettings getTargetProjectSettings() {
return getTargetProjectSettings;
}
/** Returns the object with the settings used for calls to createTargetProject. */
public UnaryCallSettings createTargetProjectSettings() {
return createTargetProjectSettings;
}
/** Returns the object with the settings used for calls to createTargetProject. */
public OperationCallSettings
createTargetProjectOperationSettings() {
return createTargetProjectOperationSettings;
}
/** Returns the object with the settings used for calls to updateTargetProject. */
public UnaryCallSettings updateTargetProjectSettings() {
return updateTargetProjectSettings;
}
/** Returns the object with the settings used for calls to updateTargetProject. */
public OperationCallSettings
updateTargetProjectOperationSettings() {
return updateTargetProjectOperationSettings;
}
/** Returns the object with the settings used for calls to deleteTargetProject. */
public UnaryCallSettings deleteTargetProjectSettings() {
return deleteTargetProjectSettings;
}
/** Returns the object with the settings used for calls to deleteTargetProject. */
public OperationCallSettings
deleteTargetProjectOperationSettings() {
return deleteTargetProjectOperationSettings;
}
/** Returns the object with the settings used for calls to listReplicationCycles. */
public PagedCallSettings<
ListReplicationCyclesRequest,
ListReplicationCyclesResponse,
ListReplicationCyclesPagedResponse>
listReplicationCyclesSettings() {
return listReplicationCyclesSettings;
}
/** Returns the object with the settings used for calls to getReplicationCycle. */
public UnaryCallSettings
getReplicationCycleSettings() {
return getReplicationCycleSettings;
}
/** Returns the object with the settings used for calls to listLocations. */
public PagedCallSettings
listLocationsSettings() {
return listLocationsSettings;
}
/** Returns the object with the settings used for calls to getLocation. */
public UnaryCallSettings getLocationSettings() {
return getLocationSettings;
}
public VmMigrationStub createStub() throws IOException {
if (getTransportChannelProvider()
.getTransportName()
.equals(GrpcTransportChannel.getGrpcTransportName())) {
return GrpcVmMigrationStub.create(this);
}
if (getTransportChannelProvider()
.getTransportName()
.equals(HttpJsonTransportChannel.getHttpJsonTransportName())) {
return HttpJsonVmMigrationStub.create(this);
}
throw new UnsupportedOperationException(
String.format(
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
}
/** Returns the default service name. */
@Override
public String getServiceName() {
return "vmmigration";
}
/** Returns a builder for the default ExecutorProvider for this service. */
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
return InstantiatingExecutorProvider.newBuilder();
}
/** Returns the default service endpoint. */
public static String getDefaultEndpoint() {
return "vmmigration.googleapis.com:443";
}
/** Returns the default mTLS service endpoint. */
public static String getDefaultMtlsEndpoint() {
return "vmmigration.mtls.googleapis.com:443";
}
/** Returns the default service scopes. */
public static List getDefaultServiceScopes() {
return DEFAULT_SERVICE_SCOPES;
}
/** Returns a builder for the default credentials for this service. */
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
return GoogleCredentialsProvider.newBuilder()
.setScopesToApply(DEFAULT_SERVICE_SCOPES)
.setUseJwtAccessWithScope(true);
}
/** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return InstantiatingGrpcChannelProvider.newBuilder()
.setMaxInboundMessageSize(Integer.MAX_VALUE);
}
/** Returns a builder for the default REST ChannelProvider for this service. */
@BetaApi
public static InstantiatingHttpJsonChannelProvider.Builder
defaultHttpJsonTransportProviderBuilder() {
return InstantiatingHttpJsonChannelProvider.newBuilder();
}
public static TransportChannelProvider defaultTransportChannelProvider() {
return defaultGrpcTransportProviderBuilder().build();
}
public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
"gapic", GaxProperties.getLibraryVersion(VmMigrationStubSettings.class))
.setTransportToken(
GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
}
public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
"gapic", GaxProperties.getLibraryVersion(VmMigrationStubSettings.class))
.setTransportToken(
GaxHttpJsonProperties.getHttpJsonTokenName(),
GaxHttpJsonProperties.getHttpJsonVersion());
}
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
return VmMigrationStubSettings.defaultGrpcApiClientHeaderProviderBuilder();
}
/** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
/** Returns a new REST builder for this class. */
public static Builder newHttpJsonBuilder() {
return Builder.createHttpJsonDefault();
}
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
}
/** Returns a builder containing all the values of this settings class. */
public Builder toBuilder() {
return new Builder(this);
}
protected VmMigrationStubSettings(Builder settingsBuilder) throws IOException {
super(settingsBuilder);
listSourcesSettings = settingsBuilder.listSourcesSettings().build();
getSourceSettings = settingsBuilder.getSourceSettings().build();
createSourceSettings = settingsBuilder.createSourceSettings().build();
createSourceOperationSettings = settingsBuilder.createSourceOperationSettings().build();
updateSourceSettings = settingsBuilder.updateSourceSettings().build();
updateSourceOperationSettings = settingsBuilder.updateSourceOperationSettings().build();
deleteSourceSettings = settingsBuilder.deleteSourceSettings().build();
deleteSourceOperationSettings = settingsBuilder.deleteSourceOperationSettings().build();
fetchInventorySettings = settingsBuilder.fetchInventorySettings().build();
listUtilizationReportsSettings = settingsBuilder.listUtilizationReportsSettings().build();
getUtilizationReportSettings = settingsBuilder.getUtilizationReportSettings().build();
createUtilizationReportSettings = settingsBuilder.createUtilizationReportSettings().build();
createUtilizationReportOperationSettings =
settingsBuilder.createUtilizationReportOperationSettings().build();
deleteUtilizationReportSettings = settingsBuilder.deleteUtilizationReportSettings().build();
deleteUtilizationReportOperationSettings =
settingsBuilder.deleteUtilizationReportOperationSettings().build();
listDatacenterConnectorsSettings = settingsBuilder.listDatacenterConnectorsSettings().build();
getDatacenterConnectorSettings = settingsBuilder.getDatacenterConnectorSettings().build();
createDatacenterConnectorSettings = settingsBuilder.createDatacenterConnectorSettings().build();
createDatacenterConnectorOperationSettings =
settingsBuilder.createDatacenterConnectorOperationSettings().build();
deleteDatacenterConnectorSettings = settingsBuilder.deleteDatacenterConnectorSettings().build();
deleteDatacenterConnectorOperationSettings =
settingsBuilder.deleteDatacenterConnectorOperationSettings().build();
upgradeApplianceSettings = settingsBuilder.upgradeApplianceSettings().build();
upgradeApplianceOperationSettings = settingsBuilder.upgradeApplianceOperationSettings().build();
createMigratingVmSettings = settingsBuilder.createMigratingVmSettings().build();
createMigratingVmOperationSettings =
settingsBuilder.createMigratingVmOperationSettings().build();
listMigratingVmsSettings = settingsBuilder.listMigratingVmsSettings().build();
getMigratingVmSettings = settingsBuilder.getMigratingVmSettings().build();
updateMigratingVmSettings = settingsBuilder.updateMigratingVmSettings().build();
updateMigratingVmOperationSettings =
settingsBuilder.updateMigratingVmOperationSettings().build();
deleteMigratingVmSettings = settingsBuilder.deleteMigratingVmSettings().build();
deleteMigratingVmOperationSettings =
settingsBuilder.deleteMigratingVmOperationSettings().build();
startMigrationSettings = settingsBuilder.startMigrationSettings().build();
startMigrationOperationSettings = settingsBuilder.startMigrationOperationSettings().build();
resumeMigrationSettings = settingsBuilder.resumeMigrationSettings().build();
resumeMigrationOperationSettings = settingsBuilder.resumeMigrationOperationSettings().build();
pauseMigrationSettings = settingsBuilder.pauseMigrationSettings().build();
pauseMigrationOperationSettings = settingsBuilder.pauseMigrationOperationSettings().build();
finalizeMigrationSettings = settingsBuilder.finalizeMigrationSettings().build();
finalizeMigrationOperationSettings =
settingsBuilder.finalizeMigrationOperationSettings().build();
createCloneJobSettings = settingsBuilder.createCloneJobSettings().build();
createCloneJobOperationSettings = settingsBuilder.createCloneJobOperationSettings().build();
cancelCloneJobSettings = settingsBuilder.cancelCloneJobSettings().build();
cancelCloneJobOperationSettings = settingsBuilder.cancelCloneJobOperationSettings().build();
listCloneJobsSettings = settingsBuilder.listCloneJobsSettings().build();
getCloneJobSettings = settingsBuilder.getCloneJobSettings().build();
createCutoverJobSettings = settingsBuilder.createCutoverJobSettings().build();
createCutoverJobOperationSettings = settingsBuilder.createCutoverJobOperationSettings().build();
cancelCutoverJobSettings = settingsBuilder.cancelCutoverJobSettings().build();
cancelCutoverJobOperationSettings = settingsBuilder.cancelCutoverJobOperationSettings().build();
listCutoverJobsSettings = settingsBuilder.listCutoverJobsSettings().build();
getCutoverJobSettings = settingsBuilder.getCutoverJobSettings().build();
listGroupsSettings = settingsBuilder.listGroupsSettings().build();
getGroupSettings = settingsBuilder.getGroupSettings().build();
createGroupSettings = settingsBuilder.createGroupSettings().build();
createGroupOperationSettings = settingsBuilder.createGroupOperationSettings().build();
updateGroupSettings = settingsBuilder.updateGroupSettings().build();
updateGroupOperationSettings = settingsBuilder.updateGroupOperationSettings().build();
deleteGroupSettings = settingsBuilder.deleteGroupSettings().build();
deleteGroupOperationSettings = settingsBuilder.deleteGroupOperationSettings().build();
addGroupMigrationSettings = settingsBuilder.addGroupMigrationSettings().build();
addGroupMigrationOperationSettings =
settingsBuilder.addGroupMigrationOperationSettings().build();
removeGroupMigrationSettings = settingsBuilder.removeGroupMigrationSettings().build();
removeGroupMigrationOperationSettings =
settingsBuilder.removeGroupMigrationOperationSettings().build();
listTargetProjectsSettings = settingsBuilder.listTargetProjectsSettings().build();
getTargetProjectSettings = settingsBuilder.getTargetProjectSettings().build();
createTargetProjectSettings = settingsBuilder.createTargetProjectSettings().build();
createTargetProjectOperationSettings =
settingsBuilder.createTargetProjectOperationSettings().build();
updateTargetProjectSettings = settingsBuilder.updateTargetProjectSettings().build();
updateTargetProjectOperationSettings =
settingsBuilder.updateTargetProjectOperationSettings().build();
deleteTargetProjectSettings = settingsBuilder.deleteTargetProjectSettings().build();
deleteTargetProjectOperationSettings =
settingsBuilder.deleteTargetProjectOperationSettings().build();
listReplicationCyclesSettings = settingsBuilder.listReplicationCyclesSettings().build();
getReplicationCycleSettings = settingsBuilder.getReplicationCycleSettings().build();
listLocationsSettings = settingsBuilder.listLocationsSettings().build();
getLocationSettings = settingsBuilder.getLocationSettings().build();
}
/** Builder for VmMigrationStubSettings. */
public static class Builder extends StubSettings.Builder {
private final ImmutableList> unaryMethodSettingsBuilders;
private final PagedCallSettings.Builder<
ListSourcesRequest, ListSourcesResponse, ListSourcesPagedResponse>
listSourcesSettings;
private final UnaryCallSettings.Builder getSourceSettings;
private final UnaryCallSettings.Builder createSourceSettings;
private final OperationCallSettings.Builder
createSourceOperationSettings;
private final UnaryCallSettings.Builder updateSourceSettings;
private final OperationCallSettings.Builder
updateSourceOperationSettings;
private final UnaryCallSettings.Builder deleteSourceSettings;
private final OperationCallSettings.Builder
deleteSourceOperationSettings;
private final UnaryCallSettings.Builder
fetchInventorySettings;
private final PagedCallSettings.Builder<
ListUtilizationReportsRequest,
ListUtilizationReportsResponse,
ListUtilizationReportsPagedResponse>
listUtilizationReportsSettings;
private final UnaryCallSettings.Builder
getUtilizationReportSettings;
private final UnaryCallSettings.Builder
createUtilizationReportSettings;
private final OperationCallSettings.Builder<
CreateUtilizationReportRequest, UtilizationReport, OperationMetadata>
createUtilizationReportOperationSettings;
private final UnaryCallSettings.Builder
deleteUtilizationReportSettings;
private final OperationCallSettings.Builder<
DeleteUtilizationReportRequest, Empty, OperationMetadata>
deleteUtilizationReportOperationSettings;
private final PagedCallSettings.Builder<
ListDatacenterConnectorsRequest,
ListDatacenterConnectorsResponse,
ListDatacenterConnectorsPagedResponse>
listDatacenterConnectorsSettings;
private final UnaryCallSettings.Builder
getDatacenterConnectorSettings;
private final UnaryCallSettings.Builder
createDatacenterConnectorSettings;
private final OperationCallSettings.Builder<
CreateDatacenterConnectorRequest, DatacenterConnector, OperationMetadata>
createDatacenterConnectorOperationSettings;
private final UnaryCallSettings.Builder
deleteDatacenterConnectorSettings;
private final OperationCallSettings.Builder<
DeleteDatacenterConnectorRequest, Empty, OperationMetadata>
deleteDatacenterConnectorOperationSettings;
private final UnaryCallSettings.Builder
upgradeApplianceSettings;
private final OperationCallSettings.Builder<
UpgradeApplianceRequest, UpgradeApplianceResponse, OperationMetadata>
upgradeApplianceOperationSettings;
private final UnaryCallSettings.Builder
createMigratingVmSettings;
private final OperationCallSettings.Builder<
CreateMigratingVmRequest, MigratingVm, OperationMetadata>
createMigratingVmOperationSettings;
private final PagedCallSettings.Builder<
ListMigratingVmsRequest, ListMigratingVmsResponse, ListMigratingVmsPagedResponse>
listMigratingVmsSettings;
private final UnaryCallSettings.Builder
getMigratingVmSettings;
private final UnaryCallSettings.Builder
updateMigratingVmSettings;
private final OperationCallSettings.Builder<
UpdateMigratingVmRequest, MigratingVm, OperationMetadata>
updateMigratingVmOperationSettings;
private final UnaryCallSettings.Builder
deleteMigratingVmSettings;
private final OperationCallSettings.Builder
deleteMigratingVmOperationSettings;
private final UnaryCallSettings.Builder
startMigrationSettings;
private final OperationCallSettings.Builder<
StartMigrationRequest, StartMigrationResponse, OperationMetadata>
startMigrationOperationSettings;
private final UnaryCallSettings.Builder
resumeMigrationSettings;
private final OperationCallSettings.Builder<
ResumeMigrationRequest, ResumeMigrationResponse, OperationMetadata>
resumeMigrationOperationSettings;
private final UnaryCallSettings.Builder
pauseMigrationSettings;
private final OperationCallSettings.Builder<
PauseMigrationRequest, PauseMigrationResponse, OperationMetadata>
pauseMigrationOperationSettings;
private final UnaryCallSettings.Builder
finalizeMigrationSettings;
private final OperationCallSettings.Builder<
FinalizeMigrationRequest, FinalizeMigrationResponse, OperationMetadata>
finalizeMigrationOperationSettings;
private final UnaryCallSettings.Builder
createCloneJobSettings;
private final OperationCallSettings.Builder
createCloneJobOperationSettings;
private final UnaryCallSettings.Builder
cancelCloneJobSettings;
private final OperationCallSettings.Builder<
CancelCloneJobRequest, CancelCloneJobResponse, OperationMetadata>
cancelCloneJobOperationSettings;
private final PagedCallSettings.Builder<
ListCloneJobsRequest, ListCloneJobsResponse, ListCloneJobsPagedResponse>
listCloneJobsSettings;
private final UnaryCallSettings.Builder getCloneJobSettings;
private final UnaryCallSettings.Builder
createCutoverJobSettings;
private final OperationCallSettings.Builder<
CreateCutoverJobRequest, CutoverJob, OperationMetadata>
createCutoverJobOperationSettings;
private final UnaryCallSettings.Builder
cancelCutoverJobSettings;
private final OperationCallSettings.Builder<
CancelCutoverJobRequest, CancelCutoverJobResponse, OperationMetadata>
cancelCutoverJobOperationSettings;
private final PagedCallSettings.Builder<
ListCutoverJobsRequest, ListCutoverJobsResponse, ListCutoverJobsPagedResponse>
listCutoverJobsSettings;
private final UnaryCallSettings.Builder getCutoverJobSettings;
private final PagedCallSettings.Builder<
ListGroupsRequest, ListGroupsResponse, ListGroupsPagedResponse>
listGroupsSettings;
private final UnaryCallSettings.Builder getGroupSettings;
private final UnaryCallSettings.Builder createGroupSettings;
private final OperationCallSettings.Builder
createGroupOperationSettings;
private final UnaryCallSettings.Builder updateGroupSettings;
private final OperationCallSettings.Builder
updateGroupOperationSettings;
private final UnaryCallSettings.Builder deleteGroupSettings;
private final OperationCallSettings.Builder
deleteGroupOperationSettings;
private final UnaryCallSettings.Builder
addGroupMigrationSettings;
private final OperationCallSettings.Builder<
AddGroupMigrationRequest, AddGroupMigrationResponse, OperationMetadata>
addGroupMigrationOperationSettings;
private final UnaryCallSettings.Builder
removeGroupMigrationSettings;
private final OperationCallSettings.Builder<
RemoveGroupMigrationRequest, RemoveGroupMigrationResponse, OperationMetadata>
removeGroupMigrationOperationSettings;
private final PagedCallSettings.Builder<
ListTargetProjectsRequest, ListTargetProjectsResponse, ListTargetProjectsPagedResponse>
listTargetProjectsSettings;
private final UnaryCallSettings.Builder
getTargetProjectSettings;
private final UnaryCallSettings.Builder
createTargetProjectSettings;
private final OperationCallSettings.Builder<
CreateTargetProjectRequest, TargetProject, OperationMetadata>
createTargetProjectOperationSettings;
private final UnaryCallSettings.Builder
updateTargetProjectSettings;
private final OperationCallSettings.Builder<
UpdateTargetProjectRequest, TargetProject, OperationMetadata>
updateTargetProjectOperationSettings;
private final UnaryCallSettings.Builder
deleteTargetProjectSettings;
private final OperationCallSettings.Builder<
DeleteTargetProjectRequest, Empty, OperationMetadata>
deleteTargetProjectOperationSettings;
private final PagedCallSettings.Builder<
ListReplicationCyclesRequest,
ListReplicationCyclesResponse,
ListReplicationCyclesPagedResponse>
listReplicationCyclesSettings;
private final UnaryCallSettings.Builder
getReplicationCycleSettings;
private final PagedCallSettings.Builder<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings;
private final UnaryCallSettings.Builder getLocationSettings;
private static final ImmutableMap>
RETRYABLE_CODE_DEFINITIONS;
static {
ImmutableMap.Builder> definitions =
ImmutableMap.builder();
definitions.put(
"no_retry_0_codes", ImmutableSet.copyOf(Lists.newArrayList()));
definitions.put(
"no_retry_2_codes", ImmutableSet.copyOf(Lists.newArrayList()));
definitions.put(
"no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList()));
RETRYABLE_CODE_DEFINITIONS = definitions.build();
}
private static final ImmutableMap RETRY_PARAM_DEFINITIONS;
static {
ImmutableMap.Builder definitions = ImmutableMap.builder();
RetrySettings settings = null;
settings =
RetrySettings.newBuilder()
.setInitialRpcTimeout(Duration.ofMillis(60000L))
.setRpcTimeoutMultiplier(1.0)
.setMaxRpcTimeout(Duration.ofMillis(60000L))
.setTotalTimeout(Duration.ofMillis(60000L))
.build();
definitions.put("no_retry_0_params", settings);
settings =
RetrySettings.newBuilder()
.setInitialRpcTimeout(Duration.ofMillis(900000L))
.setRpcTimeoutMultiplier(1.0)
.setMaxRpcTimeout(Duration.ofMillis(900000L))
.setTotalTimeout(Duration.ofMillis(900000L))
.build();
definitions.put("no_retry_2_params", settings);
settings =
RetrySettings.newBuilder()
.setInitialRpcTimeout(Duration.ofMillis(300000L))
.setRpcTimeoutMultiplier(1.0)
.setMaxRpcTimeout(Duration.ofMillis(300000L))
.setTotalTimeout(Duration.ofMillis(300000L))
.build();
definitions.put("no_retry_1_params", settings);
RETRY_PARAM_DEFINITIONS = definitions.build();
}
protected Builder() {
this(((ClientContext) null));
}
protected Builder(ClientContext clientContext) {
super(clientContext);
listSourcesSettings = PagedCallSettings.newBuilder(LIST_SOURCES_PAGE_STR_FACT);
getSourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createSourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createSourceOperationSettings = OperationCallSettings.newBuilder();
updateSourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
updateSourceOperationSettings = OperationCallSettings.newBuilder();
deleteSourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deleteSourceOperationSettings = OperationCallSettings.newBuilder();
fetchInventorySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
listUtilizationReportsSettings =
PagedCallSettings.newBuilder(LIST_UTILIZATION_REPORTS_PAGE_STR_FACT);
getUtilizationReportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createUtilizationReportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createUtilizationReportOperationSettings = OperationCallSettings.newBuilder();
deleteUtilizationReportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deleteUtilizationReportOperationSettings = OperationCallSettings.newBuilder();
listDatacenterConnectorsSettings =
PagedCallSettings.newBuilder(LIST_DATACENTER_CONNECTORS_PAGE_STR_FACT);
getDatacenterConnectorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createDatacenterConnectorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createDatacenterConnectorOperationSettings = OperationCallSettings.newBuilder();
deleteDatacenterConnectorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deleteDatacenterConnectorOperationSettings = OperationCallSettings.newBuilder();
upgradeApplianceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
upgradeApplianceOperationSettings = OperationCallSettings.newBuilder();
createMigratingVmSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createMigratingVmOperationSettings = OperationCallSettings.newBuilder();
listMigratingVmsSettings = PagedCallSettings.newBuilder(LIST_MIGRATING_VMS_PAGE_STR_FACT);
getMigratingVmSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
updateMigratingVmSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
updateMigratingVmOperationSettings = OperationCallSettings.newBuilder();
deleteMigratingVmSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deleteMigratingVmOperationSettings = OperationCallSettings.newBuilder();
startMigrationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
startMigrationOperationSettings = OperationCallSettings.newBuilder();
resumeMigrationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
resumeMigrationOperationSettings = OperationCallSettings.newBuilder();
pauseMigrationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
pauseMigrationOperationSettings = OperationCallSettings.newBuilder();
finalizeMigrationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
finalizeMigrationOperationSettings = OperationCallSettings.newBuilder();
createCloneJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createCloneJobOperationSettings = OperationCallSettings.newBuilder();
cancelCloneJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
cancelCloneJobOperationSettings = OperationCallSettings.newBuilder();
listCloneJobsSettings = PagedCallSettings.newBuilder(LIST_CLONE_JOBS_PAGE_STR_FACT);
getCloneJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createCutoverJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createCutoverJobOperationSettings = OperationCallSettings.newBuilder();
cancelCutoverJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
cancelCutoverJobOperationSettings = OperationCallSettings.newBuilder();
listCutoverJobsSettings = PagedCallSettings.newBuilder(LIST_CUTOVER_JOBS_PAGE_STR_FACT);
getCutoverJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
listGroupsSettings = PagedCallSettings.newBuilder(LIST_GROUPS_PAGE_STR_FACT);
getGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createGroupOperationSettings = OperationCallSettings.newBuilder();
updateGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
updateGroupOperationSettings = OperationCallSettings.newBuilder();
deleteGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deleteGroupOperationSettings = OperationCallSettings.newBuilder();
addGroupMigrationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
addGroupMigrationOperationSettings = OperationCallSettings.newBuilder();
removeGroupMigrationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
removeGroupMigrationOperationSettings = OperationCallSettings.newBuilder();
listTargetProjectsSettings = PagedCallSettings.newBuilder(LIST_TARGET_PROJECTS_PAGE_STR_FACT);
getTargetProjectSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createTargetProjectSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createTargetProjectOperationSettings = OperationCallSettings.newBuilder();
updateTargetProjectSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
updateTargetProjectOperationSettings = OperationCallSettings.newBuilder();
deleteTargetProjectSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deleteTargetProjectOperationSettings = OperationCallSettings.newBuilder();
listReplicationCyclesSettings =
PagedCallSettings.newBuilder(LIST_REPLICATION_CYCLES_PAGE_STR_FACT);
getReplicationCycleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT);
getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
unaryMethodSettingsBuilders =
ImmutableList.>of(
listSourcesSettings,
getSourceSettings,
createSourceSettings,
updateSourceSettings,
deleteSourceSettings,
fetchInventorySettings,
listUtilizationReportsSettings,
getUtilizationReportSettings,
createUtilizationReportSettings,
deleteUtilizationReportSettings,
listDatacenterConnectorsSettings,
getDatacenterConnectorSettings,
createDatacenterConnectorSettings,
deleteDatacenterConnectorSettings,
upgradeApplianceSettings,
createMigratingVmSettings,
listMigratingVmsSettings,
getMigratingVmSettings,
updateMigratingVmSettings,
deleteMigratingVmSettings,
startMigrationSettings,
resumeMigrationSettings,
pauseMigrationSettings,
finalizeMigrationSettings,
createCloneJobSettings,
cancelCloneJobSettings,
listCloneJobsSettings,
getCloneJobSettings,
createCutoverJobSettings,
cancelCutoverJobSettings,
listCutoverJobsSettings,
getCutoverJobSettings,
listGroupsSettings,
getGroupSettings,
createGroupSettings,
updateGroupSettings,
deleteGroupSettings,
addGroupMigrationSettings,
removeGroupMigrationSettings,
listTargetProjectsSettings,
getTargetProjectSettings,
createTargetProjectSettings,
updateTargetProjectSettings,
deleteTargetProjectSettings,
listReplicationCyclesSettings,
getReplicationCycleSettings,
listLocationsSettings,
getLocationSettings);
initDefaults(this);
}
protected Builder(VmMigrationStubSettings settings) {
super(settings);
listSourcesSettings = settings.listSourcesSettings.toBuilder();
getSourceSettings = settings.getSourceSettings.toBuilder();
createSourceSettings = settings.createSourceSettings.toBuilder();
createSourceOperationSettings = settings.createSourceOperationSettings.toBuilder();
updateSourceSettings = settings.updateSourceSettings.toBuilder();
updateSourceOperationSettings = settings.updateSourceOperationSettings.toBuilder();
deleteSourceSettings = settings.deleteSourceSettings.toBuilder();
deleteSourceOperationSettings = settings.deleteSourceOperationSettings.toBuilder();
fetchInventorySettings = settings.fetchInventorySettings.toBuilder();
listUtilizationReportsSettings = settings.listUtilizationReportsSettings.toBuilder();
getUtilizationReportSettings = settings.getUtilizationReportSettings.toBuilder();
createUtilizationReportSettings = settings.createUtilizationReportSettings.toBuilder();
createUtilizationReportOperationSettings =
settings.createUtilizationReportOperationSettings.toBuilder();
deleteUtilizationReportSettings = settings.deleteUtilizationReportSettings.toBuilder();
deleteUtilizationReportOperationSettings =
settings.deleteUtilizationReportOperationSettings.toBuilder();
listDatacenterConnectorsSettings = settings.listDatacenterConnectorsSettings.toBuilder();
getDatacenterConnectorSettings = settings.getDatacenterConnectorSettings.toBuilder();
createDatacenterConnectorSettings = settings.createDatacenterConnectorSettings.toBuilder();
createDatacenterConnectorOperationSettings =
settings.createDatacenterConnectorOperationSettings.toBuilder();
deleteDatacenterConnectorSettings = settings.deleteDatacenterConnectorSettings.toBuilder();
deleteDatacenterConnectorOperationSettings =
settings.deleteDatacenterConnectorOperationSettings.toBuilder();
upgradeApplianceSettings = settings.upgradeApplianceSettings.toBuilder();
upgradeApplianceOperationSettings = settings.upgradeApplianceOperationSettings.toBuilder();
createMigratingVmSettings = settings.createMigratingVmSettings.toBuilder();
createMigratingVmOperationSettings = settings.createMigratingVmOperationSettings.toBuilder();
listMigratingVmsSettings = settings.listMigratingVmsSettings.toBuilder();
getMigratingVmSettings = settings.getMigratingVmSettings.toBuilder();
updateMigratingVmSettings = settings.updateMigratingVmSettings.toBuilder();
updateMigratingVmOperationSettings = settings.updateMigratingVmOperationSettings.toBuilder();
deleteMigratingVmSettings = settings.deleteMigratingVmSettings.toBuilder();
deleteMigratingVmOperationSettings = settings.deleteMigratingVmOperationSettings.toBuilder();
startMigrationSettings = settings.startMigrationSettings.toBuilder();
startMigrationOperationSettings = settings.startMigrationOperationSettings.toBuilder();
resumeMigrationSettings = settings.resumeMigrationSettings.toBuilder();
resumeMigrationOperationSettings = settings.resumeMigrationOperationSettings.toBuilder();
pauseMigrationSettings = settings.pauseMigrationSettings.toBuilder();
pauseMigrationOperationSettings = settings.pauseMigrationOperationSettings.toBuilder();
finalizeMigrationSettings = settings.finalizeMigrationSettings.toBuilder();
finalizeMigrationOperationSettings = settings.finalizeMigrationOperationSettings.toBuilder();
createCloneJobSettings = settings.createCloneJobSettings.toBuilder();
createCloneJobOperationSettings = settings.createCloneJobOperationSettings.toBuilder();
cancelCloneJobSettings = settings.cancelCloneJobSettings.toBuilder();
cancelCloneJobOperationSettings = settings.cancelCloneJobOperationSettings.toBuilder();
listCloneJobsSettings = settings.listCloneJobsSettings.toBuilder();
getCloneJobSettings = settings.getCloneJobSettings.toBuilder();
createCutoverJobSettings = settings.createCutoverJobSettings.toBuilder();
createCutoverJobOperationSettings = settings.createCutoverJobOperationSettings.toBuilder();
cancelCutoverJobSettings = settings.cancelCutoverJobSettings.toBuilder();
cancelCutoverJobOperationSettings = settings.cancelCutoverJobOperationSettings.toBuilder();
listCutoverJobsSettings = settings.listCutoverJobsSettings.toBuilder();
getCutoverJobSettings = settings.getCutoverJobSettings.toBuilder();
listGroupsSettings = settings.listGroupsSettings.toBuilder();
getGroupSettings = settings.getGroupSettings.toBuilder();
createGroupSettings = settings.createGroupSettings.toBuilder();
createGroupOperationSettings = settings.createGroupOperationSettings.toBuilder();
updateGroupSettings = settings.updateGroupSettings.toBuilder();
updateGroupOperationSettings = settings.updateGroupOperationSettings.toBuilder();
deleteGroupSettings = settings.deleteGroupSettings.toBuilder();
deleteGroupOperationSettings = settings.deleteGroupOperationSettings.toBuilder();
addGroupMigrationSettings = settings.addGroupMigrationSettings.toBuilder();
addGroupMigrationOperationSettings = settings.addGroupMigrationOperationSettings.toBuilder();
removeGroupMigrationSettings = settings.removeGroupMigrationSettings.toBuilder();
removeGroupMigrationOperationSettings =
settings.removeGroupMigrationOperationSettings.toBuilder();
listTargetProjectsSettings = settings.listTargetProjectsSettings.toBuilder();
getTargetProjectSettings = settings.getTargetProjectSettings.toBuilder();
createTargetProjectSettings = settings.createTargetProjectSettings.toBuilder();
createTargetProjectOperationSettings =
settings.createTargetProjectOperationSettings.toBuilder();
updateTargetProjectSettings = settings.updateTargetProjectSettings.toBuilder();
updateTargetProjectOperationSettings =
settings.updateTargetProjectOperationSettings.toBuilder();
deleteTargetProjectSettings = settings.deleteTargetProjectSettings.toBuilder();
deleteTargetProjectOperationSettings =
settings.deleteTargetProjectOperationSettings.toBuilder();
listReplicationCyclesSettings = settings.listReplicationCyclesSettings.toBuilder();
getReplicationCycleSettings = settings.getReplicationCycleSettings.toBuilder();
listLocationsSettings = settings.listLocationsSettings.toBuilder();
getLocationSettings = settings.getLocationSettings.toBuilder();
unaryMethodSettingsBuilders =
ImmutableList.>of(
listSourcesSettings,
getSourceSettings,
createSourceSettings,
updateSourceSettings,
deleteSourceSettings,
fetchInventorySettings,
listUtilizationReportsSettings,
getUtilizationReportSettings,
createUtilizationReportSettings,
deleteUtilizationReportSettings,
listDatacenterConnectorsSettings,
getDatacenterConnectorSettings,
createDatacenterConnectorSettings,
deleteDatacenterConnectorSettings,
upgradeApplianceSettings,
createMigratingVmSettings,
listMigratingVmsSettings,
getMigratingVmSettings,
updateMigratingVmSettings,
deleteMigratingVmSettings,
startMigrationSettings,
resumeMigrationSettings,
pauseMigrationSettings,
finalizeMigrationSettings,
createCloneJobSettings,
cancelCloneJobSettings,
listCloneJobsSettings,
getCloneJobSettings,
createCutoverJobSettings,
cancelCutoverJobSettings,
listCutoverJobsSettings,
getCutoverJobSettings,
listGroupsSettings,
getGroupSettings,
createGroupSettings,
updateGroupSettings,
deleteGroupSettings,
addGroupMigrationSettings,
removeGroupMigrationSettings,
listTargetProjectsSettings,
getTargetProjectSettings,
createTargetProjectSettings,
updateTargetProjectSettings,
deleteTargetProjectSettings,
listReplicationCyclesSettings,
getReplicationCycleSettings,
listLocationsSettings,
getLocationSettings);
}
private static Builder createDefault() {
Builder builder = new Builder(((ClientContext) null));
builder.setTransportChannelProvider(defaultTransportChannelProvider());
builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
builder.setSwitchToMtlsEndpointAllowed(true);
return initDefaults(builder);
}
private static Builder createHttpJsonDefault() {
Builder builder = new Builder(((ClientContext) null));
builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build());
builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build());
builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
builder.setSwitchToMtlsEndpointAllowed(true);
return initDefaults(builder);
}
private static Builder initDefaults(Builder builder) {
builder
.listSourcesSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.getSourceSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.createSourceSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params"));
builder
.updateSourceSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.deleteSourceSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.fetchInventorySettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
builder
.listUtilizationReportsSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.getUtilizationReportSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.createUtilizationReportSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
builder
.deleteUtilizationReportSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.listDatacenterConnectorsSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.getDatacenterConnectorSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.createDatacenterConnectorSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.deleteDatacenterConnectorSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.upgradeApplianceSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.createMigratingVmSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.listMigratingVmsSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.getMigratingVmSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.updateMigratingVmSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.deleteMigratingVmSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.startMigrationSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.resumeMigrationSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.pauseMigrationSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.finalizeMigrationSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.createCloneJobSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.cancelCloneJobSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.listCloneJobsSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.getCloneJobSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.createCutoverJobSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.cancelCutoverJobSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.listCutoverJobsSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.getCutoverJobSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.listGroupsSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.getGroupSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.createGroupSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.updateGroupSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.deleteGroupSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.addGroupMigrationSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.removeGroupMigrationSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.listTargetProjectsSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.getTargetProjectSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.createTargetProjectSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.updateTargetProjectSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.deleteTargetProjectSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.listReplicationCyclesSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.getReplicationCycleSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.listLocationsSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.getLocationSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
builder
.createSourceOperationSettings()
.setInitialCallSettings(
UnaryCallSettings
.newUnaryCallSettingsBuilder()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params"))
.build())
.setResponseTransformer(
ProtoOperationTransformers.ResponseTransformer.create(Source.class))
.setMetadataTransformer(
ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class))
.setPollingAlgorithm(
OperationTimedPollAlgorithm.create(
RetrySettings.newBuilder()
.setInitialRetryDelay(Duration.ofMillis(5000L))
.setRetryDelayMultiplier(1.5)
.setMaxRetryDelay(Duration.ofMillis(45000L))
.setInitialRpcTimeout(Duration.ZERO)
.setRpcTimeoutMultiplier(1.0)
.setMaxRpcTimeout(Duration.ZERO)
.setTotalTimeout(Duration.ofMillis(300000L))
.build()));
builder
.updateSourceOperationSettings()
.setInitialCallSettings(
UnaryCallSettings
.newUnaryCallSettingsBuilder()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"))
.build())
.setResponseTransformer(
ProtoOperationTransformers.ResponseTransformer.create(Source.class))
.setMetadataTransformer(
ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class))
.setPollingAlgorithm(
OperationTimedPollAlgorithm.create(
RetrySettings.newBuilder()
.setInitialRetryDelay(Duration.ofMillis(5000L))
.setRetryDelayMultiplier(1.5)
.setMaxRetryDelay(Duration.ofMillis(45000L))
.setInitialRpcTimeout(Duration.ZERO)
.setRpcTimeoutMultiplier(1.0)
.setMaxRpcTimeout(Duration.ZERO)
.setTotalTimeout(Duration.ofMillis(300000L))
.build()));
builder
.deleteSourceOperationSettings()
.setInitialCallSettings(
UnaryCallSettings
.newUnaryCallSettingsBuilder()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"))
.build())
.setResponseTransformer(
ProtoOperationTransformers.ResponseTransformer.create(Empty.class))
.setMetadataTransformer(
ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class))
.setPollingAlgorithm(
OperationTimedPollAlgorithm.create(
RetrySettings.newBuilder()
.setInitialRetryDelay(Duration.ofMillis(5000L))
.setRetryDelayMultiplier(1.5)
.setMaxRetryDelay(Duration.ofMillis(45000L))
.setInitialRpcTimeout(Duration.ZERO)
.setRpcTimeoutMultiplier(1.0)
.setMaxRpcTimeout(Duration.ZERO)
.setTotalTimeout(Duration.ofMillis(300000L))
.build()));
builder
.createUtilizationReportOperationSettings()
.setInitialCallSettings(
UnaryCallSettings
.