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 <25311427+vam-google@users.noreply.github.com> 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 <Neenu1995@users.noreply.github.com>
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

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

Lines changed: 2 additions & 15 deletions
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) {

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

Lines changed: 1 addition & 2 deletions
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;

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

Lines changed: 2 additions & 15 deletions
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) {

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

Lines changed: 1 addition & 2 deletions
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;

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

Lines changed: 2 additions & 15 deletions
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) {

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

Lines changed: 1 addition & 2 deletions
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;

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

Lines changed: 1 addition & 9 deletions
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) {

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

Lines changed: 1 addition & 2 deletions
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;

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

Lines changed: 2 additions & 15 deletions
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) {

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

Lines changed: 1 addition & 2 deletions
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;

0 commit comments

Comments
 (0)