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

Commit

Permalink
feat!: release gapic-generator-java v2.0.0 (#107)
Browse files Browse the repository at this point in the history
* feat!: release gapic-generator-java v2.0.0

Committer: @miraleung
PiperOrigin-RevId: 388535346

Source-Link: googleapis/googleapis@d9eaf41

Source-Link: https://github.com/googleapis/googleapis-gen/commit/976c5ab6f24b58c91fe04847ead1953f99d19e6a

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md

* chore: add clirr breaking changes

* chore: fix dependencies

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Neenu1995 <neenushaji@google.com>
  • Loading branch information
3 people authored Aug 9, 2021
1 parent d613024 commit 3c689bd
Show file tree
Hide file tree
Showing 9 changed files with 122 additions and 694 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.devtools.artifactregistry.v1beta2;

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 @@ -1740,7 +1739,7 @@ public final UnaryCallable<DeleteTagRequest, Empty> deleteTagCallable() {
* try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
* SetIamPolicyRequest request =
* SetIamPolicyRequest.newBuilder()
* .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
* .setResource("SetIamPolicyRequest1223629066".toString())
* .setPolicy(Policy.newBuilder().build())
* .build();
* Policy response = artifactRegistryClient.setIamPolicy(request);
Expand All @@ -1764,7 +1763,7 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
* try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
* SetIamPolicyRequest request =
* SetIamPolicyRequest.newBuilder()
* .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
* .setResource("SetIamPolicyRequest1223629066".toString())
* .setPolicy(Policy.newBuilder().build())
* .build();
* ApiFuture<Policy> future = artifactRegistryClient.setIamPolicyCallable().futureCall(request);
Expand All @@ -1787,7 +1786,7 @@ public final UnaryCallable<SetIamPolicyRequest, Policy> setIamPolicyCallable() {
* try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
* GetIamPolicyRequest request =
* GetIamPolicyRequest.newBuilder()
* .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
* .setResource("GetIamPolicyRequest-1527610370".toString())
* .setOptions(GetPolicyOptions.newBuilder().build())
* .build();
* Policy response = artifactRegistryClient.getIamPolicy(request);
Expand All @@ -1811,7 +1810,7 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) {
* try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
* GetIamPolicyRequest request =
* GetIamPolicyRequest.newBuilder()
* .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
* .setResource("GetIamPolicyRequest-1527610370".toString())
* .setOptions(GetPolicyOptions.newBuilder().build())
* .build();
* ApiFuture<Policy> future = artifactRegistryClient.getIamPolicyCallable().futureCall(request);
Expand All @@ -1834,7 +1833,7 @@ public final UnaryCallable<GetIamPolicyRequest, Policy> getIamPolicyCallable() {
* try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
* TestIamPermissionsRequest request =
* TestIamPermissionsRequest.newBuilder()
* .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
* .setResource("TestIamPermissionsRequest942398222".toString())
* .addAllPermissions(new ArrayList<String>())
* .build();
* TestIamPermissionsResponse response = artifactRegistryClient.testIamPermissions(request);
Expand All @@ -1858,7 +1857,7 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
* try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
* TestIamPermissionsRequest request =
* TestIamPermissionsRequest.newBuilder()
* .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
* .setResource("TestIamPermissionsRequest942398222".toString())
* .addAllPermissions(new ArrayList<String>())
* .build();
* ApiFuture<TestIamPermissionsResponse> future =
Expand Down Expand Up @@ -1918,12 +1917,7 @@ public static ApiFuture<ListRepositoriesPagedResponse> createAsync(
ListRepositoriesPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListRepositoriesPage, ListRepositoriesPagedResponse>() {
@Override
public ListRepositoriesPagedResponse apply(ListRepositoriesPage input) {
return new ListRepositoriesPagedResponse(input);
}
},
input -> new ListRepositoriesPagedResponse(input),
MoreExecutors.directExecutor());
}

Expand Down Expand Up @@ -2000,12 +1994,7 @@ public static ApiFuture<ListPackagesPagedResponse> createAsync(
ListPackagesPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListPackagesPage, ListPackagesPagedResponse>() {
@Override
public ListPackagesPagedResponse apply(ListPackagesPage input) {
return new ListPackagesPagedResponse(input);
}
},
input -> new ListPackagesPagedResponse(input),
MoreExecutors.directExecutor());
}

Expand Down Expand Up @@ -2080,12 +2069,7 @@ public static ApiFuture<ListVersionsPagedResponse> createAsync(
ListVersionsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListVersionsPage, ListVersionsPagedResponse>() {
@Override
public ListVersionsPagedResponse apply(ListVersionsPage input) {
return new ListVersionsPagedResponse(input);
}
},
input -> new ListVersionsPagedResponse(input),
MoreExecutors.directExecutor());
}

Expand Down Expand Up @@ -2155,14 +2139,7 @@ public static ApiFuture<ListFilesPagedResponse> createAsync(
ApiFuture<ListFilesPage> futurePage =
ListFilesPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListFilesPage, ListFilesPagedResponse>() {
@Override
public ListFilesPagedResponse apply(ListFilesPage input) {
return new ListFilesPagedResponse(input);
}
},
MoreExecutors.directExecutor());
futurePage, input -> new ListFilesPagedResponse(input), MoreExecutors.directExecutor());
}

private ListFilesPagedResponse(ListFilesPage page) {
Expand Down Expand Up @@ -2227,14 +2204,7 @@ public static ApiFuture<ListTagsPagedResponse> createAsync(
ApiFuture<ListTagsPage> futurePage =
ListTagsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListTagsPage, ListTagsPagedResponse>() {
@Override
public ListTagsPagedResponse apply(ListTagsPage input) {
return new ListTagsPagedResponse(input);
}
},
MoreExecutors.directExecutor());
futurePage, input -> new ListTagsPagedResponse(input), MoreExecutors.directExecutor());
}

private ListTagsPagedResponse(ListTagsPage page) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,14 +304,13 @@ public ArtifactRegistryStubSettings.Builder getStubSettingsBuilder() {
return ((ArtifactRegistryStubSettings.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
Original file line number Diff line number Diff line change
Expand Up @@ -1103,14 +1103,13 @@ private static Builder initDefaults(Builder builder) {
return builder;
}

// 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(unaryMethodSettingsBuilders, settingsUpdater);
return this;
}
Expand Down
Loading

0 comments on commit 3c689bd

Please sign in to comment.