Skip to content
This repository was archived by the owner on Jul 15, 2024. It is now read-only.

Commit 9311680

Browse files
feat: Populate compute proto with extended_operations annotations (#563)
* feat: Populate compute proto with extended_operations annotations Also update WORKSPACE file to match the latest from googleapis/googleapis repo * regenerate with the newest disco-to-proto3-converter add full annotation name (with package) to extended_operations do not apply polling_operation_method to Wait() methods of the pollin service Source-Author: Vadym Matsishevskyi <[email protected]> Source-Date: Tue Oct 5 19:24:19 2021 -0700 Source-Repo: googleapis/googleapis-discovery Source-Sha: 34478e2969042ed837d33684360f1ee3be7d2f74 Source-Link: googleapis/googleapis-discovery@34478e2 Co-authored-by: Neenu Shaji <[email protected]>
1 parent 5a64dbe commit 9311680

File tree

979 files changed

+36121
-34721
lines changed

Some content is hidden

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

979 files changed

+36121
-34721
lines changed

Diff for: google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AcceleratorTypesClient.java

+2-15
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

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

19-
import com.google.api.core.ApiFunction;
2019
import com.google.api.core.ApiFuture;
2120
import com.google.api.core.ApiFutures;
2221
import com.google.api.core.BetaApi;
@@ -537,12 +536,7 @@ public static ApiFuture<AggregatedListPagedResponse> createAsync(
537536
AggregatedListPage.createEmptyPage().createPageAsync(context, futureResponse);
538537
return ApiFutures.transform(
539538
futurePage,
540-
new ApiFunction<AggregatedListPage, AggregatedListPagedResponse>() {
541-
@Override
542-
public AggregatedListPagedResponse apply(AggregatedListPage input) {
543-
return new AggregatedListPagedResponse(input);
544-
}
545-
},
539+
input -> new AggregatedListPagedResponse(input),
546540
MoreExecutors.directExecutor());
547541
}
548542

@@ -632,14 +626,7 @@ public static ApiFuture<ListPagedResponse> createAsync(
632626
ApiFuture<ListPage> futurePage =
633627
ListPage.createEmptyPage().createPageAsync(context, futureResponse);
634628
return ApiFutures.transform(
635-
futurePage,
636-
new ApiFunction<ListPage, ListPagedResponse>() {
637-
@Override
638-
public ListPagedResponse apply(ListPage input) {
639-
return new ListPagedResponse(input);
640-
}
641-
},
642-
MoreExecutors.directExecutor());
629+
futurePage, input -> new ListPagedResponse(input), MoreExecutors.directExecutor());
643630
}
644631

