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 20230307 (#770) #9230

Merged
merged 4 commits into from
Mar 16, 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: 0 additions & 2 deletions java-compute/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Java idiomatic client for [Compute Engine][product-docs].

If you are using Maven, add this to your pom.xml file:

<!--- {x-version-update-start:google-cloud-compute:released} -->

```xml
<dependency>
Expand All @@ -35,7 +34,6 @@ If you are using SBT, add this to your dependencies:
```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-compute" % "1.22.0"
```
<!--- {x-version-update-end} -->

## Authentication

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,7 @@ public final UnaryCallable<DeleteAutoscalerRequest, Operation> deleteCallable()

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the specified autoscaler resource. Gets a list of available autoscalers by making a
* list() request.
* Returns the specified autoscaler resource.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -480,8 +479,7 @@ public final Autoscaler get(String project, String zone, String autoscaler) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the specified autoscaler resource. Gets a list of available autoscalers by making a
* list() request.
* Returns the specified autoscaler resource.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -511,8 +509,7 @@ public final Autoscaler get(GetAutoscalerRequest request) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the specified autoscaler resource. Gets a list of available autoscalers by making a
* list() request.
* Returns the specified autoscaler resource.
*
* <p>Sample code:
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -563,8 +563,7 @@ public final OperationFuture<Operation, Operation> deleteSignedUrlKeyAsync(

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the specified BackendBucket resource. Gets a list of available backend buckets by
* making a list() request.
* Returns the specified BackendBucket resource.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -596,8 +595,7 @@ public final BackendBucket get(String project, String backendBucket) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the specified BackendBucket resource. Gets a list of available backend buckets by
* making a list() request.
* Returns the specified BackendBucket resource.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -626,8 +624,7 @@ public final BackendBucket get(GetBackendBucketRequest request) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the specified BackendBucket resource. Gets a list of available backend buckets by
* making a list() request.
* Returns the specified BackendBucket resource.
*
* <p>Sample code:
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ public final OperationFuture<Operation, Operation> deleteSignedUrlKeyAsync(

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the specified BackendService resource. Gets a list of available backend services.
* Returns the specified BackendService resource.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -752,7 +752,7 @@ public final BackendService get(String project, String backendService) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the specified BackendService resource. Gets a list of available backend services.
* Returns the specified BackendService resource.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -781,7 +781,7 @@ public final BackendService get(GetBackendServiceRequest request) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the specified BackendService resource. Gets a list of available backend services.
* Returns the specified BackendService resource.
*
* <p>Sample code:
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,7 @@ public final AggregatedListPagedResponse aggregatedList(AggregatedListDiskTypesR

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the specified disk type. Gets a list of available disk types by making a list()
* request.
* Returns the specified disk type.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -343,8 +342,7 @@ public final DiskType get(String project, String zone, String diskType) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the specified disk type. Gets a list of available disk types by making a list()
* request.
* Returns the specified disk type.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -374,8 +372,7 @@ public final DiskType get(GetDiskTypeRequest request) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the specified disk type. Gets a list of available disk types by making a list()
* request.
* Returns the specified disk type.
*
* <p>Sample code:
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -748,8 +748,7 @@ public final UnaryCallable<DeleteDiskRequest, Operation> deleteCallable() {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns a specified persistent disk. Gets a list of available persistent disks by making a
* list() request.
* Returns the specified persistent disk.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -780,8 +779,7 @@ public final Disk get(String project, String zone, String disk) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns a specified persistent disk. Gets a list of available persistent disks by making a
* list() request.
* Returns the specified persistent disk.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -811,8 +809,7 @@ public final Disk get(GetDiskRequest request) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns a specified persistent disk. Gets a list of available persistent disks by making a
* list() request.
* Returns the specified persistent disk.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -1874,6 +1871,157 @@ public final TestPermissionsResponse testIamPermissions(TestIamPermissionsDiskRe
return stub.testIamPermissionsCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the specified disk with the data included in the request. The update is performed only
* on selected fields included as part of update-mask. Only the following fields can be modified:
* user_license.
*
* <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 (DisksClient disksClient = DisksClient.create()) {
* String project = "project-309310695";
* String zone = "zone3744684";
* String disk = "disk3083677";
* Disk diskResource = Disk.newBuilder().build();
* Operation response = disksClient.updateAsync(project, zone, disk, diskResource).get();
* }
* }</pre>
*
* @param project Project ID for this request.
* @param zone The name of the zone for this request.
* @param disk The disk name for this request.
* @param diskResource The body resource for this request
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture<Operation, Operation> updateAsync(
String project, String zone, String disk, Disk diskResource) {
UpdateDiskRequest request =
UpdateDiskRequest.newBuilder()
.setProject(project)
.setZone(zone)
.setDisk(disk)
.setDiskResource(diskResource)
.build();
return updateAsync(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the specified disk with the data included in the request. The update is performed only
* on selected fields included as part of update-mask. Only the following fields can be modified:
* user_license.
*
* <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 (DisksClient disksClient = DisksClient.create()) {
* UpdateDiskRequest request =
* UpdateDiskRequest.newBuilder()
* .setDisk("disk3083677")
* .setDiskResource(Disk.newBuilder().build())
* .setPaths("paths106438894")
* .setProject("project-309310695")
* .setRequestId("requestId693933066")
* .setUpdateMask("updateMask-296147115")
* .setZone("zone3744684")
* .build();
* Operation response = disksClient.updateAsync(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> updateAsync(UpdateDiskRequest request) {
return updateOperationCallable().futureCall(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the specified disk with the data included in the request. The update is performed only
* on selected fields included as part of update-mask. Only the following fields can be modified:
* user_license.
*
* <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 (DisksClient disksClient = DisksClient.create()) {
* UpdateDiskRequest request =
* UpdateDiskRequest.newBuilder()
* .setDisk("disk3083677")
* .setDiskResource(Disk.newBuilder().build())
* .setPaths("paths106438894")
* .setProject("project-309310695")
* .setRequestId("requestId693933066")
* .setUpdateMask("updateMask-296147115")
* .setZone("zone3744684")
* .build();
* OperationFuture<Operation, Operation> future =
* disksClient.updateOperationCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }</pre>
*/
public final OperationCallable<UpdateDiskRequest, Operation, Operation>
updateOperationCallable() {
return stub.updateOperationCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the specified disk with the data included in the request. The update is performed only
* on selected fields included as part of update-mask. Only the following fields can be modified:
* user_license.
*
* <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 (DisksClient disksClient = DisksClient.create()) {
* UpdateDiskRequest request =
* UpdateDiskRequest.newBuilder()
* .setDisk("disk3083677")
* .setDiskResource(Disk.newBuilder().build())
* .setPaths("paths106438894")
* .setProject("project-309310695")
* .setRequestId("requestId693933066")
* .setUpdateMask("updateMask-296147115")
* .setZone("zone3744684")
* .build();
* ApiFuture<Operation> future = disksClient.updateCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<UpdateDiskRequest, Operation> updateCallable() {
return stub.updateCallable();
}

@Override
public final void close() {
stub.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,16 @@ public UnaryCallSettings<SetLabelsDiskRequest, Operation> setLabelsSettings() {
return ((DisksStubSettings) getStubSettings()).testIamPermissionsSettings();
}

/** Returns the object with the settings used for calls to update. */
public UnaryCallSettings<UpdateDiskRequest, Operation> updateSettings() {
return ((DisksStubSettings) getStubSettings()).updateSettings();
}

/** Returns the object with the settings used for calls to update. */
public OperationCallSettings<UpdateDiskRequest, Operation, Operation> updateOperationSettings() {
return ((DisksStubSettings) getStubSettings()).updateOperationSettings();
}

public static final DisksSettings create(DisksStubSettings stub) throws IOException {
return new DisksSettings.Builder(stub.toBuilder()).build();
}
Expand Down Expand Up @@ -394,6 +404,17 @@ public UnaryCallSettings.Builder<SetLabelsDiskRequest, Operation> setLabelsSetti
return getStubSettingsBuilder().testIamPermissionsSettings();
}

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

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

@Override
public DisksSettings build() throws IOException {
return new DisksSettings(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1376,7 +1376,9 @@ public final FirewallPoliciesListAssociationsResponse listAssociations(
* }</pre>
*
* @param firewallPolicy Name of the firewall policy to update.
* @param parentId The new parent of the firewall policy.
* @param parentId The new parent of the firewall policy. The ID can be either be
* "folders/[FOLDER_ID]" if the parent is a folder or "organizations/[ORGANIZATION_ID]" if the
* parent is an organization.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture<Operation, Operation> moveAsync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,7 @@ public final UnaryCallable<DeleteGlobalAddressRequest, Operation> deleteCallable

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the specified address resource. Gets a list of available addresses by making a list()
* request.
* Returns the specified address resource.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -318,8 +317,7 @@ public final Address get(String project, String address) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the specified address resource. Gets a list of available addresses by making a list()
* request.
* Returns the specified address resource.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -348,8 +346,7 @@ public final Address get(GetGlobalAddressRequest request) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the specified address resource. Gets a list of available addresses by making a list()
* request.
* Returns the specified address resource.
*
* <p>Sample code:
*
Expand Down
Loading