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

Commit 49661d3

Browse files
feat!: release gapic-generator-java v2.0.0 (#561)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/02ec5bf1-4572-42f3-886b-b70c16b17f2f/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 4938124 commit 49661d3

File tree

8 files changed

+127
-534
lines changed

8 files changed

+127
-534
lines changed

google-cloud-kms/src/main/java/com/google/cloud/kms/v1/KeyManagementServiceClient.java

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

1717
package com.google.cloud.kms.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;
@@ -3576,12 +3575,7 @@ public static ApiFuture<ListKeyRingsPagedResponse> createAsync(
35763575
ListKeyRingsPage.createEmptyPage().createPageAsync(context, futureResponse);
35773576
return ApiFutures.transform(
35783577
futurePage,
3579-
new ApiFunction<ListKeyRingsPage, ListKeyRingsPagedResponse>() {
3580-
@Override
3581-
public ListKeyRingsPagedResponse apply(ListKeyRingsPage input) {
3582-
return new ListKeyRingsPagedResponse(input);
3583-
}
3584-
},
3578+
input -> new ListKeyRingsPagedResponse(input),
35853579
MoreExecutors.directExecutor());
35863580
}
35873581

@@ -3656,12 +3650,7 @@ public static ApiFuture<ListCryptoKeysPagedResponse> createAsync(
36563650
ListCryptoKeysPage.createEmptyPage().createPageAsync(context, futureResponse);
36573651
return ApiFutures.transform(
36583652
futurePage,
3659-
new ApiFunction<ListCryptoKeysPage, ListCryptoKeysPagedResponse>() {
3660-
@Override
3661-
public ListCryptoKeysPagedResponse apply(ListCryptoKeysPage input) {
3662-
return new ListCryptoKeysPagedResponse(input);
3663-
}
3664-
},
3653+
input -> new ListCryptoKeysPagedResponse(input),
36653654
MoreExecutors.directExecutor());
36663655
}
36673656

@@ -3738,12 +3727,7 @@ public static ApiFuture<ListCryptoKeyVersionsPagedResponse> createAsync(
37383727
ListCryptoKeyVersionsPage.createEmptyPage().createPageAsync(context, futureResponse);
37393728
return ApiFutures.transform(
37403729
futurePage,
3741-
new ApiFunction<ListCryptoKeyVersionsPage, ListCryptoKeyVersionsPagedResponse>() {
3742-
@Override
3743-
public ListCryptoKeyVersionsPagedResponse apply(ListCryptoKeyVersionsPage input) {
3744-
return new ListCryptoKeyVersionsPagedResponse(input);
3745-
}
3746-
},
3730+
input -> new ListCryptoKeyVersionsPagedResponse(input),
37473731
MoreExecutors.directExecutor());
37483732
}
37493733

@@ -3826,12 +3810,7 @@ public static ApiFuture<ListImportJobsPagedResponse> createAsync(
38263810
ListImportJobsPage.createEmptyPage().createPageAsync(context, futureResponse);
38273811
return ApiFutures.transform(
38283812
futurePage,
3829-
new ApiFunction<ListImportJobsPage, ListImportJobsPagedResponse>() {
3830-
@Override
3831-
public ListImportJobsPagedResponse apply(ListImportJobsPage input) {
3832-
return new ListImportJobsPagedResponse(input);
3833-
}
3834-
},
3813+
input -> new ListImportJobsPagedResponse(input),
38353814
MoreExecutors.directExecutor());
38363815
}
38373816

google-cloud-kms/src/main/java/com/google/cloud/kms/v1/KeyManagementServiceSettings.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,14 +313,13 @@ public KeyManagementServiceStubSettings.Builder getStubSettingsBuilder() {
313313
return ((KeyManagementServiceStubSettings.Builder) getStubSettings());
314314
}
315315

316-
// NEXT_MAJOR_VER: remove 'throws Exception'.
317316
/**
318317
* Applies the given settings updater function to all of the unary API methods in this service.
319318
*
320319
* <p>Note: This method does not support applying settings to streaming methods.
321320
*/
322321
public Builder applyToAllUnaryMethods(
323-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
322+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
324323
super.applyToAllUnaryMethods(
325324
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
326325
return this;

google-cloud-kms/src/main/java/com/google/cloud/kms/v1/stub/GrpcKeyManagementServiceStub.java

Lines changed: 113 additions & 188 deletions
Large diffs are not rendered by default.

google-cloud-kms/src/main/java/com/google/cloud/kms/v1/stub/KeyManagementServiceStubSettings.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,14 +1030,13 @@ private static Builder initDefaults(Builder builder) {
10301030
return builder;
10311031
}
10321032

1033-
// NEXT_MAJOR_VER: remove 'throws Exception'.
10341033
/**
10351034
* Applies the given settings updater function to all of the unary API methods in this service.
10361035
*
10371036
* <p>Note: This method does not support applying settings to streaming methods.
10381037
*/
10391038
public Builder applyToAllUnaryMethods(
1040-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
1039+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
10411040
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
10421041
return this;
10431042
}

google-cloud-kms/src/test/java/com/google/cloud/kms/v1/KeyManagementServiceClientTest.java

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -744,14 +744,7 @@ public void getPublicKeyTest() throws Exception {
744744
PublicKey.newBuilder()
745745
.setPem("pem110872")
746746
.setPemCrc32C(Int64Value.newBuilder().build())
747-
.setName(
748-
PublicKeyName.of(
749-
"[PROJECT]",
750-
"[LOCATION]",
751-
"[KEY_RING]",
752-
"[CRYPTO_KEY]",
753-
"[CRYPTO_KEY_VERSION]")
754-
.toString())
747+
.setName("name3373707")
755748
.build();
756749
mockKeyManagementService.addResponse(expectedResponse);
757750

@@ -795,14 +788,7 @@ public void getPublicKeyTest2() throws Exception {
795788
PublicKey.newBuilder()
796789
.setPem("pem110872")
797790
.setPemCrc32C(Int64Value.newBuilder().build())
798-
.setName(
799-
PublicKeyName.of(
800-
"[PROJECT]",
801-
"[LOCATION]",
802-
"[KEY_RING]",
803-
"[CRYPTO_KEY]",
804-
"[CRYPTO_KEY_VERSION]")
805-
.toString())
791+
.setName("name3373707")
806792
.build();
807793
mockKeyManagementService.addResponse(expectedResponse);
808794

proto-google-cloud-kms-v1/clirr-ignored-differences.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@
1616
<className>com/google/cloud/kms/v1/*OrBuilder</className>
1717
<method>boolean has*(*)</method>
1818
</difference>
19+
<difference>
20+
<differenceType>8001</differenceType>
21+
<className>com/google/cloud/kms/v1/PublicKeyName*</className>
22+
</difference>
1923
</differences>

0 commit comments

Comments
 (0)