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

Commit 59b735f

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

6 files changed

Lines changed: 149 additions & 501 deletions

File tree

google-cloud-channel/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceClient.java

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

1717
package com.google.cloud.channel.v1;
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;
@@ -4328,12 +4327,7 @@ public static ApiFuture<ListCustomersPagedResponse> createAsync(
43284327
ListCustomersPage.createEmptyPage().createPageAsync(context, futureResponse);
43294328
return ApiFutures.transform(
43304329
futurePage,
4331-
new ApiFunction<ListCustomersPage, ListCustomersPagedResponse>() {
4332-
@Override
4333-
public ListCustomersPagedResponse apply(ListCustomersPage input) {
4334-
return new ListCustomersPagedResponse(input);
4335-
}
4336-
},
4330+
input -> new ListCustomersPagedResponse(input),
43374331
MoreExecutors.directExecutor());
43384332
}
43394333

@@ -4409,12 +4403,7 @@ public static ApiFuture<ListEntitlementsPagedResponse> createAsync(
44094403
ListEntitlementsPage.createEmptyPage().createPageAsync(context, futureResponse);
44104404
return ApiFutures.transform(
44114405
futurePage,
4412-
new ApiFunction<ListEntitlementsPage, ListEntitlementsPagedResponse>() {
4413-
@Override
4414-
public ListEntitlementsPagedResponse apply(ListEntitlementsPage input) {
4415-
return new ListEntitlementsPagedResponse(input);
4416-
}
4417-
},
4406+
input -> new ListEntitlementsPagedResponse(input),
44184407
MoreExecutors.directExecutor());
44194408
}
44204409

@@ -4492,12 +4481,7 @@ public static ApiFuture<ListTransferableSkusPagedResponse> createAsync(
44924481
ListTransferableSkusPage.createEmptyPage().createPageAsync(context, futureResponse);
44934482
return ApiFutures.transform(
44944483
futurePage,
4495-
new ApiFunction<ListTransferableSkusPage, ListTransferableSkusPagedResponse>() {
4496-
@Override
4497-
public ListTransferableSkusPagedResponse apply(ListTransferableSkusPage input) {
4498-
return new ListTransferableSkusPagedResponse(input);
4499-
}
4500-
},
4484+
input -> new ListTransferableSkusPagedResponse(input),
45014485
MoreExecutors.directExecutor());
45024486
}
45034487

@@ -4582,12 +4566,7 @@ public static ApiFuture<ListTransferableOffersPagedResponse> createAsync(
45824566
ListTransferableOffersPage.createEmptyPage().createPageAsync(context, futureResponse);
45834567
return ApiFutures.transform(
45844568
futurePage,
4585-
new ApiFunction<ListTransferableOffersPage, ListTransferableOffersPagedResponse>() {
4586-
@Override
4587-
public ListTransferableOffersPagedResponse apply(ListTransferableOffersPage input) {
4588-
return new ListTransferableOffersPagedResponse(input);
4589-
}
4590-
},
4569+
input -> new ListTransferableOffersPagedResponse(input),
45914570
MoreExecutors.directExecutor());
45924571
}
45934572

@@ -4675,12 +4654,7 @@ public static ApiFuture<ListChannelPartnerLinksPagedResponse> createAsync(
46754654
ListChannelPartnerLinksPage.createEmptyPage().createPageAsync(context, futureResponse);
46764655
return ApiFutures.transform(
46774656
futurePage,
4678-
new ApiFunction<ListChannelPartnerLinksPage, ListChannelPartnerLinksPagedResponse>() {
4679-
@Override
4680-
public ListChannelPartnerLinksPagedResponse apply(ListChannelPartnerLinksPage input) {
4681-
return new ListChannelPartnerLinksPagedResponse(input);
4682-
}
4683-
},
4657+
input -> new ListChannelPartnerLinksPagedResponse(input),
46844658
MoreExecutors.directExecutor());
46854659
}
46864660

@@ -4766,12 +4740,7 @@ public static ApiFuture<ListProductsPagedResponse> createAsync(
47664740
ListProductsPage.createEmptyPage().createPageAsync(context, futureResponse);
47674741
return ApiFutures.transform(
47684742
futurePage,
4769-
new ApiFunction<ListProductsPage, ListProductsPagedResponse>() {
4770-
@Override
4771-
public ListProductsPagedResponse apply(ListProductsPage input) {
4772-
return new ListProductsPagedResponse(input);
4773-
}
4774-
},
4743+
input -> new ListProductsPagedResponse(input),
47754744
MoreExecutors.directExecutor());
47764745
}
47774746

