Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [compute] Update Compute Engine API to revision 20230610 (#820) #9597

Merged
merged 4 commits into from
Jul 7, 2023
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
2 changes: 1 addition & 1 deletion java-compute/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.17.0</version>
<version>26.18.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,152 @@ public final UnaryCallable<ListAddressesRequest, AddressList> listCallable() {
return stub.listCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Moves the specified address resource.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (AddressesClient addressesClient = AddressesClient.create()) {
* String project = "project-309310695";
* String region = "region-934795532";
* String address = "address-1147692044";
* RegionAddressesMoveRequest regionAddressesMoveRequestResource =
* RegionAddressesMoveRequest.newBuilder().build();
* Operation response =
* addressesClient
* .moveAsync(project, region, address, regionAddressesMoveRequestResource)
* .get();
* }
* }</pre>
*
* @param project Source project ID which the Address is moved from.
* @param region Name of the region for this request.
* @param address Name of the address resource to move.
* @param regionAddressesMoveRequestResource The body resource for this request
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture<Operation, Operation> moveAsync(
String project,
String region,
String address,
RegionAddressesMoveRequest regionAddressesMoveRequestResource) {
MoveAddressRequest request =
MoveAddressRequest.newBuilder()
.setProject(project)
.setRegion(region)
.setAddress(address)
.setRegionAddressesMoveRequestResource(regionAddressesMoveRequestResource)
.build();
return moveAsync(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Moves the specified address resource.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (AddressesClient addressesClient = AddressesClient.create()) {
* MoveAddressRequest request =
* MoveAddressRequest.newBuilder()
* .setAddress("address-1147692044")
* .setProject("project-309310695")
* .setRegion("region-934795532")
* .setRegionAddressesMoveRequestResource(
* RegionAddressesMoveRequest.newBuilder().build())
* .setRequestId("requestId693933066")
* .build();
* Operation response = addressesClient.moveAsync(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
*/
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture<Operation, Operation> moveAsync(MoveAddressRequest request) {
return moveOperationCallable().futureCall(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Moves the specified address resource.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (AddressesClient addressesClient = AddressesClient.create()) {
* MoveAddressRequest request =
* MoveAddressRequest.newBuilder()
* .setAddress("address-1147692044")
* .setProject("project-309310695")
* .setRegion("region-934795532")
* .setRegionAddressesMoveRequestResource(
* RegionAddressesMoveRequest.newBuilder().build())
* .setRequestId("requestId693933066")
* .build();
* OperationFuture<Operation, Operation> future =
* addressesClient.moveOperationCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }</pre>
*/
public final OperationCallable<MoveAddressRequest, Operation, Operation> moveOperationCallable() {
return stub.moveOperationCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Moves the specified address resource.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (AddressesClient addressesClient = AddressesClient.create()) {
* MoveAddressRequest request =
* MoveAddressRequest.newBuilder()
* .setAddress("address-1147692044")
* .setProject("project-309310695")
* .setRegion("region-934795532")
* .setRegionAddressesMoveRequestResource(
* RegionAddressesMoveRequest.newBuilder().build())
* .setRequestId("requestId693933066")
* .build();
* ApiFuture<Operation> future = addressesClient.moveCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<MoveAddressRequest, Operation> moveCallable() {
return stub.moveCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Sets the labels on an Address. To learn more about labels, read the Labeling Resources
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,16 @@ public PagedCallSettings<ListAddressesRequest, AddressList, ListPagedResponse> l
return ((AddressesStubSettings) getStubSettings()).listSettings();
}

/** Returns the object with the settings used for calls to move. */
public UnaryCallSettings<MoveAddressRequest, Operation> moveSettings() {
return ((AddressesStubSettings) getStubSettings()).moveSettings();
}

/** Returns the object with the settings used for calls to move. */
public OperationCallSettings<MoveAddressRequest, Operation, Operation> moveOperationSettings() {
return ((AddressesStubSettings) getStubSettings()).moveOperationSettings();
}

/** Returns the object with the settings used for calls to setLabels. */
public UnaryCallSettings<SetLabelsAddressRequest, Operation> setLabelsSettings() {
return ((AddressesStubSettings) getStubSettings()).setLabelsSettings();
Expand Down Expand Up @@ -262,6 +272,17 @@ public UnaryCallSettings.Builder<InsertAddressRequest, Operation> insertSettings
return getStubSettingsBuilder().listSettings();
}

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

/** Returns the builder for the settings used for calls to move. */
public OperationCallSettings.Builder<MoveAddressRequest, Operation, Operation>
moveOperationSettings() {
return getStubSettingsBuilder().moveOperationSettings();
}

/** Returns the builder for the settings used for calls to setLabels. */
public UnaryCallSettings.Builder<SetLabelsAddressRequest, Operation> setLabelsSettings() {
return getStubSettingsBuilder().setLabelsSettings();
Expand Down
Loading
Loading