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

Commit a6f9f4e

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

File tree

4 files changed

+149
-301
lines changed

4 files changed

+149
-301
lines changed

google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java

+9-55
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.google.cloud.datalabeling.v1beta1;
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;
@@ -4466,12 +4465,7 @@ public static ApiFuture<ListDatasetsPagedResponse> createAsync(
44664465
ListDatasetsPage.createEmptyPage().createPageAsync(context, futureResponse);
44674466
return ApiFutures.transform(
44684467
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),
44754469
MoreExecutors.directExecutor());
44764470
}
44774471

@@ -4546,12 +4540,7 @@ public static ApiFuture<ListDataItemsPagedResponse> createAsync(
45464540
ListDataItemsPage.createEmptyPage().createPageAsync(context, futureResponse);
45474541
return ApiFutures.transform(
45484542
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),
45554544
MoreExecutors.directExecutor());
45564545
}
45574546

@@ -4628,12 +4617,7 @@ public static ApiFuture<ListAnnotatedDatasetsPagedResponse> createAsync(
46284617
ListAnnotatedDatasetsPage.createEmptyPage().createPageAsync(context, futureResponse);
46294618
return ApiFutures.transform(
46304619
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),
46374621
MoreExecutors.directExecutor());
46384622
}
46394623

@@ -4716,12 +4700,7 @@ public static ApiFuture<ListExamplesPagedResponse> createAsync(
47164700
ListExamplesPage.createEmptyPage().createPageAsync(context, futureResponse);
47174701
return ApiFutures.transform(
47184702
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),
47254704
MoreExecutors.directExecutor());
47264705
}
47274706

@@ -4798,12 +4777,7 @@ public static ApiFuture<ListAnnotationSpecSetsPagedResponse> createAsync(
47984777
ListAnnotationSpecSetsPage.createEmptyPage().createPageAsync(context, futureResponse);
47994778
return ApiFutures.transform(
48004779
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),
48074781
MoreExecutors.directExecutor());
48084782
}
48094783

@@ -4889,12 +4863,7 @@ public static ApiFuture<ListInstructionsPagedResponse> createAsync(
48894863
ListInstructionsPage.createEmptyPage().createPageAsync(context, futureResponse);
48904864
return ApiFutures.transform(
48914865
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),
48984867
MoreExecutors.directExecutor());
48994868
}
49004869

@@ -4971,12 +4940,7 @@ public static ApiFuture<SearchEvaluationsPagedResponse> createAsync(
49714940
SearchEvaluationsPage.createEmptyPage().createPageAsync(context, futureResponse);
49724941
return ApiFutures.transform(
49734942
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),
49804944
MoreExecutors.directExecutor());
49814945
}
49824946

@@ -5057,12 +5021,7 @@ public static ApiFuture<SearchExampleComparisonsPagedResponse> createAsync(
50575021
SearchExampleComparisonsPage.createEmptyPage().createPageAsync(context, futureResponse);
50585022
return ApiFutures.transform(
50595023
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),
50665025
MoreExecutors.directExecutor());
50675026
}
50685027

@@ -5154,12 +5113,7 @@ public static ApiFuture<ListEvaluationJobsPagedResponse> createAsync(
51545113
ListEvaluationJobsPage.createEmptyPage().createPageAsync(context, futureResponse);
51555114
return ApiFutures.transform(
51565115
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),
51635117
MoreExecutors.directExecutor());
51645118
}
51655119

google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceSettings.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -403,14 +403,13 @@ public DataLabelingServiceStubSettings.Builder getStubSettingsBuilder() {
403403
return ((DataLabelingServiceStubSettings.Builder) getStubSettings());
404404
}
405405

406-
// NEXT_MAJOR_VER: remove 'throws Exception'.
407406
/**
408407
* Applies the given settings updater function to all of the unary API methods in this service.
409408
*
410409
* <p>Note: This method does not support applying settings to streaming methods.
411410
*/
412411
public Builder applyToAllUnaryMethods(
413-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
412+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
414413
super.applyToAllUnaryMethods(
415414
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
416415
return this;

google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/stub/DataLabelingServiceStubSettings.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -1787,14 +1787,13 @@ private static Builder initDefaults(Builder builder) {
17871787
return builder;
17881788
}
17891789

1790-
// NEXT_MAJOR_VER: remove 'throws Exception'.
17911790
/**
17921791
* Applies the given settings updater function to all of the unary API methods in this service.
17931792
*
17941793
* <p>Note: This method does not support applying settings to streaming methods.
17951794
*/
17961795
public Builder applyToAllUnaryMethods(
1797-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
1796+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
17981797
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
17991798
return this;
18001799
}

0 commit comments

Comments
 (0)