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

Commit

Permalink
Browse files Browse the repository at this point in the history
feat!: release gapic-generator-java v2.0.0 (#557)
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/444caeff-cc47-4444-bce5-80ec3ff0f39e/targets

- [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.)

PiperOrigin-RevId: 389657692
Source-Link: googleapis/googleapis@a739464
PiperOrigin-RevId: 388535346
Source-Link: googleapis/googleapis@d9eaf41
PiperOrigin-RevId: 388499329
Source-Link: googleapis/googleapis@bb0a090
  • Loading branch information
yoshi-automation committed Aug 26, 2021
1 parent d5381c6 commit 39419ba
Show file tree
Hide file tree
Showing 11 changed files with 160 additions and 460 deletions.
Expand Up @@ -16,7 +16,6 @@

package com.google.cloud.secretmanager.v1;

import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.core.BetaApi;
Expand Down Expand Up @@ -1595,7 +1594,7 @@ public final SecretVersion destroySecretVersion(DestroySecretVersionRequest requ
* SecretManagerServiceClient.create()) {
* SetIamPolicyRequest request =
* SetIamPolicyRequest.newBuilder()
* .setResource(SecretName.of("[PROJECT]", "[SECRET]").toString())
* .setResource(ProjectName.of("[PROJECT]").toString())
* .setPolicy(Policy.newBuilder().build())
* .build();
* Policy response = secretManagerServiceClient.setIamPolicy(request);
Expand Down Expand Up @@ -1623,7 +1622,7 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
* SecretManagerServiceClient.create()) {
* SetIamPolicyRequest request =
* SetIamPolicyRequest.newBuilder()
* .setResource(SecretName.of("[PROJECT]", "[SECRET]").toString())
* .setResource(ProjectName.of("[PROJECT]").toString())
* .setPolicy(Policy.newBuilder().build())
* .build();
* ApiFuture<Policy> future =
Expand All @@ -1649,7 +1648,7 @@ public final UnaryCallable<SetIamPolicyRequest, Policy> setIamPolicyCallable() {
* SecretManagerServiceClient.create()) {
* GetIamPolicyRequest request =
* GetIamPolicyRequest.newBuilder()
* .setResource(SecretName.of("[PROJECT]", "[SECRET]").toString())
* .setResource(ProjectName.of("[PROJECT]").toString())
* .setOptions(GetPolicyOptions.newBuilder().build())
* .build();
* Policy response = secretManagerServiceClient.getIamPolicy(request);
Expand All @@ -1675,7 +1674,7 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) {
* SecretManagerServiceClient.create()) {
* GetIamPolicyRequest request =
* GetIamPolicyRequest.newBuilder()
* .setResource(SecretName.of("[PROJECT]", "[SECRET]").toString())
* .setResource(ProjectName.of("[PROJECT]").toString())
* .setOptions(GetPolicyOptions.newBuilder().build())
* .build();
* ApiFuture<Policy> future =
Expand Down Expand Up @@ -1705,7 +1704,7 @@ public final UnaryCallable<GetIamPolicyRequest, Policy> getIamPolicyCallable() {
* SecretManagerServiceClient.create()) {
* TestIamPermissionsRequest request =
* TestIamPermissionsRequest.newBuilder()
* .setResource(SecretName.of("[PROJECT]", "[SECRET]").toString())
* .setResource(ProjectName.of("[PROJECT]").toString())
* .addAllPermissions(new ArrayList<String>())
* .build();
* TestIamPermissionsResponse response = secretManagerServiceClient.testIamPermissions(request);
Expand Down Expand Up @@ -1735,7 +1734,7 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
* SecretManagerServiceClient.create()) {
* TestIamPermissionsRequest request =
* TestIamPermissionsRequest.newBuilder()
* .setResource(SecretName.of("[PROJECT]", "[SECRET]").toString())
* .setResource(ProjectName.of("[PROJECT]").toString())
* .addAllPermissions(new ArrayList<String>())
* .build();
* ApiFuture<TestIamPermissionsResponse> future =
Expand Down Expand Up @@ -1794,14 +1793,7 @@ public static ApiFuture<ListSecretsPagedResponse> createAsync(
ApiFuture<ListSecretsPage> futurePage =
ListSecretsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListSecretsPage, ListSecretsPagedResponse>() {
@Override
public ListSecretsPagedResponse apply(ListSecretsPage input) {
return new ListSecretsPagedResponse(input);
}
},
MoreExecutors.directExecutor());
futurePage, input -> new ListSecretsPagedResponse(input), MoreExecutors.directExecutor());
}

private ListSecretsPagedResponse(ListSecretsPage page) {
Expand Down Expand Up @@ -1875,12 +1867,7 @@ public static ApiFuture<ListSecretVersionsPagedResponse> createAsync(
ListSecretVersionsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListSecretVersionsPage, ListSecretVersionsPagedResponse>() {
@Override
public ListSecretVersionsPagedResponse apply(ListSecretVersionsPage input) {
return new ListSecretVersionsPagedResponse(input);
}
},
input -> new ListSecretVersionsPagedResponse(input),
MoreExecutors.directExecutor());
}

Expand Down
Expand Up @@ -246,14 +246,13 @@ public SecretManagerServiceStubSettings.Builder getStubSettingsBuilder() {
return ((SecretManagerServiceStubSettings.Builder) getStubSettings());
}

// NEXT_MAJOR_VER: remove 'throws Exception'.
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
Expand Down

0 comments on commit 39419ba

Please sign in to comment.