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

Commit fa9defd

Browse files
feat!: release gapic-generator-java v2.0.0 (#626)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/ac2f064d-3d3b-450a-971d-7858aaf4e364/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) PiperOrigin-RevId: 388535346 Source-Link: googleapis/googleapis@d9eaf41 PiperOrigin-RevId: 388499329 Source-Link: googleapis/googleapis@bb0a090
1 parent da95635 commit fa9defd

29 files changed

+265
-478
lines changed

google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/AlertPolicyServiceClient.java

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

1717
package com.google.cloud.monitoring.v3;
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;
@@ -927,12 +926,7 @@ public static ApiFuture<ListAlertPoliciesPagedResponse> createAsync(
927926
ListAlertPoliciesPage.createEmptyPage().createPageAsync(context, futureResponse);
928927
return ApiFutures.transform(
929928
futurePage,
930-
new ApiFunction<ListAlertPoliciesPage, ListAlertPoliciesPagedResponse>() {
931-
@Override
932-
public ListAlertPoliciesPagedResponse apply(ListAlertPoliciesPage input) {
933-
return new ListAlertPoliciesPagedResponse(input);
934-
}
935-
},
929+
input -> new ListAlertPoliciesPagedResponse(input),
936930
MoreExecutors.directExecutor());
937931
}
938932

google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/AlertPolicyServiceSettings.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,13 @@ public AlertPolicyServiceStubSettings.Builder getStubSettingsBuilder() {
190190
return ((AlertPolicyServiceStubSettings.Builder) getStubSettings());
191191
}
192192

193-
// NEXT_MAJOR_VER: remove 'throws Exception'.
194193
/**
195194
* Applies the given settings updater function to all of the unary API methods in this service.
196195
*
197196
* <p>Note: This method does not support applying settings to streaming methods.
198197
*/
199198
public Builder applyToAllUnaryMethods(
200-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
199+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
201200
super.applyToAllUnaryMethods(
202201
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
203202
return this;

google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/GroupServiceClient.java

+2-15
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package com.google.cloud.monitoring.v3;
1818

1919
import com.google.api.MonitoredResource;
20-
import com.google.api.core.ApiFunction;
2120
import com.google.api.core.ApiFuture;
2221
import com.google.api.core.ApiFutures;
2322
import com.google.api.core.BetaApi;
@@ -956,14 +955,7 @@ public static ApiFuture<ListGroupsPagedResponse> createAsync(
956955
ApiFuture<ListGroupsPage> futurePage =
957956
ListGroupsPage.createEmptyPage().createPageAsync(context, futureResponse);
958957
return ApiFutures.transform(
959-
futurePage,
960-
new ApiFunction<ListGroupsPage, ListGroupsPagedResponse>() {
961-
@Override
962-
public ListGroupsPagedResponse apply(ListGroupsPage input) {
963-
return new ListGroupsPagedResponse(input);
964-
}
965-
},
966-
MoreExecutors.directExecutor());
958+
futurePage, input -> new ListGroupsPagedResponse(input), MoreExecutors.directExecutor());
967959
}
968960

969961
private ListGroupsPagedResponse(ListGroupsPage page) {
@@ -1037,12 +1029,7 @@ public static ApiFuture<ListGroupMembersPagedResponse> createAsync(
10371029
ListGroupMembersPage.createEmptyPage().createPageAsync(context, futureResponse);
10381030
return ApiFutures.transform(
10391031
futurePage,
1040-
new ApiFunction<ListGroupMembersPage, ListGroupMembersPagedResponse>() {
1041-
@Override
1042-
public ListGroupMembersPagedResponse apply(ListGroupMembersPage input) {
1043-
return new ListGroupMembersPagedResponse(input);
1044-
}
1045-
},
1032+
input -> new ListGroupMembersPagedResponse(input),
10461033
MoreExecutors.directExecutor());
10471034
}
10481035

google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/GroupServiceSettings.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,13 @@ public GroupServiceStubSettings.Builder getStubSettingsBuilder() {
197197
return ((GroupServiceStubSettings.Builder) getStubSettings());
198198
}
199199

200-
// NEXT_MAJOR_VER: remove 'throws Exception'.
201200
/**
202201
* Applies the given settings updater function to all of the unary API methods in this service.
203202
*
204203
* <p>Note: This method does not support applying settings to streaming methods.
205204
*/
206205
public Builder applyToAllUnaryMethods(
207-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
206+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
208207
super.applyToAllUnaryMethods(
209208
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
210209
return this;

google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/MetricServiceClient.java

+3-22
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import com.google.api.MetricDescriptor;
2020
import com.google.api.MonitoredResourceDescriptor;
21-
import com.google.api.core.ApiFunction;
2221
import com.google.api.core.ApiFuture;
2322
import com.google.api.core.ApiFutures;
2423
import com.google.api.core.BetaApi;
@@ -1602,15 +1601,7 @@ public static ApiFuture<ListMonitoredResourceDescriptorsPagedResponse> createAsy
16021601
.createPageAsync(context, futureResponse);
16031602
return ApiFutures.transform(
16041603
futurePage,
1605-
new ApiFunction<
1606-
ListMonitoredResourceDescriptorsPage,
1607-
ListMonitoredResourceDescriptorsPagedResponse>() {
1608-
@Override
1609-
public ListMonitoredResourceDescriptorsPagedResponse apply(
1610-
ListMonitoredResourceDescriptorsPage input) {
1611-
return new ListMonitoredResourceDescriptorsPagedResponse(input);
1612-
}
1613-
},
1604+
input -> new ListMonitoredResourceDescriptorsPagedResponse(input),
16141605
MoreExecutors.directExecutor());
16151606
}
16161607

@@ -1704,12 +1695,7 @@ public static ApiFuture<ListMetricDescriptorsPagedResponse> createAsync(
17041695
ListMetricDescriptorsPage.createEmptyPage().createPageAsync(context, futureResponse);
17051696
return ApiFutures.transform(
17061697
futurePage,
1707-
new ApiFunction<ListMetricDescriptorsPage, ListMetricDescriptorsPagedResponse>() {
1708-
@Override
1709-
public ListMetricDescriptorsPagedResponse apply(ListMetricDescriptorsPage input) {
1710-
return new ListMetricDescriptorsPagedResponse(input);
1711-
}
1712-
},
1698+
input -> new ListMetricDescriptorsPagedResponse(input),
17131699
MoreExecutors.directExecutor());
17141700
}
17151701

@@ -1792,12 +1778,7 @@ public static ApiFuture<ListTimeSeriesPagedResponse> createAsync(
17921778
ListTimeSeriesPage.createEmptyPage().createPageAsync(context, futureResponse);
17931779
return ApiFutures.transform(
17941780
futurePage,
1795-
new ApiFunction<ListTimeSeriesPage, ListTimeSeriesPagedResponse>() {
1796-
@Override
1797-
public ListTimeSeriesPagedResponse apply(ListTimeSeriesPage input) {
1798-
return new ListTimeSeriesPagedResponse(input);
1799-
}
1800-
},
1781+
input -> new ListTimeSeriesPagedResponse(input),
18011782
MoreExecutors.directExecutor());
18021783
}
18031784

google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/MetricServiceSettings.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,13 @@ public MetricServiceStubSettings.Builder getStubSettingsBuilder() {
223223
return ((MetricServiceStubSettings.Builder) getStubSettings());
224224
}
225225

226-
// NEXT_MAJOR_VER: remove 'throws Exception'.
227226
/**
228227
* Applies the given settings updater function to all of the unary API methods in this service.
229228
*
230229
* <p>Note: This method does not support applying settings to streaming methods.
231230
*/
232231
public Builder applyToAllUnaryMethods(
233-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
232+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
234233
super.applyToAllUnaryMethods(
235234
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
236235
return this;

google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/NotificationChannelServiceClient.java

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

1717
package com.google.cloud.monitoring.v3;
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;
@@ -1831,15 +1830,7 @@ public static ApiFuture<ListNotificationChannelDescriptorsPagedResponse> createA
18311830
.createPageAsync(context, futureResponse);
18321831
return ApiFutures.transform(
18331832
futurePage,
1834-
new ApiFunction<
1835-
ListNotificationChannelDescriptorsPage,
1836-
ListNotificationChannelDescriptorsPagedResponse>() {
1837-
@Override
1838-
public ListNotificationChannelDescriptorsPagedResponse apply(
1839-
ListNotificationChannelDescriptorsPage input) {
1840-
return new ListNotificationChannelDescriptorsPagedResponse(input);
1841-
}
1842-
},
1833+
input -> new ListNotificationChannelDescriptorsPagedResponse(input),
18431834
MoreExecutors.directExecutor());
18441835
}
18451836

@@ -1936,12 +1927,7 @@ public static ApiFuture<ListNotificationChannelsPagedResponse> createAsync(
19361927
ListNotificationChannelsPage.createEmptyPage().createPageAsync(context, futureResponse);
19371928
return ApiFutures.transform(
19381929
futurePage,
1939-
new ApiFunction<ListNotificationChannelsPage, ListNotificationChannelsPagedResponse>() {
1940-
@Override
1941-
public ListNotificationChannelsPagedResponse apply(ListNotificationChannelsPage input) {
1942-
return new ListNotificationChannelsPagedResponse(input);
1943-
}
1944-
},
1930+
input -> new ListNotificationChannelsPagedResponse(input),
19451931
MoreExecutors.directExecutor());
19461932
}
19471933

google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/NotificationChannelServiceSettings.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -256,14 +256,13 @@ public NotificationChannelServiceStubSettings.Builder getStubSettingsBuilder() {
256256
return ((NotificationChannelServiceStubSettings.Builder) getStubSettings());
257257
}
258258

259-
// NEXT_MAJOR_VER: remove 'throws Exception'.
260259
/**
261260
* Applies the given settings updater function to all of the unary API methods in this service.
262261
*
263262
* <p>Note: This method does not support applying settings to streaming methods.
264263
*/
265264
public Builder applyToAllUnaryMethods(
266-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
265+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
267266
super.applyToAllUnaryMethods(
268267
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
269268
return this;

google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/QueryServiceClient.java

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

1717
package com.google.cloud.monitoring.v3;
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;
@@ -297,12 +296,7 @@ public static ApiFuture<QueryTimeSeriesPagedResponse> createAsync(
297296
QueryTimeSeriesPage.createEmptyPage().createPageAsync(context, futureResponse);
298297
return ApiFutures.transform(
299298
futurePage,
300-
new ApiFunction<QueryTimeSeriesPage, QueryTimeSeriesPagedResponse>() {
301-
@Override
302-
public QueryTimeSeriesPagedResponse apply(QueryTimeSeriesPage input) {
303-
return new QueryTimeSeriesPagedResponse(input);
304-
}
305-
},
299+
input -> new QueryTimeSeriesPagedResponse(input),
306300
MoreExecutors.directExecutor());
307301
}
308302

google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/QueryServiceSettings.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,13 @@ public QueryServiceStubSettings.Builder getStubSettingsBuilder() {
162162
return ((QueryServiceStubSettings.Builder) getStubSettings());
163163
}
164164

165-
// NEXT_MAJOR_VER: remove 'throws Exception'.
166165
/**
167166
* Applies the given settings updater function to all of the unary API methods in this service.
168167
*
169168
* <p>Note: This method does not support applying settings to streaming methods.
170169
*/
171170
public Builder applyToAllUnaryMethods(
172-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
171+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
173172
super.applyToAllUnaryMethods(
174173
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
175174
return this;

google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/ServiceMonitoringServiceClient.java

+2-15
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.google.cloud.monitoring.v3;
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;
@@ -1443,12 +1442,7 @@ public static ApiFuture<ListServicesPagedResponse> createAsync(
14431442
ListServicesPage.createEmptyPage().createPageAsync(context, futureResponse);
14441443
return ApiFutures.transform(
14451444
futurePage,
1446-
new ApiFunction<ListServicesPage, ListServicesPagedResponse>() {
1447-
@Override
1448-
public ListServicesPagedResponse apply(ListServicesPage input) {
1449-
return new ListServicesPagedResponse(input);
1450-
}
1451-
},
1445+
input -> new ListServicesPagedResponse(input),
14521446
MoreExecutors.directExecutor());
14531447
}
14541448

@@ -1527,14 +1521,7 @@ public static ApiFuture<ListServiceLevelObjectivesPagedResponse> createAsync(
15271521
ListServiceLevelObjectivesPage.createEmptyPage().createPageAsync(context, futureResponse);
15281522
return ApiFutures.transform(
15291523
futurePage,
1530-
new ApiFunction<
1531-
ListServiceLevelObjectivesPage, ListServiceLevelObjectivesPagedResponse>() {
1532-
@Override
1533-
public ListServiceLevelObjectivesPagedResponse apply(
1534-
ListServiceLevelObjectivesPage input) {
1535-
return new ListServiceLevelObjectivesPagedResponse(input);
1536-
}
1537-
},
1524+
input -> new ListServiceLevelObjectivesPagedResponse(input),
15381525
MoreExecutors.directExecutor());
15391526
}
15401527

google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/ServiceMonitoringServiceSettings.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,13 @@ public ServiceMonitoringServiceStubSettings.Builder getStubSettingsBuilder() {
237237
return ((ServiceMonitoringServiceStubSettings.Builder) getStubSettings());
238238
}
239239

240-
// NEXT_MAJOR_VER: remove 'throws Exception'.
241240
/**
242241
* Applies the given settings updater function to all of the unary API methods in this service.
243242
*
244243
* <p>Note: This method does not support applying settings to streaming methods.
245244
*/
246245
public Builder applyToAllUnaryMethods(
247-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
246+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
248247
super.applyToAllUnaryMethods(
249248
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
250249
return this;

google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/UptimeCheckServiceClient.java

+2-13
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.google.cloud.monitoring.v3;
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;
@@ -1012,12 +1011,7 @@ public static ApiFuture<ListUptimeCheckConfigsPagedResponse> createAsync(
10121011
ListUptimeCheckConfigsPage.createEmptyPage().createPageAsync(context, futureResponse);
10131012
return ApiFutures.transform(
10141013
futurePage,
1015-
new ApiFunction<ListUptimeCheckConfigsPage, ListUptimeCheckConfigsPagedResponse>() {
1016-
@Override
1017-
public ListUptimeCheckConfigsPagedResponse apply(ListUptimeCheckConfigsPage input) {
1018-
return new ListUptimeCheckConfigsPagedResponse(input);
1019-
}
1020-
},
1014+
input -> new ListUptimeCheckConfigsPagedResponse(input),
10211015
MoreExecutors.directExecutor());
10221016
}
10231017

@@ -1103,12 +1097,7 @@ public static ApiFuture<ListUptimeCheckIpsPagedResponse> createAsync(
11031097
ListUptimeCheckIpsPage.createEmptyPage().createPageAsync(context, futureResponse);
11041098
return ApiFutures.transform(
11051099
futurePage,
1106-
new ApiFunction<ListUptimeCheckIpsPage, ListUptimeCheckIpsPagedResponse>() {
1107-
@Override
1108-
public ListUptimeCheckIpsPagedResponse apply(ListUptimeCheckIpsPage input) {
1109-
return new ListUptimeCheckIpsPagedResponse(input);
1110-
}
1111-
},
1100+
input -> new ListUptimeCheckIpsPagedResponse(input),
11121101
MoreExecutors.directExecutor());
11131102
}
11141103

google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/UptimeCheckServiceSettings.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -206,14 +206,13 @@ public UptimeCheckServiceStubSettings.Builder getStubSettingsBuilder() {
206206
return ((UptimeCheckServiceStubSettings.Builder) getStubSettings());
207207
}
208208

209-
// NEXT_MAJOR_VER: remove 'throws Exception'.
210209
/**
211210
* Applies the given settings updater function to all of the unary API methods in this service.
212211
*
213212
* <p>Note: This method does not support applying settings to streaming methods.
214213
*/
215214
public Builder applyToAllUnaryMethods(
216-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
215+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
217216
super.applyToAllUnaryMethods(
218217
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
219218
return this;

google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/AlertPolicyServiceStubSettings.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -418,14 +418,13 @@ private static Builder initDefaults(Builder builder) {
418418
return builder;
419419
}
420420

421-
// NEXT_MAJOR_VER: remove 'throws Exception'.
422421
/**
423422
* Applies the given settings updater function to all of the unary API methods in this service.
424423
*
425424
* <p>Note: This method does not support applying settings to streaming methods.
426425
*/
427426
public Builder applyToAllUnaryMethods(
428-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
427+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
429428
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
430429
return this;
431430
}

google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GroupServiceStubSettings.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -488,14 +488,13 @@ private static Builder initDefaults(Builder builder) {
488488
return builder;
489489
}
490490

491-
// NEXT_MAJOR_VER: remove 'throws Exception'.
492491
/**
493492
* Applies the given settings updater function to all of the unary API methods in this service.
494493
*
495494
* <p>Note: This method does not support applying settings to streaming methods.
496495
*/
497496
public Builder applyToAllUnaryMethods(
498-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
497+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
499498
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
500499
return this;
501500
}

0 commit comments

Comments
 (0)