|
16 | 16 |
|
17 | 17 | package com.google.cloud.logging.v2;
|
18 | 18 |
|
19 |
| -import com.google.api.core.ApiFunction; |
20 | 19 | import com.google.api.core.ApiFuture;
|
21 | 20 | import com.google.api.core.ApiFutures;
|
22 | 21 | import com.google.api.core.BetaApi;
|
@@ -2855,14 +2854,7 @@ public static ApiFuture<ListBucketsPagedResponse> createAsync(
|
2855 | 2854 | ApiFuture<ListBucketsPage> futurePage =
|
2856 | 2855 | ListBucketsPage.createEmptyPage().createPageAsync(context, futureResponse);
|
2857 | 2856 | return ApiFutures.transform(
|
2858 |
| - futurePage, |
2859 |
| - new ApiFunction<ListBucketsPage, ListBucketsPagedResponse>() { |
2860 |
| - @Override |
2861 |
| - public ListBucketsPagedResponse apply(ListBucketsPage input) { |
2862 |
| - return new ListBucketsPagedResponse(input); |
2863 |
| - } |
2864 |
| - }, |
2865 |
| - MoreExecutors.directExecutor()); |
| 2857 | + futurePage, input -> new ListBucketsPagedResponse(input), MoreExecutors.directExecutor()); |
2866 | 2858 | }
|
2867 | 2859 |
|
2868 | 2860 | private ListBucketsPagedResponse(ListBucketsPage page) {
|
@@ -2935,14 +2927,7 @@ public static ApiFuture<ListViewsPagedResponse> createAsync(
|
2935 | 2927 | ApiFuture<ListViewsPage> futurePage =
|
2936 | 2928 | ListViewsPage.createEmptyPage().createPageAsync(context, futureResponse);
|
2937 | 2929 | return ApiFutures.transform(
|
2938 |
| - futurePage, |
2939 |
| - new ApiFunction<ListViewsPage, ListViewsPagedResponse>() { |
2940 |
| - @Override |
2941 |
| - public ListViewsPagedResponse apply(ListViewsPage input) { |
2942 |
| - return new ListViewsPagedResponse(input); |
2943 |
| - } |
2944 |
| - }, |
2945 |
| - MoreExecutors.directExecutor()); |
| 2930 | + futurePage, input -> new ListViewsPagedResponse(input), MoreExecutors.directExecutor()); |
2946 | 2931 | }
|
2947 | 2932 |
|
2948 | 2933 | private ListViewsPagedResponse(ListViewsPage page) {
|
@@ -3015,14 +3000,7 @@ public static ApiFuture<ListSinksPagedResponse> createAsync(
|
3015 | 3000 | ApiFuture<ListSinksPage> futurePage =
|
3016 | 3001 | ListSinksPage.createEmptyPage().createPageAsync(context, futureResponse);
|
3017 | 3002 | return ApiFutures.transform(
|
3018 |
| - futurePage, |
3019 |
| - new ApiFunction<ListSinksPage, ListSinksPagedResponse>() { |
3020 |
| - @Override |
3021 |
| - public ListSinksPagedResponse apply(ListSinksPage input) { |
3022 |
| - return new ListSinksPagedResponse(input); |
3023 |
| - } |
3024 |
| - }, |
3025 |
| - MoreExecutors.directExecutor()); |
| 3003 | + futurePage, input -> new ListSinksPagedResponse(input), MoreExecutors.directExecutor()); |
3026 | 3004 | }
|
3027 | 3005 |
|
3028 | 3006 | private ListSinksPagedResponse(ListSinksPage page) {
|
@@ -3096,12 +3074,7 @@ public static ApiFuture<ListExclusionsPagedResponse> createAsync(
|
3096 | 3074 | ListExclusionsPage.createEmptyPage().createPageAsync(context, futureResponse);
|
3097 | 3075 | return ApiFutures.transform(
|
3098 | 3076 | futurePage,
|
3099 |
| - new ApiFunction<ListExclusionsPage, ListExclusionsPagedResponse>() { |
3100 |
| - @Override |
3101 |
| - public ListExclusionsPagedResponse apply(ListExclusionsPage input) { |
3102 |
| - return new ListExclusionsPagedResponse(input); |
3103 |
| - } |
3104 |
| - }, |
| 3077 | + input -> new ListExclusionsPagedResponse(input), |
3105 | 3078 | MoreExecutors.directExecutor());
|
3106 | 3079 | }
|
3107 | 3080 |
|
|
0 commit comments