Skip to content

Commit

Permalink
feat: [compute] Update Compute Engine API to revision 20221101 (#751) (
Browse files Browse the repository at this point in the history
…#8825)

- [ ] Regenerate this pull request now.

Source-Link: https://togithub.com/googleapis/googleapis/commit/b0432a10aa2a0697ea4229763819f5e7dcf96210

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/18b7021487c4a1e9427b61b1f2185a32c733c340
Copy-Tag: eyJwIjoiamF2YS1jb21wdXRlLy5Pd2xCb3QueWFtbCIsImgiOiIxOGI3MDIxNDg3YzRhMWU5NDI3YjYxYjFmMjE4NWEzMmM3MzNjMzQwIn0=
  • Loading branch information
gcf-owl-bot[bot] authored Nov 20, 2022
1 parent d07adff commit 0683411
Show file tree
Hide file tree
Showing 38 changed files with 21,064 additions and 14,559 deletions.
32 changes: 16 additions & 16 deletions java-compute/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-compute</artifactId>
<version>1.14.0</version>
<version>1.16.0</version>
</dependency>
```

If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-compute:1.14.0'
implementation 'com.google.cloud:google-cloud-compute:1.16.0'
```

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

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-compute" % "1.14.0"
libraryDependencies += "com.google.cloud" % "google-cloud-compute" % "1.16.0"
```

## Authentication
Expand Down Expand Up @@ -224,16 +224,16 @@ Java is a registered trademark of Oracle and/or its affiliates.

[product-docs]: https://cloud.google.com/compute/
[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-compute/latest/overview
[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-compute/java7.svg
[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-compute/java7.html
[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-compute/java8.svg
[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-compute/java8.html
[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-compute/java8-osx.svg
[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-compute/java8-osx.html
[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-compute/java8-win.svg
[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-compute/java8-win.html
[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-compute/java11.svg
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-compute/java11.html
[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.svg
[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.html
[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.svg
[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.html
[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.svg
[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.html
[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.svg
[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.html
[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.svg
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-compute.svg
[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-compute&core=gav
Expand All @@ -245,9 +245,9 @@ Java is a registered trademark of Oracle and/or its affiliates.
[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects
[cloud-sdk]: https://cloud.google.com/sdk/
[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting
[contributing]: https://github.com/googleapis/java-compute/blob/main/CONTRIBUTING.md
[code-of-conduct]: https://github.com/googleapis/java-compute/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
[license]: https://github.com/googleapis/java-compute/blob/main/LICENSE
[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md
[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
[license]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE
[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing
[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=compute.googleapis.com
[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import com.google.common.util.concurrent.MoreExecutors;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

Expand Down Expand Up @@ -164,6 +165,159 @@ public TargetTcpProxiesStub getStub() {
return stub;
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Retrieves the list of all TargetTcpProxy resources, regional and global, available to the
* specified project.
*
* <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 (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) {
* String project = "project-309310695";
* for (Map.Entry<String, TargetTcpProxiesScopedList> element :
* targetTcpProxiesClient.aggregatedList(project).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }</pre>
*
* @param project Name of the project scoping this request.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final AggregatedListPagedResponse aggregatedList(String project) {
AggregatedListTargetTcpProxiesRequest request =
AggregatedListTargetTcpProxiesRequest.newBuilder().setProject(project).build();
return aggregatedList(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Retrieves the list of all TargetTcpProxy resources, regional and global, available to the
* specified project.
*
* <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 (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) {
* AggregatedListTargetTcpProxiesRequest request =
* AggregatedListTargetTcpProxiesRequest.newBuilder()
* .setFilter("filter-1274492040")
* .setIncludeAllScopes(true)
* .setMaxResults(1128457243)
* .setOrderBy("orderBy-1207110587")
* .setPageToken("pageToken873572522")
* .setProject("project-309310695")
* .setReturnPartialSuccess(true)
* .build();
* for (Map.Entry<String, TargetTcpProxiesScopedList> element :
* targetTcpProxiesClient.aggregatedList(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }</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 AggregatedListPagedResponse aggregatedList(
AggregatedListTargetTcpProxiesRequest request) {
return aggregatedListPagedCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Retrieves the list of all TargetTcpProxy resources, regional and global, available to the
* specified project.
*
* <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 (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) {
* AggregatedListTargetTcpProxiesRequest request =
* AggregatedListTargetTcpProxiesRequest.newBuilder()
* .setFilter("filter-1274492040")
* .setIncludeAllScopes(true)
* .setMaxResults(1128457243)
* .setOrderBy("orderBy-1207110587")
* .setPageToken("pageToken873572522")
* .setProject("project-309310695")
* .setReturnPartialSuccess(true)
* .build();
* ApiFuture<Map.Entry<String, TargetTcpProxiesScopedList>> future =
* targetTcpProxiesClient.aggregatedListPagedCallable().futureCall(request);
* // Do something.
* for (Map.Entry<String, TargetTcpProxiesScopedList> element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }</pre>
*/
public final UnaryCallable<AggregatedListTargetTcpProxiesRequest, AggregatedListPagedResponse>
aggregatedListPagedCallable() {
return stub.aggregatedListPagedCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Retrieves the list of all TargetTcpProxy resources, regional and global, available to the
* specified project.
*
* <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 (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) {
* AggregatedListTargetTcpProxiesRequest request =
* AggregatedListTargetTcpProxiesRequest.newBuilder()
* .setFilter("filter-1274492040")
* .setIncludeAllScopes(true)
* .setMaxResults(1128457243)
* .setOrderBy("orderBy-1207110587")
* .setPageToken("pageToken873572522")
* .setProject("project-309310695")
* .setReturnPartialSuccess(true)
* .build();
* while (true) {
* TargetTcpProxyAggregatedList response =
* targetTcpProxiesClient.aggregatedListCallable().call(request);
* for (Map.Entry<String, TargetTcpProxiesScopedList> element : response.getItemsList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
* if (!Strings.isNullOrEmpty(nextPageToken)) {
* request = request.toBuilder().setPageToken(nextPageToken).build();
* } else {
* break;
* }
* }
* }
* }</pre>
*/
public final UnaryCallable<AggregatedListTargetTcpProxiesRequest, TargetTcpProxyAggregatedList>
aggregatedListCallable() {
return stub.aggregatedListCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes the specified TargetTcpProxy resource.
Expand Down Expand Up @@ -974,6 +1128,101 @@ public boolean awaitTermination(long duration, TimeUnit unit) throws Interrupted
return stub.awaitTermination(duration, unit);
}

public static class AggregatedListPagedResponse
extends AbstractPagedListResponse<
AggregatedListTargetTcpProxiesRequest,
TargetTcpProxyAggregatedList,
Map.Entry<String, TargetTcpProxiesScopedList>,
AggregatedListPage,
AggregatedListFixedSizeCollection> {

public static ApiFuture<AggregatedListPagedResponse> createAsync(
PageContext<
AggregatedListTargetTcpProxiesRequest,
TargetTcpProxyAggregatedList,
Map.Entry<String, TargetTcpProxiesScopedList>>
context,
ApiFuture<TargetTcpProxyAggregatedList> futureResponse) {
ApiFuture<AggregatedListPage> futurePage =
AggregatedListPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
input -> new AggregatedListPagedResponse(input),
MoreExecutors.directExecutor());
}

private AggregatedListPagedResponse(AggregatedListPage page) {
super(page, AggregatedListFixedSizeCollection.createEmptyCollection());
}
}

public static class AggregatedListPage
extends AbstractPage<
AggregatedListTargetTcpProxiesRequest,
TargetTcpProxyAggregatedList,
Map.Entry<String, TargetTcpProxiesScopedList>,
AggregatedListPage> {

private AggregatedListPage(
PageContext<
AggregatedListTargetTcpProxiesRequest,
TargetTcpProxyAggregatedList,
Map.Entry<String, TargetTcpProxiesScopedList>>
context,
TargetTcpProxyAggregatedList response) {
super(context, response);
}

private static AggregatedListPage createEmptyPage() {
return new AggregatedListPage(null, null);
}

@Override
protected AggregatedListPage createPage(
PageContext<
AggregatedListTargetTcpProxiesRequest,
TargetTcpProxyAggregatedList,
Map.Entry<String, TargetTcpProxiesScopedList>>
context,
TargetTcpProxyAggregatedList response) {
return new AggregatedListPage(context, response);
}

@Override
public ApiFuture<AggregatedListPage> createPageAsync(
PageContext<
AggregatedListTargetTcpProxiesRequest,
TargetTcpProxyAggregatedList,
Map.Entry<String, TargetTcpProxiesScopedList>>
context,
ApiFuture<TargetTcpProxyAggregatedList> futureResponse) {
return super.createPageAsync(context, futureResponse);
}
}

public static class AggregatedListFixedSizeCollection
extends AbstractFixedSizeCollection<
AggregatedListTargetTcpProxiesRequest,
TargetTcpProxyAggregatedList,
Map.Entry<String, TargetTcpProxiesScopedList>,
AggregatedListPage,
AggregatedListFixedSizeCollection> {

private AggregatedListFixedSizeCollection(List<AggregatedListPage> pages, int collectionSize) {
super(pages, collectionSize);
}

private static AggregatedListFixedSizeCollection createEmptyCollection() {
return new AggregatedListFixedSizeCollection(null, 0);
}

@Override
protected AggregatedListFixedSizeCollection createCollection(
List<AggregatedListPage> pages, int collectionSize) {
return new AggregatedListFixedSizeCollection(pages, collectionSize);
}
}

public static class ListPagedResponse
extends AbstractPagedListResponse<
ListTargetTcpProxiesRequest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package com.google.cloud.compute.v1;

import static com.google.cloud.compute.v1.TargetTcpProxiesClient.AggregatedListPagedResponse;
import static com.google.cloud.compute.v1.TargetTcpProxiesClient.ListPagedResponse;

import com.google.api.core.ApiFunction;
Expand Down Expand Up @@ -72,6 +73,15 @@
@Generated("by gapic-generator-java")
public class TargetTcpProxiesSettings extends ClientSettings<TargetTcpProxiesSettings> {

/** Returns the object with the settings used for calls to aggregatedList. */
public PagedCallSettings<
AggregatedListTargetTcpProxiesRequest,
TargetTcpProxyAggregatedList,
AggregatedListPagedResponse>
aggregatedListSettings() {
return ((TargetTcpProxiesStubSettings) getStubSettings()).aggregatedListSettings();
}

/** Returns the object with the settings used for calls to delete. */
public UnaryCallSettings<DeleteTargetTcpProxyRequest, Operation> deleteSettings() {
return ((TargetTcpProxiesStubSettings) getStubSettings()).deleteSettings();
Expand Down Expand Up @@ -227,6 +237,15 @@ public Builder applyToAllUnaryMethods(
return this;
}

/** Returns the builder for the settings used for calls to aggregatedList. */
public PagedCallSettings.Builder<
AggregatedListTargetTcpProxiesRequest,
TargetTcpProxyAggregatedList,
AggregatedListPagedResponse>
aggregatedListSettings() {
return getStubSettingsBuilder().aggregatedListSettings();
}

/** Returns the builder for the settings used for calls to delete. */
public UnaryCallSettings.Builder<DeleteTargetTcpProxyRequest, Operation> deleteSettings() {
return getStubSettingsBuilder().deleteSettings();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2611,6 +2611,9 @@
"grpc": {
"libraryClient": "TargetTcpProxiesClient",
"rpcs": {
"AggregatedList": {
"methods": ["aggregatedList", "aggregatedList", "aggregatedListPagedCallable", "aggregatedListCallable"]
},
"Delete": {
"methods": ["deleteAsync", "deleteAsync", "deleteOperationCallable", "deleteCallable"]
},
Expand Down
Loading

0 comments on commit 0683411

Please sign in to comment.