645632
private ListPagedResponse(ListPage page) {

Diff for: google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AcceleratorTypesSettings.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,13 @@ public AcceleratorTypesStubSettings.Builder getStubSettingsBuilder() {
176176
return ((AcceleratorTypesStubSettings.Builder) getStubSettings());
177177
}
178178

179-
// NEXT_MAJOR_VER: remove 'throws Exception'.
180179
/**
181180
* Applies the given settings updater function to all of the unary API methods in this service.
182181
*
183182
* <p>Note: This method does not support applying settings to streaming methods.
184183
*/
185184
public Builder applyToAllUnaryMethods(
186-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
185+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
187186
super.applyToAllUnaryMethods(
188187
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
189188
return this;

Diff for: google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AddressesClient.java

+2-15
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

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

19-
import com.google.api.core.ApiFunction;
2019
import com.google.api.core.ApiFuture;
2120
import com.google.api.core.ApiFutures;
2221
import com.google.api.core.BetaApi;
@@ -689,12 +688,7 @@ public static ApiFuture<AggregatedListPagedResponse> createAsync(
689688
AggregatedListPage.createEmptyPage().createPageAsync(context, futureResponse);
690689
return ApiFutures.transform(
691690
futurePage,
692-
new ApiFunction<AggregatedListPage, AggregatedListPagedResponse>() {
693-
@Override
694-
public AggregatedListPagedResponse apply(AggregatedListPage input) {
695-
return new AggregatedListPagedResponse(input);
696-
}
697-
},
691+
input -> new AggregatedListPagedResponse(input),
698692
MoreExecutors.directExecutor());
699693
}
700694

@@ -780,14 +774,7 @@ public static ApiFuture<ListPagedResponse> createAsync(
780774
ApiFuture<ListPage> futurePage =
781775
ListPage.createEmptyPage().createPageAsync(context, futureResponse);
782776
return ApiFutures.transform(
783-
futurePage,
784-
new ApiFunction<ListPage, ListPagedResponse>() {
785-
@Override
786-
public ListPagedResponse apply(ListPage input) {
787-
return new ListPagedResponse(input);
788-
}
789-
},
790-
MoreExecutors.directExecutor());
777+
futurePage, input -> new ListPagedResponse(input), MoreExecutors.directExecutor());
791778
}
792779

793780
private ListPagedResponse(ListPage page) {

Diff for: google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AddressesSettings.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,13 @@ public AddressesStubSettings.Builder getStubSettingsBuilder() {
181181
return ((AddressesStubSettings.Builder) getStubSettings());
182182
}
183183

184-
// NEXT_MAJOR_VER: remove 'throws Exception'.
185184
/**
186185
* Applies the given settings updater function to all of the unary API methods in this service.
187186
*
188187
* <p>Note: This method does not support applying settings to streaming methods.
189188
*/
190189
public Builder applyToAllUnaryMethods(
191-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
190+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
192191
super.applyToAllUnaryMethods(
193192
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
194193
return this;

Diff for: google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AutoscalersClient.java

+2-15
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

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

19-
import com.google.api.core.ApiFunction;
2019
import com.google.api.core.ApiFuture;
2120
import com.google.api.core.ApiFutures;
2221
import com.google.api.core.BetaApi;
@@ -864,12 +863,7 @@ public static ApiFuture<AggregatedListPagedResponse> createAsync(
864863
AggregatedListPage.createEmptyPage().createPageAsync(context, futureResponse);
865864
return ApiFutures.transform(
866865
futurePage,
867-
new ApiFunction<AggregatedListPage, AggregatedListPagedResponse>() {
868-
@Override
869-
public AggregatedListPagedResponse apply(AggregatedListPage input) {
870-
return new AggregatedListPagedResponse(input);
871-
}
872-
},
866+
input -> new AggregatedListPagedResponse(input),
873867
MoreExecutors.directExecutor());
874868
}
875869

@@ -955,14 +949,7 @@ public static ApiFuture<ListPagedResponse> createAsync(
955949
ApiFuture<ListPage> futurePage =
956950
ListPage.createEmptyPage().createPageAsync(context, futureResponse);
957951
return ApiFutures.transform(
958-
futurePage,
959-
new ApiFunction<ListPage, ListPagedResponse>() {
960-
@Override
961-
public ListPagedResponse apply(ListPage input) {
962-
return new ListPagedResponse(input);
963-
}
964-
},
965-
MoreExecutors.directExecutor());
952+
futurePage, input -> new ListPagedResponse(input), MoreExecutors.directExecutor());
966953
}
967954

968955
private ListPagedResponse(ListPage page) {

Diff for: google-cloud-compute/src/main/java/com/google/cloud/compute/v1/AutoscalersSettings.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -192,14 +192,13 @@ public AutoscalersStubSettings.Builder getStubSettingsBuilder() {
192192
return ((AutoscalersStubSettings.Builder) getStubSettings());
193193
}
194194

195-
// NEXT_MAJOR_VER: remove 'throws Exception'.
196195
/**
197196
* Applies the given settings updater function to all of the unary API methods in this service.
198197
*
199198
* <p>Note: This method does not support applying settings to streaming methods.
200199
*/
201200
public Builder applyToAllUnaryMethods(
202-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
201+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
203202
super.applyToAllUnaryMethods(
204203
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
205204
return this;

Diff for: google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendBucketsClient.java

+1-9
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

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

19-
import com.google.api.core.ApiFunction;
2019
import com.google.api.core.ApiFuture;
2120
import com.google.api.core.ApiFutures;
2221
import com.google.api.core.BetaApi;
@@ -885,14 +884,7 @@ public static ApiFuture<ListPagedResponse> createAsync(
885884
ApiFuture<ListPage> futurePage =
886885
ListPage.createEmptyPage().createPageAsync(context, futureResponse);
887886
return ApiFutures.transform(
888-
futurePage,
889-
new ApiFunction<ListPage, ListPagedResponse>() {
890-
@Override
891-
public ListPagedResponse apply(ListPage input) {
892-
return new ListPagedResponse(input);
893-
}
894-
},
895-
MoreExecutors.directExecutor());
887+
futurePage, input -> new ListPagedResponse(input), MoreExecutors.directExecutor());
896888
}
897889

898890
private ListPagedResponse(ListPage page) {

Diff for: google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendBucketsSettings.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -198,14 +198,13 @@ public BackendBucketsStubSettings.Builder getStubSettingsBuilder() {
198198
return ((BackendBucketsStubSettings.Builder) getStubSettings());
199199
}
200200

201-
// NEXT_MAJOR_VER: remove 'throws Exception'.
202201
/**
203202
* Applies the given settings updater function to all of the unary API methods in this service.
204203
*
205204
* <p>Note: This method does not support applying settings to streaming methods.
206205
*/
207206
public Builder applyToAllUnaryMethods(
208-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
207+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
209208
super.applyToAllUnaryMethods(
210209
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
211210
return this;

Diff for: google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendServicesClient.java

+2-15
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

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

19-
import com.google.api.core.ApiFunction;
2019
import com.google.api.core.ApiFuture;
2120
import com.google.api.core.ApiFutures;
2221
import com.google.api.core.BetaApi;
@@ -1223,12 +1222,7 @@ public static ApiFuture<AggregatedListPagedResponse> createAsync(
12231222
AggregatedListPage.createEmptyPage().createPageAsync(context, futureResponse);
12241223
return ApiFutures.transform(
12251224
futurePage,
1226-
new ApiFunction<AggregatedListPage, AggregatedListPagedResponse>() {
1227-
@Override
1228-
public AggregatedListPagedResponse apply(AggregatedListPage input) {
1229-
return new AggregatedListPagedResponse(input);
1230-
}
1231-
},
1225+
input -> new AggregatedListPagedResponse(input),
12321226
MoreExecutors.directExecutor());
12331227
}
12341228

@@ -1318,14 +1312,7 @@ public static ApiFuture<ListPagedResponse> createAsync(
13181312
ApiFuture<ListPage> futurePage =
13191313
ListPage.createEmptyPage().createPageAsync(context, futureResponse);
13201314
return ApiFutures.transform(
1321-
futurePage,
1322-
new ApiFunction<ListPage, ListPagedResponse>() {
1323-
@Override
1324-
public ListPagedResponse apply(ListPage input) {
1325-
return new ListPagedResponse(input);
1326-
}
1327-
},
1328-
MoreExecutors.directExecutor());
1315+
futurePage, input -> new ListPagedResponse(input), MoreExecutors.directExecutor());
13291316
}
13301317

13311318
private ListPagedResponse(ListPage page) {

Diff for: google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendServicesSettings.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -220,14 +220,13 @@ public BackendServicesStubSettings.Builder getStubSettingsBuilder() {
220220
return ((BackendServicesStubSettings.Builder) getStubSettings());
221221
}
222222

223-
// NEXT_MAJOR_VER: remove 'throws Exception'.
224223
/**
225224
* Applies the given settings updater function to all of the unary API methods in this service.
226225
*
227226
* <p>Note: This method does not support applying settings to streaming methods.
228227
*/
229228
public Builder applyToAllUnaryMethods(
230-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
229+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
231230
super.applyToAllUnaryMethods(
232231
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
233232
return this;

Diff for: google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DiskTypesClient.java

+2-15
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

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

19-
import com.google.api.core.ApiFunction;
2019
import com.google.api.core.ApiFuture;
2120
import com.google.api.core.ApiFutures;
2221
import com.google.api.core.BetaApi;
@@ -530,12 +529,7 @@ public static ApiFuture<AggregatedListPagedResponse> createAsync(
530529
AggregatedListPage.createEmptyPage().createPageAsync(context, futureResponse);
531530
return ApiFutures.transform(
532531
futurePage,
533-
new ApiFunction<AggregatedListPage, AggregatedListPagedResponse>() {
534-
@Override
535-
public AggregatedListPagedResponse apply(AggregatedListPage input) {
536-
return new AggregatedListPagedResponse(input);
537-
}
538-
},
532+
input -> new AggregatedListPagedResponse(input),
539533
MoreExecutors.directExecutor());
540534
}
541535

@@ -621,14 +615,7 @@ public static ApiFuture<ListPagedResponse> createAsync(
621615
ApiFuture<ListPage> futurePage =
622616
ListPage.createEmptyPage().createPageAsync(context, futureResponse);
623617
return ApiFutures.transform(
624-
futurePage,
625-
new ApiFunction<ListPage, ListPagedResponse>() {
626-
@Override
627-
public ListPagedResponse apply(ListPage input) {
628-
return new ListPagedResponse(input);
629-
}
630-
},
631-
MoreExecutors.directExecutor());
618+
futurePage, input -> new ListPagedResponse(input), MoreExecutors.directExecutor());
632619
}
633620

634621
private ListPagedResponse(ListPage page) {

Diff for: google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DiskTypesSettings.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,13 @@ public DiskTypesStubSettings.Builder getStubSettingsBuilder() {
171171
return ((DiskTypesStubSettings.Builder) getStubSettings());
172172
}
173173

174-
// NEXT_MAJOR_VER: remove 'throws Exception'.
175174
/**
176175
* Applies the given settings updater function to all of the unary API methods in this service.
177176
*
178177
* <p>Note: This method does not support applying settings to streaming methods.
179178
*/
180179
public Builder applyToAllUnaryMethods(
181-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
180+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
182181
super.applyToAllUnaryMethods(
183182
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
184183
return this;

Diff for: google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DisksClient.java

+2-15
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

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

19-
import com.google.api.core.ApiFunction;
2019
import com.google.api.core.ApiFuture;
2120
import com.google.api.core.ApiFutures;
2221
import com.google.api.core.BetaApi;
@@ -1434,12 +1433,7 @@ public static ApiFuture<AggregatedListPagedResponse> createAsync(
14341433
AggregatedListPage.createEmptyPage().createPageAsync(context, futureResponse);
14351434
return ApiFutures.transform(
14361435
futurePage,
1437-
new ApiFunction<AggregatedListPage, AggregatedListPagedResponse>() {
1438-
@Override
1439-
public AggregatedListPagedResponse apply(AggregatedListPage input) {
1440-
return new AggregatedListPagedResponse(input);
1441-
}
1442-
},
1436+
input -> new AggregatedListPagedResponse(input),
14431437
MoreExecutors.directExecutor());
14441438
}
14451439

@@ -1518,14 +1512,7 @@ public static ApiFuture<ListPagedResponse> createAsync(
15181512
ApiFuture<ListPage> futurePage =
15191513
ListPage.createEmptyPage().createPageAsync(context, futureResponse);
15201514
return ApiFutures.transform(
1521-
futurePage,
1522-
new ApiFunction<ListPage, ListPagedResponse>() {
1523-
@Override
1524-
public ListPagedResponse apply(ListPage input) {
1525-
return new ListPagedResponse(input);
1526-
}
1527-
},
1528-
MoreExecutors.directExecutor());
1515+
futurePage, input -> new ListPagedResponse(input), MoreExecutors.directExecutor());
15291516
}
15301517

15311518
private ListPagedResponse(ListPage page) {

Diff for: google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DisksSettings.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,13 @@ public DisksStubSettings.Builder getStubSettingsBuilder() {
224224
return ((DisksStubSettings.Builder) getStubSettings());
225225
}
226226

227-
// NEXT_MAJOR_VER: remove 'throws Exception'.
228227
/**
229228
* Applies the given settings updater function to all of the unary API methods in this service.
230229
*
231230
* <p>Note: This method does not support applying settings to streaming methods.
232231
*/
233232
public Builder applyToAllUnaryMethods(
234-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
233+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
235234
super.applyToAllUnaryMethods(
236235
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
237236
return this;

Diff for: google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ExternalVpnGatewaysClient.java

+1-9
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

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

19-
import com.google.api.core.ApiFunction;
2019
import com.google.api.core.ApiFuture;
2120
import com.google.api.core.ApiFutures;
2221
import com.google.api.core.BetaApi;
@@ -720,14 +719,7 @@ public static ApiFuture<ListPagedResponse> createAsync(
720719
ApiFuture<ListPage> futurePage =
721720
ListPage.createEmptyPage().createPageAsync(context, futureResponse);
722721
return ApiFutures.transform(
723-
futurePage,
724-
new ApiFunction<ListPage, ListPagedResponse>() {
725-
@Override
726-
public ListPagedResponse apply(ListPage input) {
727-
return new ListPagedResponse(input);
728-
}
729-
},
730-
MoreExecutors.directExecutor());
722+
futurePage, input -> new ListPagedResponse(input), MoreExecutors.directExecutor());
731723
}
732724

733725
private ListPagedResponse(ListPage page) {

0 commit comments

Comments
 (0)