@@ -4841,14 +4810,7 @@ public static ApiFuture<ListSkusPagedResponse> createAsync(
48414810
ApiFuture<ListSkusPage> futurePage =
48424811
ListSkusPage.createEmptyPage().createPageAsync(context, futureResponse);
48434812
return ApiFutures.transform(
4844-
futurePage,
4845-
new ApiFunction<ListSkusPage, ListSkusPagedResponse>() {
4846-
@Override
4847-
public ListSkusPagedResponse apply(ListSkusPage input) {
4848-
return new ListSkusPagedResponse(input);
4849-
}
4850-
},
4851-
MoreExecutors.directExecutor());
4813+
futurePage, input -> new ListSkusPagedResponse(input), MoreExecutors.directExecutor());
48524814
}
48534815

48544816
private ListSkusPagedResponse(ListSkusPage page) {
@@ -4915,14 +4877,7 @@ public static ApiFuture<ListOffersPagedResponse> createAsync(
49154877
ApiFuture<ListOffersPage> futurePage =
49164878
ListOffersPage.createEmptyPage().createPageAsync(context, futureResponse);
49174879
return ApiFutures.transform(
4918-
futurePage,
4919-
new ApiFunction<ListOffersPage, ListOffersPagedResponse>() {
4920-
@Override
4921-
public ListOffersPagedResponse apply(ListOffersPage input) {
4922-
return new ListOffersPagedResponse(input);
4923-
}
4924-
},
4925-
MoreExecutors.directExecutor());
4880+
futurePage, input -> new ListOffersPagedResponse(input), MoreExecutors.directExecutor());
49264881
}
49274882

49284883
private ListOffersPagedResponse(ListOffersPage page) {
@@ -4997,12 +4952,7 @@ public static ApiFuture<ListPurchasableSkusPagedResponse> createAsync(
49974952
ListPurchasableSkusPage.createEmptyPage().createPageAsync(context, futureResponse);
49984953
return ApiFutures.transform(
49994954
futurePage,
5000-
new ApiFunction<ListPurchasableSkusPage, ListPurchasableSkusPagedResponse>() {
5001-
@Override
5002-
public ListPurchasableSkusPagedResponse apply(ListPurchasableSkusPage input) {
5003-
return new ListPurchasableSkusPagedResponse(input);
5004-
}
5005-
},
4955+
input -> new ListPurchasableSkusPagedResponse(input),
50064956
MoreExecutors.directExecutor());
50074957
}
50084958

@@ -5086,12 +5036,7 @@ public static ApiFuture<ListPurchasableOffersPagedResponse> createAsync(
50865036
ListPurchasableOffersPage.createEmptyPage().createPageAsync(context, futureResponse);
50875037
return ApiFutures.transform(
50885038
futurePage,
5089-
new ApiFunction<ListPurchasableOffersPage, ListPurchasableOffersPagedResponse>() {
5090-
@Override
5091-
public ListPurchasableOffersPagedResponse apply(ListPurchasableOffersPage input) {
5092-
return new ListPurchasableOffersPagedResponse(input);
5093-
}
5094-
},
5039+
input -> new ListPurchasableOffersPagedResponse(input),
50955040
MoreExecutors.directExecutor());
50965041
}
50975042

@@ -5174,12 +5119,7 @@ public static ApiFuture<ListSubscribersPagedResponse> createAsync(
51745119
ListSubscribersPage.createEmptyPage().createPageAsync(context, futureResponse);
51755120
return ApiFutures.transform(
51765121
futurePage,
5177-
new ApiFunction<ListSubscribersPage, ListSubscribersPagedResponse>() {
5178-
@Override
5179-
public ListSubscribersPagedResponse apply(ListSubscribersPage input) {
5180-
return new ListSubscribersPagedResponse(input);
5181-
}
5182-
},
5122+
input -> new ListSubscribersPagedResponse(input),
51835123
MoreExecutors.directExecutor());
51845124
}
51855125

google-cloud-channel/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceSettings.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,14 +453,13 @@ public CloudChannelServiceStubSettings.Builder getStubSettingsBuilder() {
453453
return ((CloudChannelServiceStubSettings.Builder) getStubSettings());
454454
}
455455

456-
// NEXT_MAJOR_VER: remove 'throws Exception'.
457456
/**
458457
* Applies the given settings updater function to all of the unary API methods in this service.
459458
*
460459
* <p>Note: This method does not support applying settings to streaming methods.
461460
*/
462461
public Builder applyToAllUnaryMethods(
463-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
462+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
464463
super.applyToAllUnaryMethods(
465464
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
466465
return this;

google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/CloudChannelServiceStubSettings.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2129,14 +2129,13 @@ private static Builder initDefaults(Builder builder) {
21292129
return builder;
21302130
}
21312131

2132-
// NEXT_MAJOR_VER: remove 'throws Exception'.
21332132
/**
21342133
* Applies the given settings updater function to all of the unary API methods in this service.
21352134
*
21362135
* <p>Note: This method does not support applying settings to streaming methods.
21372136
*/
21382137
public Builder applyToAllUnaryMethods(
2139-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
2138+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
21402139
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
21412140
return this;
21422141
}

0 commit comments

Comments
 (0)