Skip to content

Commit 8731c33

Browse files
fix: update gapic-generator-java with mock service generation fixes (googleapis#833)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 457524730 Source-Link: googleapis/googleapis@917e7f2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/2497f9a069d3f6b2d6810d5a4e239cda1e7e5a39 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjQ5N2Y5YTA2OWQzZjZiMmQ2ODEwZDVhNGUyMzljZGExZTdlNWEzOSJ9 feat: Enable REST transport for most of Java and Go clients PiperOrigin-RevId: 456641589 Source-Link: googleapis/googleapis@8a251f5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/4ca52a529cf01308d9714950edffbea3560cfbdb Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGNhNTJhNTI5Y2YwMTMwOGQ5NzE0OTUwZWRmZmJlYTM1NjBjZmJkYiJ9 chore: Integrate new gapic-generator-java and rules_gapic PiperOrigin-RevId: 454027580 Source-Link: googleapis/googleapis@1b22277 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e04cea20d0d12eb5c3bdb360a9e72b654edcb638 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTA0Y2VhMjBkMGQxMmViNWMzYmRiMzYwYTllNzJiNjU0ZWRjYjYzOCJ9 chore(deps): upgrade gapic-generator-java to 2.8.0 and update gax-java to 2.18.1 PiperOrigin-RevId: 450543911 Source-Link: googleapis/googleapis@5528344 Source-Link: https://github.com/googleapis/googleapis-gen/commit/9f6775cab1958982b88967a43e5e806af0f135db Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOWY2Nzc1Y2FiMTk1ODk4MmI4ODk2N2E0M2U1ZTgwNmFmMGYxMzVkYiJ9 chore(deps): upgrade gapic-generator-java to 2.7.0 and update gax-java to 2.16.0 PiperOrigin-RevId: 446250659 Source-Link: googleapis/googleapis@dc4ef31 Source-Link: https://github.com/googleapis/googleapis-gen/commit/5fdda4ddfbab87998e77e4a453e0ff87986d2db8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNWZkZGE0ZGRmYmFiODc5OThlNzdlNGE0NTNlMGZmODc5ODZkMmRiOCJ9 chore(bazel): update version of Protobuf to v3.20.1 PiperOrigin-RevId: 444328399 Source-Link: googleapis/googleapis@c7ca416 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d61705453a62b3ecda78aa30c192840ebc5a8a90 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDYxNzA1NDUzYTYyYjNlY2RhNzhhYTMwYzE5Mjg0MGViYzVhOGE5MCJ9 fix: Move `yarn_config` into a `oneof` Committer: @Harwayne PiperOrigin-RevId: 440226213 Source-Link: googleapis/googleapis@c782e45 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d45c242ee81ffcbbb9eb985318ce897ac0d778af Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDQ1YzI0MmVlODFmZmNiYmI5ZWI5ODUzMThjZTg5N2FjMGQ3NzhhZiJ9 fix!: Remove `temp_bucket` from VirtualClusterConfig, as its value was not used Committer: @Harwayne PiperOrigin-RevId: 440224385 Source-Link: googleapis/googleapis@afc5066 Source-Link: https://github.com/googleapis/googleapis-gen/commit/07cf54aa66638cb92e2db6a6624cb3da9929740a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDdjZjU0YWE2NjYzOGNiOTJlMmRiNmE2NjI0Y2IzZGE5OTI5NzQwYSJ9
1 parent 89eaa4f commit 8731c33

370 files changed

Lines changed: 15991 additions & 1286 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

java-dataproc/google-cloud-dataproc/pom.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@
5858
<groupId>com.google.api</groupId>
5959
<artifactId>gax-grpc</artifactId>
6060
</dependency>
61+
<dependency>
62+
<groupId>com.google.api</groupId>
63+
<artifactId>gax-httpjson</artifactId>
64+
</dependency>
6165
<dependency>
6266
<groupId>org.threeten</groupId>
6367
<artifactId>threetenbp</artifactId>
@@ -81,12 +85,24 @@
8185
<scope>test</scope>
8286
</dependency>
8387
<!-- Need testing utility classes for generated gRPC clients tests -->
88+
<dependency>
89+
<groupId>com.google.api</groupId>
90+
<artifactId>gax</artifactId>
91+
<classifier>testlib</classifier>
92+
<scope>test</scope>
93+
</dependency>
8494
<dependency>
8595
<groupId>com.google.api</groupId>
8696
<artifactId>gax-grpc</artifactId>
8797
<classifier>testlib</classifier>
8898
<scope>test</scope>
8999
</dependency>
100+
<dependency>
101+
<groupId>com.google.api</groupId>
102+
<artifactId>gax-httpjson</artifactId>
103+
<classifier>testlib</classifier>
104+
<scope>test</scope>
105+
</dependency>
90106
</dependencies>
91107

92108
<profiles>

java-dataproc/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceClient.java

Lines changed: 67 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2021 Google LLC
2+
* Copyright 2022 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -18,7 +18,6 @@
1818

1919
import com.google.api.core.ApiFuture;
2020
import com.google.api.core.ApiFutures;
21-
import com.google.api.core.BetaApi;
2221
import com.google.api.gax.core.BackgroundResource;
2322
import com.google.api.gax.paging.AbstractFixedSizeCollection;
2423
import com.google.api.gax.paging.AbstractPage;
@@ -42,6 +41,8 @@
4241
* calls that map to API methods. Sample code to get started:
4342
*
4443
* <pre>{@code
44+
* // This snippet has been automatically generated for illustrative purposes only.
45+
* // It may require modifications to work in your environment.
4546
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
4647
* AutoscalingPolicyServiceClient.create()) {
4748
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
@@ -81,6 +82,8 @@
8182
* <p>To customize credentials:
8283
*
8384
* <pre>{@code
85+
* // This snippet has been automatically generated for illustrative purposes only.
86+
* // It may require modifications to work in your environment.
8487
* AutoscalingPolicyServiceSettings autoscalingPolicyServiceSettings =
8588
* AutoscalingPolicyServiceSettings.newBuilder()
8689
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -92,12 +95,29 @@
9295
* <p>To customize the endpoint:
9396
*
9497
* <pre>{@code
98+
* // This snippet has been automatically generated for illustrative purposes only.
99+
* // It may require modifications to work in your environment.
95100
* AutoscalingPolicyServiceSettings autoscalingPolicyServiceSettings =
96101
* AutoscalingPolicyServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
97102
* AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
98103
* AutoscalingPolicyServiceClient.create(autoscalingPolicyServiceSettings);
99104
* }</pre>
100105
*
106+
* <p>To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
107+
* the wire:
108+
*
109+
* <pre>{@code
110+
* // This snippet has been automatically generated for illustrative purposes only.
111+
* // It may require modifications to work in your environment.
112+
* AutoscalingPolicyServiceSettings autoscalingPolicyServiceSettings =
113+
* AutoscalingPolicyServiceSettings.newBuilder()
114+
* .setTransportChannelProvider(
115+
* AutoscalingPolicyServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
116+
* .build();
117+
* AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
118+
* AutoscalingPolicyServiceClient.create(autoscalingPolicyServiceSettings);
119+
* }</pre>
120+
*
101121
* <p>Please refer to the GitHub repository's samples for more quickstart code snippets.
102122
*/
103123
@Generated("by gapic-generator-java")
@@ -124,7 +144,6 @@ public static final AutoscalingPolicyServiceClient create(
124144
* Constructs an instance of AutoscalingPolicyServiceClient, using the given stub for making
125145
* calls. This is for advanced usage - prefer using create(AutoscalingPolicyServiceSettings).
126146
*/
127-
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
128147
public static final AutoscalingPolicyServiceClient create(AutoscalingPolicyServiceStub stub) {
129148
return new AutoscalingPolicyServiceClient(stub);
130149
}
@@ -140,7 +159,6 @@ protected AutoscalingPolicyServiceClient(AutoscalingPolicyServiceSettings settin
140159
this.stub = ((AutoscalingPolicyServiceStubSettings) settings.getStubSettings()).createStub();
141160
}
142161

143-
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
144162
protected AutoscalingPolicyServiceClient(AutoscalingPolicyServiceStub stub) {
145163
this.settings = null;
146164
this.stub = stub;
@@ -150,7 +168,6 @@ public final AutoscalingPolicyServiceSettings getSettings() {
150168
return settings;
151169
}
152170

153-
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
154171
public AutoscalingPolicyServiceStub getStub() {
155172
return stub;
156173
}
@@ -162,6 +179,8 @@ public AutoscalingPolicyServiceStub getStub() {
162179
* <p>Sample code:
163180
*
164181
* <pre>{@code
182+
* // This snippet has been automatically generated for illustrative purposes only.
183+
* // It may require modifications to work in your environment.
165184
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
166185
* AutoscalingPolicyServiceClient.create()) {
167186
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
@@ -202,6 +221,8 @@ public final AutoscalingPolicy createAutoscalingPolicy(
202221
* <p>Sample code:
203222
*
204223
* <pre>{@code
224+
* // This snippet has been automatically generated for illustrative purposes only.
225+
* // It may require modifications to work in your environment.
205226
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
206227
* AutoscalingPolicyServiceClient.create()) {
207228
* RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
@@ -242,6 +263,8 @@ public final AutoscalingPolicy createAutoscalingPolicy(
242263
* <p>Sample code:
243264
*
244265
* <pre>{@code
266+
* // This snippet has been automatically generated for illustrative purposes only.
267+
* // It may require modifications to work in your environment.
245268
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
246269
* AutoscalingPolicyServiceClient.create()) {
247270
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
@@ -278,6 +301,8 @@ public final AutoscalingPolicy createAutoscalingPolicy(String parent, Autoscalin
278301
* <p>Sample code:
279302
*
280303
* <pre>{@code
304+
* // This snippet has been automatically generated for illustrative purposes only.
305+
* // It may require modifications to work in your environment.
281306
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
282307
* AutoscalingPolicyServiceClient.create()) {
283308
* CreateAutoscalingPolicyRequest request =
@@ -303,6 +328,8 @@ public final AutoscalingPolicy createAutoscalingPolicy(CreateAutoscalingPolicyRe
303328
* <p>Sample code:
304329
*
305330
* <pre>{@code
331+
* // This snippet has been automatically generated for illustrative purposes only.
332+
* // It may require modifications to work in your environment.
306333
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
307334
* AutoscalingPolicyServiceClient.create()) {
308335
* CreateAutoscalingPolicyRequest request =
@@ -331,6 +358,8 @@ public final AutoscalingPolicy createAutoscalingPolicy(CreateAutoscalingPolicyRe
331358
* <p>Sample code:
332359
*
333360
* <pre>{@code
361+
* // This snippet has been automatically generated for illustrative purposes only.
362+
* // It may require modifications to work in your environment.
334363
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
335364
* AutoscalingPolicyServiceClient.create()) {
336365
* AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
@@ -356,6 +385,8 @@ public final AutoscalingPolicy updateAutoscalingPolicy(AutoscalingPolicy policy)
356385
* <p>Sample code:
357386
*
358387
* <pre>{@code
388+
* // This snippet has been automatically generated for illustrative purposes only.
389+
* // It may require modifications to work in your environment.
359390
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
360391
* AutoscalingPolicyServiceClient.create()) {
361392
* UpdateAutoscalingPolicyRequest request =
@@ -382,6 +413,8 @@ public final AutoscalingPolicy updateAutoscalingPolicy(UpdateAutoscalingPolicyRe
382413
* <p>Sample code:
383414
*
384415
* <pre>{@code
416+
* // This snippet has been automatically generated for illustrative purposes only.
417+
* // It may require modifications to work in your environment.
385418
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
386419
* AutoscalingPolicyServiceClient.create()) {
387420
* UpdateAutoscalingPolicyRequest request =
@@ -407,6 +440,8 @@ public final AutoscalingPolicy updateAutoscalingPolicy(UpdateAutoscalingPolicyRe
407440
* <p>Sample code:
408441
*
409442
* <pre>{@code
443+
* // This snippet has been automatically generated for illustrative purposes only.
444+
* // It may require modifications to work in your environment.
410445
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
411446
* AutoscalingPolicyServiceClient.create()) {
412447
* AutoscalingPolicyName name =
@@ -446,6 +481,8 @@ public final AutoscalingPolicy getAutoscalingPolicy(AutoscalingPolicyName name)
446481
* <p>Sample code:
447482
*
448483
* <pre>{@code
484+
* // This snippet has been automatically generated for illustrative purposes only.
485+
* // It may require modifications to work in your environment.
449486
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
450487
* AutoscalingPolicyServiceClient.create()) {
451488
* String name =
@@ -484,6 +521,8 @@ public final AutoscalingPolicy getAutoscalingPolicy(String name) {
484521
* <p>Sample code:
485522
*
486523
* <pre>{@code
524+
* // This snippet has been automatically generated for illustrative purposes only.
525+
* // It may require modifications to work in your environment.
487526
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
488527
* AutoscalingPolicyServiceClient.create()) {
489528
* GetAutoscalingPolicyRequest request =
@@ -511,6 +550,8 @@ public final AutoscalingPolicy getAutoscalingPolicy(GetAutoscalingPolicyRequest
511550
* <p>Sample code:
512551
*
513552
* <pre>{@code
553+
* // This snippet has been automatically generated for illustrative purposes only.
554+
* // It may require modifications to work in your environment.
514555
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
515556
* AutoscalingPolicyServiceClient.create()) {
516557
* GetAutoscalingPolicyRequest request =
@@ -539,6 +580,8 @@ public final AutoscalingPolicy getAutoscalingPolicy(GetAutoscalingPolicyRequest
539580
* <p>Sample code:
540581
*
541582
* <pre>{@code
583+
* // This snippet has been automatically generated for illustrative purposes only.
584+
* // It may require modifications to work in your environment.
542585
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
543586
* AutoscalingPolicyServiceClient.create()) {
544587
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
@@ -577,6 +620,8 @@ public final ListAutoscalingPoliciesPagedResponse listAutoscalingPolicies(Locati
577620
* <p>Sample code:
578621
*
579622
* <pre>{@code
623+
* // This snippet has been automatically generated for illustrative purposes only.
624+
* // It may require modifications to work in your environment.
580625
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
581626
* AutoscalingPolicyServiceClient.create()) {
582627
* RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
@@ -615,6 +660,8 @@ public final ListAutoscalingPoliciesPagedResponse listAutoscalingPolicies(Region
615660
* <p>Sample code:
616661
*
617662
* <pre>{@code
663+
* // This snippet has been automatically generated for illustrative purposes only.
664+
* // It may require modifications to work in your environment.
618665
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
619666
* AutoscalingPolicyServiceClient.create()) {
620667
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
@@ -651,6 +698,8 @@ public final ListAutoscalingPoliciesPagedResponse listAutoscalingPolicies(String
651698
* <p>Sample code:
652699
*
653700
* <pre>{@code
701+
* // This snippet has been automatically generated for illustrative purposes only.
702+
* // It may require modifications to work in your environment.
654703
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
655704
* AutoscalingPolicyServiceClient.create()) {
656705
* ListAutoscalingPoliciesRequest request =
@@ -681,6 +730,8 @@ public final ListAutoscalingPoliciesPagedResponse listAutoscalingPolicies(
681730
* <p>Sample code:
682731
*
683732
* <pre>{@code
733+
* // This snippet has been automatically generated for illustrative purposes only.
734+
* // It may require modifications to work in your environment.
684735
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
685736
* AutoscalingPolicyServiceClient.create()) {
686737
* ListAutoscalingPoliciesRequest request =
@@ -710,6 +761,8 @@ public final ListAutoscalingPoliciesPagedResponse listAutoscalingPolicies(
710761
* <p>Sample code:
711762
*
712763
* <pre>{@code
764+
* // This snippet has been automatically generated for illustrative purposes only.
765+
* // It may require modifications to work in your environment.
713766
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
714767
* AutoscalingPolicyServiceClient.create()) {
715768
* ListAutoscalingPoliciesRequest request =
@@ -721,7 +774,7 @@ public final ListAutoscalingPoliciesPagedResponse listAutoscalingPolicies(
721774
* while (true) {
722775
* ListAutoscalingPoliciesResponse response =
723776
* autoscalingPolicyServiceClient.listAutoscalingPoliciesCallable().call(request);
724-
* for (AutoscalingPolicy element : response.getResponsesList()) {
777+
* for (AutoscalingPolicy element : response.getPoliciesList()) {
725778
* // doThingsWith(element);
726779
* }
727780
* String nextPageToken = response.getNextPageToken();
@@ -747,6 +800,8 @@ public final ListAutoscalingPoliciesPagedResponse listAutoscalingPolicies(
747800
* <p>Sample code:
748801
*
749802
* <pre>{@code
803+
* // This snippet has been automatically generated for illustrative purposes only.
804+
* // It may require modifications to work in your environment.
750805
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
751806
* AutoscalingPolicyServiceClient.create()) {
752807
* AutoscalingPolicyName name =
@@ -787,6 +842,8 @@ public final void deleteAutoscalingPolicy(AutoscalingPolicyName name) {
787842
* <p>Sample code:
788843
*
789844
* <pre>{@code
845+
* // This snippet has been automatically generated for illustrative purposes only.
846+
* // It may require modifications to work in your environment.
790847
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
791848
* AutoscalingPolicyServiceClient.create()) {
792849
* String name =
@@ -826,6 +883,8 @@ public final void deleteAutoscalingPolicy(String name) {
826883
* <p>Sample code:
827884
*
828885
* <pre>{@code
886+
* // This snippet has been automatically generated for illustrative purposes only.
887+
* // It may require modifications to work in your environment.
829888
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
830889
* AutoscalingPolicyServiceClient.create()) {
831890
* DeleteAutoscalingPolicyRequest request =
@@ -854,6 +913,8 @@ public final void deleteAutoscalingPolicy(DeleteAutoscalingPolicyRequest request
854913
* <p>Sample code:
855914
*
856915
* <pre>{@code
916+
* // This snippet has been automatically generated for illustrative purposes only.
917+
* // It may require modifications to work in your environment.
857918
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
858919
* AutoscalingPolicyServiceClient.create()) {
859920
* DeleteAutoscalingPolicyRequest request =

0 commit comments

Comments
 (0)