|
16 | 16 |
|
17 | 17 | package com.google.cloud.datalabeling.v1beta1;
|
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;
|
@@ -4466,12 +4465,7 @@ public static ApiFuture<ListDatasetsPagedResponse> createAsync(
|
4466 | 4465 | ListDatasetsPage.createEmptyPage().createPageAsync(context, futureResponse);
|
4467 | 4466 | return ApiFutures.transform(
|
4468 | 4467 | futurePage,
|
4469 |
| - new ApiFunction<ListDatasetsPage, ListDatasetsPagedResponse>() { |
4470 |
| - @Override |
4471 |
| - public ListDatasetsPagedResponse apply(ListDatasetsPage input) { |
4472 |
| - return new ListDatasetsPagedResponse(input); |
4473 |
| - } |
4474 |
| - }, |
| 4468 | + input -> new ListDatasetsPagedResponse(input), |
4475 | 4469 | MoreExecutors.directExecutor());
|
4476 | 4470 | }
|
4477 | 4471 |
|
@@ -4546,12 +4540,7 @@ public static ApiFuture<ListDataItemsPagedResponse> createAsync(
|
4546 | 4540 | ListDataItemsPage.createEmptyPage().createPageAsync(context, futureResponse);
|
4547 | 4541 | return ApiFutures.transform(
|
4548 | 4542 | futurePage,
|
4549 |
| - new ApiFunction<ListDataItemsPage, ListDataItemsPagedResponse>() { |
4550 |
| - @Override |
4551 |
| - public ListDataItemsPagedResponse apply(ListDataItemsPage input) { |
4552 |
| - return new ListDataItemsPagedResponse(input); |
4553 |
| - } |
4554 |
| - }, |
| 4543 | + input -> new ListDataItemsPagedResponse(input), |
4555 | 4544 | MoreExecutors.directExecutor());
|
4556 | 4545 | }
|
4557 | 4546 |
|
@@ -4628,12 +4617,7 @@ public static ApiFuture<ListAnnotatedDatasetsPagedResponse> createAsync(
|
4628 | 4617 | ListAnnotatedDatasetsPage.createEmptyPage().createPageAsync(context, futureResponse);
|
4629 | 4618 | return ApiFutures.transform(
|
4630 | 4619 | futurePage,
|
4631 |
| - new ApiFunction<ListAnnotatedDatasetsPage, ListAnnotatedDatasetsPagedResponse>() { |
4632 |
| - @Override |
4633 |
| - public ListAnnotatedDatasetsPagedResponse apply(ListAnnotatedDatasetsPage input) { |
4634 |
| - return new ListAnnotatedDatasetsPagedResponse(input); |
4635 |
| - } |
4636 |
| - }, |
| 4620 | + input -> new ListAnnotatedDatasetsPagedResponse(input), |
4637 | 4621 | MoreExecutors.directExecutor());
|
4638 | 4622 | }
|
4639 | 4623 |
|
@@ -4716,12 +4700,7 @@ public static ApiFuture<ListExamplesPagedResponse> createAsync(
|
4716 | 4700 | ListExamplesPage.createEmptyPage().createPageAsync(context, futureResponse);
|
4717 | 4701 | return ApiFutures.transform(
|
4718 | 4702 | futurePage,
|
4719 |
| - new ApiFunction<ListExamplesPage, ListExamplesPagedResponse>() { |
4720 |
| - @Override |
4721 |
| - public ListExamplesPagedResponse apply(ListExamplesPage input) { |
4722 |
| - return new ListExamplesPagedResponse(input); |
4723 |
| - } |
4724 |
| - }, |
| 4703 | + input -> new ListExamplesPagedResponse(input), |
4725 | 4704 | MoreExecutors.directExecutor());
|
4726 | 4705 | }
|
4727 | 4706 |
|
@@ -4798,12 +4777,7 @@ public static ApiFuture<ListAnnotationSpecSetsPagedResponse> createAsync(
|
4798 | 4777 | ListAnnotationSpecSetsPage.createEmptyPage().createPageAsync(context, futureResponse);
|
4799 | 4778 | return ApiFutures.transform(
|
4800 | 4779 | futurePage,
|
4801 |
| - new ApiFunction<ListAnnotationSpecSetsPage, ListAnnotationSpecSetsPagedResponse>() { |
4802 |
| - @Override |
4803 |
| - public ListAnnotationSpecSetsPagedResponse apply(ListAnnotationSpecSetsPage input) { |
4804 |
| - return new ListAnnotationSpecSetsPagedResponse(input); |
4805 |
| - } |
4806 |
| - }, |
| 4780 | + input -> new ListAnnotationSpecSetsPagedResponse(input), |
4807 | 4781 | MoreExecutors.directExecutor());
|
4808 | 4782 | }
|
4809 | 4783 |
|
@@ -4889,12 +4863,7 @@ public static ApiFuture<ListInstructionsPagedResponse> createAsync(
|
4889 | 4863 | ListInstructionsPage.createEmptyPage().createPageAsync(context, futureResponse);
|
4890 | 4864 | return ApiFutures.transform(
|
4891 | 4865 | futurePage,
|
4892 |
| - new ApiFunction<ListInstructionsPage, ListInstructionsPagedResponse>() { |
4893 |
| - @Override |
4894 |
| - public ListInstructionsPagedResponse apply(ListInstructionsPage input) { |
4895 |
| - return new ListInstructionsPagedResponse(input); |
4896 |
| - } |
4897 |
| - }, |
| 4866 | + input -> new ListInstructionsPagedResponse(input), |
4898 | 4867 | MoreExecutors.directExecutor());
|
4899 | 4868 | }
|
4900 | 4869 |
|
@@ -4971,12 +4940,7 @@ public static ApiFuture<SearchEvaluationsPagedResponse> createAsync(
|
4971 | 4940 | SearchEvaluationsPage.createEmptyPage().createPageAsync(context, futureResponse);
|
4972 | 4941 | return ApiFutures.transform(
|
4973 | 4942 | futurePage,
|
4974 |
| - new ApiFunction<SearchEvaluationsPage, SearchEvaluationsPagedResponse>() { |
4975 |
| - @Override |
4976 |
| - public SearchEvaluationsPagedResponse apply(SearchEvaluationsPage input) { |
4977 |
| - return new SearchEvaluationsPagedResponse(input); |
4978 |
| - } |
4979 |
| - }, |
| 4943 | + input -> new SearchEvaluationsPagedResponse(input), |
4980 | 4944 | MoreExecutors.directExecutor());
|
4981 | 4945 | }
|
4982 | 4946 |
|
@@ -5057,12 +5021,7 @@ public static ApiFuture<SearchExampleComparisonsPagedResponse> createAsync(
|
5057 | 5021 | SearchExampleComparisonsPage.createEmptyPage().createPageAsync(context, futureResponse);
|
5058 | 5022 | return ApiFutures.transform(
|
5059 | 5023 | futurePage,
|
5060 |
| - new ApiFunction<SearchExampleComparisonsPage, SearchExampleComparisonsPagedResponse>() { |
5061 |
| - @Override |
5062 |
| - public SearchExampleComparisonsPagedResponse apply(SearchExampleComparisonsPage input) { |
5063 |
| - return new SearchExampleComparisonsPagedResponse(input); |
5064 |
| - } |
5065 |
| - }, |
| 5024 | + input -> new SearchExampleComparisonsPagedResponse(input), |
5066 | 5025 | MoreExecutors.directExecutor());
|
5067 | 5026 | }
|
5068 | 5027 |
|
@@ -5154,12 +5113,7 @@ public static ApiFuture<ListEvaluationJobsPagedResponse> createAsync(
|
5154 | 5113 | ListEvaluationJobsPage.createEmptyPage().createPageAsync(context, futureResponse);
|
5155 | 5114 | return ApiFutures.transform(
|
5156 | 5115 | futurePage,
|
5157 |
| - new ApiFunction<ListEvaluationJobsPage, ListEvaluationJobsPagedResponse>() { |
5158 |
| - @Override |
5159 |
| - public ListEvaluationJobsPagedResponse apply(ListEvaluationJobsPage input) { |
5160 |
| - return new ListEvaluationJobsPagedResponse(input); |
5161 |
| - } |
5162 |
| - }, |
| 5116 | + input -> new ListEvaluationJobsPagedResponse(input), |
5163 | 5117 | MoreExecutors.directExecutor());
|
5164 | 5118 | }
|
5165 | 5119 |
|
|
0 commit comments