Skip to content

Commit 0683411

Browse files
feat: [compute] Update Compute Engine API to revision 20221101 (googleapis#751) (googleapis#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=
1 parent d07adff commit 0683411

38 files changed

Lines changed: 21064 additions & 14559 deletions

java-compute/README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
1919
<dependency>
2020
<groupId>com.google.cloud</groupId>
2121
<artifactId>google-cloud-compute</artifactId>
22-
<version>1.14.0</version>
22+
<version>1.16.0</version>
2323
</dependency>
2424
```
2525

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

2828
```Groovy
29-
implementation 'com.google.cloud:google-cloud-compute:1.14.0'
29+
implementation 'com.google.cloud:google-cloud-compute:1.16.0'
3030
```
3131

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

3434
```Scala
35-
libraryDependencies += "com.google.cloud" % "google-cloud-compute" % "1.14.0"
35+
libraryDependencies += "com.google.cloud" % "google-cloud-compute" % "1.16.0"
3636
```
3737

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

225225
[product-docs]: https://cloud.google.com/compute/
226226
[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-compute/latest/overview
227-
[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-compute/java7.svg
228-
[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-compute/java7.html
229-
[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-compute/java8.svg
230-
[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-compute/java8.html
231-
[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-compute/java8-osx.svg
232-
[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-compute/java8-osx.html
233-
[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-compute/java8-win.svg
234-
[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-compute/java8-win.html
235-
[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-compute/java11.svg
236-
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-compute/java11.html
227+
[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.svg
228+
[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.html
229+
[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.svg
230+
[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.html
231+
[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.svg
232+
[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.html
233+
[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.svg
234+
[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.html
235+
[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.svg
236+
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
237237
[stability-image]: https://img.shields.io/badge/stability-stable-green
238238
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-compute.svg
239239
[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-compute&core=gav
@@ -245,9 +245,9 @@ Java is a registered trademark of Oracle and/or its affiliates.
245245
[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects
246246
[cloud-sdk]: https://cloud.google.com/sdk/
247247
[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting
248-
[contributing]: https://github.com/googleapis/java-compute/blob/main/CONTRIBUTING.md
249-
[code-of-conduct]: https://github.com/googleapis/java-compute/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
250-
[license]: https://github.com/googleapis/java-compute/blob/main/LICENSE
248+
[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md
249+
[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
250+
[license]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE
251251
[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing
252252
[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=compute.googleapis.com
253253
[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM

java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetTcpProxiesClient.java

Lines changed: 249 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import com.google.common.util.concurrent.MoreExecutors;
3333
import java.io.IOException;
3434
import java.util.List;
35+
import java.util.Map;
3536
import java.util.concurrent.TimeUnit;
3637
import javax.annotation.Generated;
3738

@@ -164,6 +165,159 @@ public TargetTcpProxiesStub getStub() {
164165
return stub;
165166
}
166167

168+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
169+
/**
170+
* Retrieves the list of all TargetTcpProxy resources, regional and global, available to the
171+
* specified project.
172+
*
173+
* <p>Sample code:
174+
*
175+
* <pre>{@code
176+
* // This snippet has been automatically generated and should be regarded as a code template only.
177+
* // It will require modifications to work:
178+
* // - It may require correct/in-range values for request initialization.
179+
* // - It may require specifying regional endpoints when creating the service client as shown in
180+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
181+
* try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) {
182+
* String project = "project-309310695";
183+
* for (Map.Entry<String, TargetTcpProxiesScopedList> element :
184+
* targetTcpProxiesClient.aggregatedList(project).iterateAll()) {
185+
* // doThingsWith(element);
186+
* }
187+
* }
188+
* }</pre>
189+
*
190+
* @param project Name of the project scoping this request.
191+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
192+
*/
193+
public final AggregatedListPagedResponse aggregatedList(String project) {
194+
AggregatedListTargetTcpProxiesRequest request =
195+
AggregatedListTargetTcpProxiesRequest.newBuilder().setProject(project).build();
196+
return aggregatedList(request);
197+
}
198+
199+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
200+
/**
201+
* Retrieves the list of all TargetTcpProxy resources, regional and global, available to the
202+
* specified project.
203+
*
204+
* <p>Sample code:
205+
*
206+
* <pre>{@code
207+
* // This snippet has been automatically generated and should be regarded as a code template only.
208+
* // It will require modifications to work:
209+
* // - It may require correct/in-range values for request initialization.
210+
* // - It may require specifying regional endpoints when creating the service client as shown in
211+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
212+
* try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) {
213+
* AggregatedListTargetTcpProxiesRequest request =
214+
* AggregatedListTargetTcpProxiesRequest.newBuilder()
215+
* .setFilter("filter-1274492040")
216+
* .setIncludeAllScopes(true)
217+
* .setMaxResults(1128457243)
218+
* .setOrderBy("orderBy-1207110587")
219+
* .setPageToken("pageToken873572522")
220+
* .setProject("project-309310695")
221+
* .setReturnPartialSuccess(true)
222+
* .build();
223+
* for (Map.Entry<String, TargetTcpProxiesScopedList> element :
224+
* targetTcpProxiesClient.aggregatedList(request).iterateAll()) {
225+
* // doThingsWith(element);
226+
* }
227+
* }
228+
* }</pre>
229+
*
230+
* @param request The request object containing all of the parameters for the API call.
231+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
232+
*/
233+
public final AggregatedListPagedResponse aggregatedList(
234+
AggregatedListTargetTcpProxiesRequest request) {
235+
return aggregatedListPagedCallable().call(request);
236+
}
237+
238+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
239+
/**
240+
* Retrieves the list of all TargetTcpProxy resources, regional and global, available to the
241+
* specified project.
242+
*
243+
* <p>Sample code:
244+
*
245+
* <pre>{@code
246+
* // This snippet has been automatically generated and should be regarded as a code template only.
247+
* // It will require modifications to work:
248+
* // - It may require correct/in-range values for request initialization.
249+
* // - It may require specifying regional endpoints when creating the service client as shown in
250+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
251+
* try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) {
252+
* AggregatedListTargetTcpProxiesRequest request =
253+
* AggregatedListTargetTcpProxiesRequest.newBuilder()
254+
* .setFilter("filter-1274492040")
255+
* .setIncludeAllScopes(true)
256+
* .setMaxResults(1128457243)
257+
* .setOrderBy("orderBy-1207110587")
258+
* .setPageToken("pageToken873572522")
259+
* .setProject("project-309310695")
260+
* .setReturnPartialSuccess(true)
261+
* .build();
262+
* ApiFuture<Map.Entry<String, TargetTcpProxiesScopedList>> future =
263+
* targetTcpProxiesClient.aggregatedListPagedCallable().futureCall(request);
264+
* // Do something.
265+
* for (Map.Entry<String, TargetTcpProxiesScopedList> element : future.get().iterateAll()) {
266+
* // doThingsWith(element);
267+
* }
268+
* }
269+
* }</pre>
270+
*/
271+
public final UnaryCallable<AggregatedListTargetTcpProxiesRequest, AggregatedListPagedResponse>
272+
aggregatedListPagedCallable() {
273+
return stub.aggregatedListPagedCallable();
274+
}
275+
276+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
277+
/**
278+
* Retrieves the list of all TargetTcpProxy resources, regional and global, available to the
279+
* specified project.
280+
*
281+
* <p>Sample code:
282+
*
283+
* <pre>{@code
284+
* // This snippet has been automatically generated and should be regarded as a code template only.
285+
* // It will require modifications to work:
286+
* // - It may require correct/in-range values for request initialization.
287+
* // - It may require specifying regional endpoints when creating the service client as shown in
288+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
289+
* try (TargetTcpProxiesClient targetTcpProxiesClient = TargetTcpProxiesClient.create()) {
290+
* AggregatedListTargetTcpProxiesRequest request =
291+
* AggregatedListTargetTcpProxiesRequest.newBuilder()
292+
* .setFilter("filter-1274492040")
293+
* .setIncludeAllScopes(true)
294+
* .setMaxResults(1128457243)
295+
* .setOrderBy("orderBy-1207110587")
296+
* .setPageToken("pageToken873572522")
297+
* .setProject("project-309310695")
298+
* .setReturnPartialSuccess(true)
299+
* .build();
300+
* while (true) {
301+
* TargetTcpProxyAggregatedList response =
302+
* targetTcpProxiesClient.aggregatedListCallable().call(request);
303+
* for (Map.Entry<String, TargetTcpProxiesScopedList> element : response.getItemsList()) {
304+
* // doThingsWith(element);
305+
* }
306+
* String nextPageToken = response.getNextPageToken();
307+
* if (!Strings.isNullOrEmpty(nextPageToken)) {
308+
* request = request.toBuilder().setPageToken(nextPageToken).build();
309+
* } else {
310+
* break;
311+
* }
312+
* }
313+
* }
314+
* }</pre>
315+
*/
316+
public final UnaryCallable<AggregatedListTargetTcpProxiesRequest, TargetTcpProxyAggregatedList>
317+
aggregatedListCallable() {
318+
return stub.aggregatedListCallable();
319+
}
320+
167321
// AUTO-GENERATED DOCUMENTATION AND METHOD.
168322
/**
169323
* Deletes the specified TargetTcpProxy resource.
@@ -974,6 +1128,101 @@ public boolean awaitTermination(long duration, TimeUnit unit) throws Interrupted
9741128
return stub.awaitTermination(duration, unit);
9751129
}
9761130

1131+
public static class AggregatedListPagedResponse
1132+
extends AbstractPagedListResponse<
1133+
AggregatedListTargetTcpProxiesRequest,
1134+
TargetTcpProxyAggregatedList,
1135+
Map.Entry<String, TargetTcpProxiesScopedList>,
1136+
AggregatedListPage,
1137+
AggregatedListFixedSizeCollection> {
1138+
1139+
public static ApiFuture<AggregatedListPagedResponse> createAsync(
1140+
PageContext<
1141+
AggregatedListTargetTcpProxiesRequest,
1142+
TargetTcpProxyAggregatedList,
1143+
Map.Entry<String, TargetTcpProxiesScopedList>>
1144+
context,
1145+
ApiFuture<TargetTcpProxyAggregatedList> futureResponse) {
1146+
ApiFuture<AggregatedListPage> futurePage =
1147+
AggregatedListPage.createEmptyPage().createPageAsync(context, futureResponse);
1148+
return ApiFutures.transform(
1149+
futurePage,
1150+
input -> new AggregatedListPagedResponse(input),
1151+
MoreExecutors.directExecutor());
1152+
}
1153+
1154+
private AggregatedListPagedResponse(AggregatedListPage page) {
1155+
super(page, AggregatedListFixedSizeCollection.createEmptyCollection());
1156+
}
1157+
}
1158+
1159+
public static class AggregatedListPage
1160+
extends AbstractPage<
1161+
AggregatedListTargetTcpProxiesRequest,
1162+
TargetTcpProxyAggregatedList,
1163+
Map.Entry<String, TargetTcpProxiesScopedList>,
1164+
AggregatedListPage> {
1165+
1166+
private AggregatedListPage(
1167+
PageContext<
1168+
AggregatedListTargetTcpProxiesRequest,
1169+
TargetTcpProxyAggregatedList,
1170+
Map.Entry<String, TargetTcpProxiesScopedList>>
1171+
context,
1172+
TargetTcpProxyAggregatedList response) {
1173+
super(context, response);
1174+
}
1175+
1176+
private static AggregatedListPage createEmptyPage() {
1177+
return new AggregatedListPage(null, null);
1178+
}
1179+
1180+
@Override
1181+
protected AggregatedListPage createPage(
1182+
PageContext<
1183+
AggregatedListTargetTcpProxiesRequest,
1184+
TargetTcpProxyAggregatedList,
1185+
Map.Entry<String, TargetTcpProxiesScopedList>>
1186+
context,
1187+
TargetTcpProxyAggregatedList response) {
1188+
return new AggregatedListPage(context, response);
1189+
}
1190+
1191+
@Override
1192+
public ApiFuture<AggregatedListPage> createPageAsync(
1193+
PageContext<
1194+
AggregatedListTargetTcpProxiesRequest,
1195+
TargetTcpProxyAggregatedList,
1196+
Map.Entry<String, TargetTcpProxiesScopedList>>
1197+
context,
1198+
ApiFuture<TargetTcpProxyAggregatedList> futureResponse) {
1199+
return super.createPageAsync(context, futureResponse);
1200+
}
1201+
}
1202+
1203+
public static class AggregatedListFixedSizeCollection
1204+
extends AbstractFixedSizeCollection<
1205+
AggregatedListTargetTcpProxiesRequest,
1206+
TargetTcpProxyAggregatedList,
1207+
Map.Entry<String, TargetTcpProxiesScopedList>,
1208+
AggregatedListPage,
1209+
AggregatedListFixedSizeCollection> {
1210+
1211+
private AggregatedListFixedSizeCollection(List<AggregatedListPage> pages, int collectionSize) {
1212+
super(pages, collectionSize);
1213+
}
1214+
1215+
private static AggregatedListFixedSizeCollection createEmptyCollection() {
1216+
return new AggregatedListFixedSizeCollection(null, 0);
1217+
}
1218+
1219+
@Override
1220+
protected AggregatedListFixedSizeCollection createCollection(
1221+
List<AggregatedListPage> pages, int collectionSize) {
1222+
return new AggregatedListFixedSizeCollection(pages, collectionSize);
1223+
}
1224+
}
1225+
9771226
public static class ListPagedResponse
9781227
extends AbstractPagedListResponse<
9791228
ListTargetTcpProxiesRequest,

java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/TargetTcpProxiesSettings.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package com.google.cloud.compute.v1;
1818

19+
import static com.google.cloud.compute.v1.TargetTcpProxiesClient.AggregatedListPagedResponse;
1920
import static com.google.cloud.compute.v1.TargetTcpProxiesClient.ListPagedResponse;
2021

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

76+
/** Returns the object with the settings used for calls to aggregatedList. */
77+
public PagedCallSettings<
78+
AggregatedListTargetTcpProxiesRequest,
79+
TargetTcpProxyAggregatedList,
80+
AggregatedListPagedResponse>
81+
aggregatedListSettings() {
82+
return ((TargetTcpProxiesStubSettings) getStubSettings()).aggregatedListSettings();
83+
}
84+
7585
/** Returns the object with the settings used for calls to delete. */
7686
public UnaryCallSettings<DeleteTargetTcpProxyRequest, Operation> deleteSettings() {
7787
return ((TargetTcpProxiesStubSettings) getStubSettings()).deleteSettings();
@@ -227,6 +237,15 @@ public Builder applyToAllUnaryMethods(
227237
return this;
228238
}
229239

240+
/** Returns the builder for the settings used for calls to aggregatedList. */
241+
public PagedCallSettings.Builder<
242+
AggregatedListTargetTcpProxiesRequest,
243+
TargetTcpProxyAggregatedList,
244+
AggregatedListPagedResponse>
245+
aggregatedListSettings() {
246+
return getStubSettingsBuilder().aggregatedListSettings();
247+
}
248+
230249
/** Returns the builder for the settings used for calls to delete. */
231250
public UnaryCallSettings.Builder<DeleteTargetTcpProxyRequest, Operation> deleteSettings() {
232251
return getStubSettingsBuilder().deleteSettings();

java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/gapic_metadata.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2611,6 +2611,9 @@
26112611
"grpc": {
26122612
"libraryClient": "TargetTcpProxiesClient",
26132613
"rpcs": {
2614+
"AggregatedList": {
2615+
"methods": ["aggregatedList", "aggregatedList", "aggregatedListPagedCallable", "aggregatedListCallable"]
2616+
},
26142617
"Delete": {
26152618
"methods": ["deleteAsync", "deleteAsync", "deleteOperationCallable", "deleteCallable"]
26162619
},

0 commit comments

Comments
 (0)