Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit 413e8f1

Browse files
feat!: release gapic-generator-java v2.0.0 (#562)
Committer: @miraleung PiperOrigin-RevId: 388535346 Source-Link: googleapis/googleapis@d9eaf41 Source-Link: https://github.com/googleapis/googleapis-gen/commit/976c5ab6f24b58c91fe04847ead1953f99d19e6a
1 parent 0e0bedd commit 413e8f1

4 files changed

Lines changed: 82 additions & 156 deletions

File tree

google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerClient.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.iot.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;
@@ -2369,12 +2368,7 @@ public static ApiFuture<ListDeviceRegistriesPagedResponse> createAsync(
23692368
ListDeviceRegistriesPage.createEmptyPage().createPageAsync(context, futureResponse);
23702369
return ApiFutures.transform(
23712370
futurePage,
2372-
new ApiFunction<ListDeviceRegistriesPage, ListDeviceRegistriesPagedResponse>() {
2373-
@Override
2374-
public ListDeviceRegistriesPagedResponse apply(ListDeviceRegistriesPage input) {
2375-
return new ListDeviceRegistriesPagedResponse(input);
2376-
}
2377-
},
2371+
input -> new ListDeviceRegistriesPagedResponse(input),
23782372
MoreExecutors.directExecutor());
23792373
}
23802374

@@ -2456,14 +2450,7 @@ public static ApiFuture<ListDevicesPagedResponse> createAsync(
24562450
ApiFuture<ListDevicesPage> futurePage =
24572451
ListDevicesPage.createEmptyPage().createPageAsync(context, futureResponse);
24582452
return ApiFutures.transform(
2459-
futurePage,
2460-
new ApiFunction<ListDevicesPage, ListDevicesPagedResponse>() {
2461-
@Override
2462-
public ListDevicesPagedResponse apply(ListDevicesPage input) {
2463-
return new ListDevicesPagedResponse(input);
2464-
}
2465-
},
2466-
MoreExecutors.directExecutor());
2453+
futurePage, input -> new ListDevicesPagedResponse(input), MoreExecutors.directExecutor());
24672454
}
24682455

24692456
private ListDevicesPagedResponse(ListDevicesPage page) {

google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerSettings.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,14 +269,13 @@ public DeviceManagerStubSettings.Builder getStubSettingsBuilder() {
269269
return ((DeviceManagerStubSettings.Builder) getStubSettings());
270270
}
271271

272-
// NEXT_MAJOR_VER: remove 'throws Exception'.
273272
/**
274273
* Applies the given settings updater function to all of the unary API methods in this service.
275274
*
276275
* <p>Note: This method does not support applying settings to streaming methods.
277276
*/
278277
public Builder applyToAllUnaryMethods(
279-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
278+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
280279
super.applyToAllUnaryMethods(
281280
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
282281
return this;

google-cloud-iot/src/main/java/com/google/cloud/iot/v1/stub/DeviceManagerStubSettings.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -790,14 +790,13 @@ private static Builder initDefaults(Builder builder) {
790790
return builder;
791791
}
792792

793-
// NEXT_MAJOR_VER: remove 'throws Exception'.
794793
/**
795794
* Applies the given settings updater function to all of the unary API methods in this service.
796795
*
797796
* <p>Note: This method does not support applying settings to streaming methods.
798797
*/
799798
public Builder applyToAllUnaryMethods(
800-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
799+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
801800
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
802801
return this;
803802
}

0 commit comments

Comments
 (0)