Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

feat: Rename product #120

Merged
merged 2 commits into from
Jul 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2117,6 +2117,96 @@ public final OperationFuture<Empty, OperationMetadata> deleteDatacenterConnector
return stub.deleteDatacenterConnectorCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Upgrades the appliance relate to this DatacenterConnector to the in-place updateable version.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
* UpgradeApplianceRequest request =
* UpgradeApplianceRequest.newBuilder()
* .setDatacenterConnector(
* DatacenterConnectorName.of(
* "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]")
* .toString())
* .setRequestId("requestId693933066")
* .build();
* UpgradeApplianceResponse response = vmMigrationClient.upgradeApplianceAsync(request).get();
* }
* }</pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture<UpgradeApplianceResponse, OperationMetadata> upgradeApplianceAsync(
UpgradeApplianceRequest request) {
return upgradeApplianceOperationCallable().futureCall(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Upgrades the appliance relate to this DatacenterConnector to the in-place updateable version.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
* UpgradeApplianceRequest request =
* UpgradeApplianceRequest.newBuilder()
* .setDatacenterConnector(
* DatacenterConnectorName.of(
* "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]")
* .toString())
* .setRequestId("requestId693933066")
* .build();
* OperationFuture<UpgradeApplianceResponse, OperationMetadata> future =
* vmMigrationClient.upgradeApplianceOperationCallable().futureCall(request);
* // Do something.
* UpgradeApplianceResponse response = future.get();
* }
* }</pre>
*/
public final OperationCallable<
UpgradeApplianceRequest, UpgradeApplianceResponse, OperationMetadata>
upgradeApplianceOperationCallable() {
return stub.upgradeApplianceOperationCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Upgrades the appliance relate to this DatacenterConnector to the in-place updateable version.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (VmMigrationClient vmMigrationClient = VmMigrationClient.create()) {
* UpgradeApplianceRequest request =
* UpgradeApplianceRequest.newBuilder()
* .setDatacenterConnector(
* DatacenterConnectorName.of(
* "[PROJECT]", "[LOCATION]", "[SOURCE]", "[DATACENTER_CONNECTOR]")
* .toString())
* .setRequestId("requestId693933066")
* .build();
* ApiFuture<Operation> future =
* vmMigrationClient.upgradeApplianceCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<UpgradeApplianceRequest, Operation> upgradeApplianceCallable() {
return stub.upgradeApplianceCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new MigratingVm in a given Source.
Expand Down Expand Up @@ -2342,6 +2432,7 @@ public final ListMigratingVmsPagedResponse listMigratingVms(String parent) {
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .setView(MigratingVmView.forNumber(0))
* .build();
* for (MigratingVm element : vmMigrationClient.listMigratingVms(request).iterateAll()) {
* // doThingsWith(element);
Expand Down Expand Up @@ -2373,6 +2464,7 @@ public final ListMigratingVmsPagedResponse listMigratingVms(ListMigratingVmsRequ
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .setView(MigratingVmView.forNumber(0))
* .build();
* ApiFuture<MigratingVm> future =
* vmMigrationClient.listMigratingVmsPagedCallable().futureCall(request);
Expand Down Expand Up @@ -2405,6 +2497,7 @@ public final ListMigratingVmsPagedResponse listMigratingVms(ListMigratingVmsRequ
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .setView(MigratingVmView.forNumber(0))
* .build();
* while (true) {
* ListMigratingVmsResponse response =
Expand Down Expand Up @@ -2491,6 +2584,7 @@ public final MigratingVm getMigratingVm(String name) {
* .setName(
* MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
* .toString())
* .setView(MigratingVmView.forNumber(0))
* .build();
* MigratingVm response = vmMigrationClient.getMigratingVm(request);
* }
Expand Down Expand Up @@ -2518,6 +2612,7 @@ public final MigratingVm getMigratingVm(GetMigratingVmRequest request) {
* .setName(
* MigratingVmName.of("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]")
* .toString())
* .setView(MigratingVmView.forNumber(0))
* .build();
* ApiFuture<MigratingVm> future =
* vmMigrationClient.getMigratingVmCallable().futureCall(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,17 @@ public UnaryCallSettings<FetchInventoryRequest, FetchInventoryResponse> fetchInv
.deleteDatacenterConnectorOperationSettings();
}

/** Returns the object with the settings used for calls to upgradeAppliance. */
public UnaryCallSettings<UpgradeApplianceRequest, Operation> upgradeApplianceSettings() {
return ((VmMigrationStubSettings) getStubSettings()).upgradeApplianceSettings();
}

/** Returns the object with the settings used for calls to upgradeAppliance. */
public OperationCallSettings<UpgradeApplianceRequest, UpgradeApplianceResponse, OperationMetadata>
upgradeApplianceOperationSettings() {
return ((VmMigrationStubSettings) getStubSettings()).upgradeApplianceOperationSettings();
}

/** Returns the object with the settings used for calls to createMigratingVm. */
public UnaryCallSettings<CreateMigratingVmRequest, Operation> createMigratingVmSettings() {
return ((VmMigrationStubSettings) getStubSettings()).createMigratingVmSettings();
Expand Down Expand Up @@ -726,6 +737,19 @@ public UnaryCallSettings.Builder<DeleteSourceRequest, Operation> deleteSourceSet
return getStubSettingsBuilder().deleteDatacenterConnectorOperationSettings();
}

/** Returns the builder for the settings used for calls to upgradeAppliance. */
public UnaryCallSettings.Builder<UpgradeApplianceRequest, Operation>
upgradeApplianceSettings() {
return getStubSettingsBuilder().upgradeApplianceSettings();
}

/** Returns the builder for the settings used for calls to upgradeAppliance. */
public OperationCallSettings.Builder<
UpgradeApplianceRequest, UpgradeApplianceResponse, OperationMetadata>
upgradeApplianceOperationSettings() {
return getStubSettingsBuilder().upgradeApplianceOperationSettings();
}

/** Returns the builder for the settings used for calls to createMigratingVm. */
public UnaryCallSettings.Builder<CreateMigratingVmRequest, Operation>
createMigratingVmSettings() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@
},
"UpdateTargetProject": {
"methods": ["updateTargetProjectAsync", "updateTargetProjectAsync", "updateTargetProjectOperationCallable", "updateTargetProjectCallable"]
},
"UpgradeAppliance": {
"methods": ["upgradeApplianceAsync", "upgradeApplianceOperationCallable", "upgradeApplianceCallable"]
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@
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.ImmutableMap;
import com.google.longrunning.Operation;
Expand Down Expand Up @@ -264,6 +266,16 @@ public class GrpcVmMigrationStub extends VmMigrationStub {
.setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
.build();

private static final MethodDescriptor<UpgradeApplianceRequest, Operation>
upgradeApplianceMethodDescriptor =
MethodDescriptor.<UpgradeApplianceRequest, Operation>newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName("google.cloud.vmmigration.v1.VmMigration/UpgradeAppliance")
.setRequestMarshaller(
ProtoUtils.marshaller(UpgradeApplianceRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
.build();

private static final MethodDescriptor<CreateMigratingVmRequest, Operation>
createMigratingVmMethodDescriptor =
MethodDescriptor.<CreateMigratingVmRequest, Operation>newBuilder()
Expand Down Expand Up @@ -592,6 +604,10 @@ public class GrpcVmMigrationStub extends VmMigrationStub {
deleteDatacenterConnectorCallable;
private final OperationCallable<DeleteDatacenterConnectorRequest, Empty, OperationMetadata>
deleteDatacenterConnectorOperationCallable;
private final UnaryCallable<UpgradeApplianceRequest, Operation> upgradeApplianceCallable;
private final OperationCallable<
UpgradeApplianceRequest, UpgradeApplianceResponse, OperationMetadata>
upgradeApplianceOperationCallable;
private final UnaryCallable<CreateMigratingVmRequest, Operation> createMigratingVmCallable;
private final OperationCallable<CreateMigratingVmRequest, MigratingVm, OperationMetadata>
createMigratingVmOperationCallable;
Expand Down Expand Up @@ -870,6 +886,17 @@ protected GrpcVmMigrationStub(
return params.build();
})
.build();
GrpcCallSettings<UpgradeApplianceRequest, Operation> upgradeApplianceTransportSettings =
GrpcCallSettings.<UpgradeApplianceRequest, Operation>newBuilder()
.setMethodDescriptor(upgradeApplianceMethodDescriptor)
.setParamsExtractor(
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put(
"datacenter_connector", String.valueOf(request.getDatacenterConnector()));
return params.build();
})
.build();
GrpcCallSettings<CreateMigratingVmRequest, Operation> createMigratingVmTransportSettings =
GrpcCallSettings.<CreateMigratingVmRequest, Operation>newBuilder()
.setMethodDescriptor(createMigratingVmMethodDescriptor)
Expand Down Expand Up @@ -1279,6 +1306,15 @@ protected GrpcVmMigrationStub(
settings.deleteDatacenterConnectorOperationSettings(),
clientContext,
operationsStub);
this.upgradeApplianceCallable =
callableFactory.createUnaryCallable(
upgradeApplianceTransportSettings, settings.upgradeApplianceSettings(), clientContext);
this.upgradeApplianceOperationCallable =
callableFactory.createOperationCallable(
upgradeApplianceTransportSettings,
settings.upgradeApplianceOperationSettings(),
clientContext,
operationsStub);
this.createMigratingVmCallable =
callableFactory.createUnaryCallable(
createMigratingVmTransportSettings,
Expand Down Expand Up @@ -1663,6 +1699,17 @@ public UnaryCallable<FetchInventoryRequest, FetchInventoryResponse> fetchInvento
return deleteDatacenterConnectorOperationCallable;
}

@Override
public UnaryCallable<UpgradeApplianceRequest, Operation> upgradeApplianceCallable() {
return upgradeApplianceCallable;
}

@Override
public OperationCallable<UpgradeApplianceRequest, UpgradeApplianceResponse, OperationMetadata>
upgradeApplianceOperationCallable() {
return upgradeApplianceOperationCallable;
}

@Override
public UnaryCallable<CreateMigratingVmRequest, Operation> createMigratingVmCallable() {
return createMigratingVmCallable;
Expand Down
Loading