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

Commit 65f3189

Browse files
feat!: release gapic-generator-java v2.0.0 (#29)
Committer: @miraleung PiperOrigin-RevId: 388535346 Source-Link: googleapis/googleapis@d9eaf41 Source-Link: https://github.com/googleapis/googleapis-gen/commit/976c5ab6f24b58c91fe04847ead1953f99d19e6a
1 parent 88ec35b commit 65f3189

File tree

4 files changed

+93
-190
lines changed

4 files changed

+93
-190
lines changed

google-cloud-datastream/src/main/java/com/google/cloud/datastream/v1alpha1/DatastreamClient.java

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

1717
package com.google.cloud.datastream.v1alpha1;
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;
@@ -2802,12 +2801,7 @@ public static ApiFuture<ListConnectionProfilesPagedResponse> createAsync(
28022801
ListConnectionProfilesPage.createEmptyPage().createPageAsync(context, futureResponse);
28032802
return ApiFutures.transform(
28042803
futurePage,
2805-
new ApiFunction<ListConnectionProfilesPage, ListConnectionProfilesPagedResponse>() {
2806-
@Override
2807-
public ListConnectionProfilesPagedResponse apply(ListConnectionProfilesPage input) {
2808-
return new ListConnectionProfilesPagedResponse(input);
2809-
}
2810-
},
2804+
input -> new ListConnectionProfilesPagedResponse(input),
28112805
MoreExecutors.directExecutor());
28122806
}
28132807

@@ -2892,14 +2886,7 @@ public static ApiFuture<ListStreamsPagedResponse> createAsync(
28922886
ApiFuture<ListStreamsPage> futurePage =
28932887
ListStreamsPage.createEmptyPage().createPageAsync(context, futureResponse);
28942888
return ApiFutures.transform(
2895-
futurePage,
2896-
new ApiFunction<ListStreamsPage, ListStreamsPagedResponse>() {
2897-
@Override
2898-
public ListStreamsPagedResponse apply(ListStreamsPage input) {
2899-
return new ListStreamsPagedResponse(input);
2900-
}
2901-
},
2902-
MoreExecutors.directExecutor());
2889+
futurePage, input -> new ListStreamsPagedResponse(input), MoreExecutors.directExecutor());
29032890
}
29042891

29052892
private ListStreamsPagedResponse(ListStreamsPage page) {
@@ -2973,12 +2960,7 @@ public static ApiFuture<FetchStaticIpsPagedResponse> createAsync(
29732960
FetchStaticIpsPage.createEmptyPage().createPageAsync(context, futureResponse);
29742961
return ApiFutures.transform(
29752962
futurePage,
2976-
new ApiFunction<FetchStaticIpsPage, FetchStaticIpsPagedResponse>() {
2977-
@Override
2978-
public FetchStaticIpsPagedResponse apply(FetchStaticIpsPage input) {
2979-
return new FetchStaticIpsPagedResponse(input);
2980-
}
2981-
},
2963+
input -> new FetchStaticIpsPagedResponse(input),
29822964
MoreExecutors.directExecutor());
29832965
}
29842966

@@ -3056,12 +3038,7 @@ public static ApiFuture<ListPrivateConnectionsPagedResponse> createAsync(
30563038
ListPrivateConnectionsPage.createEmptyPage().createPageAsync(context, futureResponse);
30573039
return ApiFutures.transform(
30583040
futurePage,
3059-
new ApiFunction<ListPrivateConnectionsPage, ListPrivateConnectionsPagedResponse>() {
3060-
@Override
3061-
public ListPrivateConnectionsPagedResponse apply(ListPrivateConnectionsPage input) {
3062-
return new ListPrivateConnectionsPagedResponse(input);
3063-
}
3064-
},
3041+
input -> new ListPrivateConnectionsPagedResponse(input),
30653042
MoreExecutors.directExecutor());
30663043
}
30673044

@@ -3146,14 +3123,7 @@ public static ApiFuture<ListRoutesPagedResponse> createAsync(
31463123
ApiFuture<ListRoutesPage> futurePage =
31473124
ListRoutesPage.createEmptyPage().createPageAsync(context, futureResponse);
31483125
return ApiFutures.transform(
3149-
futurePage,
3150-
new ApiFunction<ListRoutesPage, ListRoutesPagedResponse>() {
3151-
@Override
3152-
public ListRoutesPagedResponse apply(ListRoutesPage input) {
3153-
return new ListRoutesPagedResponse(input);
3154-
}
3155-
},
3156-
MoreExecutors.directExecutor());
3126+
futurePage, input -> new ListRoutesPagedResponse(input), MoreExecutors.directExecutor());
31573127
}
31583128

31593129
private ListRoutesPagedResponse(ListRoutesPage page) {

google-cloud-datastream/src/main/java/com/google/cloud/datastream/v1alpha1/DatastreamSettings.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,14 +351,13 @@ public DatastreamStubSettings.Builder getStubSettingsBuilder() {
351351
return ((DatastreamStubSettings.Builder) getStubSettings());
352352
}
353353

354-
// NEXT_MAJOR_VER: remove 'throws Exception'.
355354
/**
356355
* Applies the given settings updater function to all of the unary API methods in this service.
357356
*
358357
* <p>Note: This method does not support applying settings to streaming methods.
359358
*/
360359
public Builder applyToAllUnaryMethods(
361-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
360+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
362361
super.applyToAllUnaryMethods(
363362
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
364363
return this;

google-cloud-datastream/src/main/java/com/google/cloud/datastream/v1alpha1/stub/DatastreamStubSettings.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,14 +1435,13 @@ private static Builder initDefaults(Builder builder) {
14351435
return builder;
14361436
}
14371437

1438-
// NEXT_MAJOR_VER: remove 'throws Exception'.
14391438
/**
14401439
* Applies the given settings updater function to all of the unary API methods in this service.
14411440
*
14421441
* <p>Note: This method does not support applying settings to streaming methods.
14431442
*/
14441443
public Builder applyToAllUnaryMethods(
1445-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
1444+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
14461445
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
14471446
return this;
14481447
}

0 commit comments

Comments
 (0)