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 20220831 (#729) #8401

Merged
merged 4 commits into from
Sep 20, 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
4 changes: 2 additions & 2 deletions java-compute/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ If you are using Maven, add this to your pom.xml file:
If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-compute:1.12.0'
implementation 'com.google.cloud:google-cloud-compute:1.12.1'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-compute" % "1.12.0"
libraryDependencies += "com.google.cloud" % "google-cloud-compute" % "1.12.1"
```

## Authentication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,155 @@ public final UnaryCallable<ListAddressesRequest, AddressList> listCallable() {
return stub.listCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Sets the labels on an Address. To learn more about labels, read the Labeling Resources
* documentation.
*
* <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 resource = "resource-341064690";
* RegionSetLabelsRequest regionSetLabelsRequestResource =
* RegionSetLabelsRequest.newBuilder().build();
* Operation response =
* addressesClient
* .setLabelsAsync(project, region, resource, regionSetLabelsRequestResource)
* .get();
* }
* }</pre>
*
* @param project Project ID for this request.
* @param region The region for this request.
* @param resource Name or id of the resource for this request.
* @param regionSetLabelsRequestResource The body resource for this request
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture<Operation, Operation> setLabelsAsync(
String project,
String region,
String resource,
RegionSetLabelsRequest regionSetLabelsRequestResource) {
SetLabelsAddressRequest request =
SetLabelsAddressRequest.newBuilder()
.setProject(project)
.setRegion(region)
.setResource(resource)
.setRegionSetLabelsRequestResource(regionSetLabelsRequestResource)
.build();
return setLabelsAsync(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Sets the labels on an Address. To learn more about labels, read the Labeling Resources
* documentation.
*
* <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()) {
* SetLabelsAddressRequest request =
* SetLabelsAddressRequest.newBuilder()
* .setProject("project-309310695")
* .setRegion("region-934795532")
* .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build())
* .setRequestId("requestId693933066")
* .setResource("resource-341064690")
* .build();
* Operation response = addressesClient.setLabelsAsync(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> setLabelsAsync(
SetLabelsAddressRequest request) {
return setLabelsOperationCallable().futureCall(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Sets the labels on an Address. To learn more about labels, read the Labeling Resources
* documentation.
*
* <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()) {
* SetLabelsAddressRequest request =
* SetLabelsAddressRequest.newBuilder()
* .setProject("project-309310695")
* .setRegion("region-934795532")
* .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build())
* .setRequestId("requestId693933066")
* .setResource("resource-341064690")
* .build();
* OperationFuture<Operation, Operation> future =
* addressesClient.setLabelsOperationCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }</pre>
*/
public final OperationCallable<SetLabelsAddressRequest, Operation, Operation>
setLabelsOperationCallable() {
return stub.setLabelsOperationCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Sets the labels on an Address. To learn more about labels, read the Labeling Resources
* documentation.
*
* <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()) {
* SetLabelsAddressRequest request =
* SetLabelsAddressRequest.newBuilder()
* .setProject("project-309310695")
* .setRegion("region-934795532")
* .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build())
* .setRequestId("requestId693933066")
* .setResource("resource-341064690")
* .build();
* ApiFuture<Operation> future = addressesClient.setLabelsCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<SetLabelsAddressRequest, Operation> setLabelsCallable() {
return stub.setLabelsCallable();
}

@Override
public final void close() {
stub.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,17 @@ public PagedCallSettings<ListAddressesRequest, AddressList, ListPagedResponse> l
return ((AddressesStubSettings) getStubSettings()).listSettings();
}

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

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

public static final AddressesSettings create(AddressesStubSettings stub) throws IOException {
return new AddressesSettings.Builder(stub.toBuilder()).build();
}
Expand Down Expand Up @@ -248,6 +259,17 @@ public UnaryCallSettings.Builder<InsertAddressRequest, Operation> insertSettings
return getStubSettingsBuilder().listSettings();
}

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

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

@Override
public AddressesSettings build() throws IOException {
return new AddressesSettings(this);
Expand Down
Loading