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 (#45)
Browse files Browse the repository at this point in the history
Committer: @miraleung
PiperOrigin-RevId: 388535346

Source-Link: googleapis/googleapis@d9eaf41

Source-Link: googleapis/googleapis-gen@976c5ab
  • Loading branch information
gcf-owl-bot[bot] committed Aug 10, 2021
1 parent f8cbd5d commit 3700bab
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 614 deletions.
Expand Up @@ -16,7 +16,6 @@

package com.google.cloud.privatecatalog.v1beta1;

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 @@ -504,12 +503,7 @@ public static ApiFuture<SearchCatalogsPagedResponse> createAsync(
SearchCatalogsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<SearchCatalogsPage, SearchCatalogsPagedResponse>() {
@Override
public SearchCatalogsPagedResponse apply(SearchCatalogsPage input) {
return new SearchCatalogsPagedResponse(input);
}
},
input -> new SearchCatalogsPagedResponse(input),
MoreExecutors.directExecutor());
}

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

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

Expand Down
Expand Up @@ -179,14 +179,13 @@ public PrivateCatalogStubSettings.Builder getStubSettingsBuilder() {
return ((PrivateCatalogStubSettings.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
Expand Up @@ -26,7 +26,6 @@
import com.google.api.gax.grpc.GrpcCallSettings;
import com.google.api.gax.grpc.GrpcStubCallableFactory;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.RequestParamsExtractor;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.privatecatalog.v1beta1.SearchCatalogsRequest;
import com.google.cloud.privatecatalog.v1beta1.SearchCatalogsResponse;
Expand All @@ -39,7 +38,6 @@
import io.grpc.MethodDescriptor;
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

Expand Down Expand Up @@ -147,41 +145,32 @@ protected GrpcPrivateCatalogStub(
GrpcCallSettings.<SearchCatalogsRequest, SearchCatalogsResponse>newBuilder()
.setMethodDescriptor(searchCatalogsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<SearchCatalogsRequest>() {
@Override
public Map<String, String> extract(SearchCatalogsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("resource", String.valueOf(request.getResource()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("resource", String.valueOf(request.getResource()));
return params.build();
})
.build();
GrpcCallSettings<SearchProductsRequest, SearchProductsResponse>
searchProductsTransportSettings =
GrpcCallSettings.<SearchProductsRequest, SearchProductsResponse>newBuilder()
.setMethodDescriptor(searchProductsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<SearchProductsRequest>() {
@Override
public Map<String, String> extract(SearchProductsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("resource", String.valueOf(request.getResource()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("resource", String.valueOf(request.getResource()));
return params.build();
})
.build();
GrpcCallSettings<SearchVersionsRequest, SearchVersionsResponse>
searchVersionsTransportSettings =
GrpcCallSettings.<SearchVersionsRequest, SearchVersionsResponse>newBuilder()
.setMethodDescriptor(searchVersionsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<SearchVersionsRequest>() {
@Override
public Map<String, String> extract(SearchVersionsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("resource", String.valueOf(request.getResource()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("resource", String.valueOf(request.getResource()));
return params.build();
})
.build();

Expand Down
Expand Up @@ -464,14 +464,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
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -76,7 +76,7 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-shared-dependencies</artifactId>
<version>1.4.0</version>
<version>2.0.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Expand Up @@ -16,4 +16,28 @@
<className>com/google/cloud/privatecatalog/v1beta1/*OrBuilder</className>
<method>boolean has*(*)</method>
</difference>
<difference>
<differenceType>8001</differenceType>
<className>com/google/cloud/privatecatalog/v1beta1/CatalogName</className>
</difference>
<difference>
<differenceType>8001</differenceType>
<className>com/google/cloud/privatecatalog/v1beta1/CatalogName$Builder</className>
</difference>
<difference>
<differenceType>8001</differenceType>
<className>com/google/cloud/privatecatalog/v1beta1/ProductName</className>
</difference>
<difference>
<differenceType>8001</differenceType>
<className>com/google/cloud/privatecatalog/v1beta1/ProductName$Builder</className>
</difference>
<difference>
<differenceType>8001</differenceType>
<className>com/google/cloud/privatecatalog/v1beta1/VersionName</className>
</difference>
<difference>
<differenceType>8001</differenceType>
<className>com/google/cloud/privatecatalog/v1beta1/VersionName$Builder</className>
</difference>
</differences>
8 changes: 0 additions & 8 deletions proto-google-cloud-private-catalog-v1beta1/pom.xml
Expand Up @@ -21,14 +21,6 @@
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-common-protos</artifactId>
</dependency>
<dependency>
<groupId>com.google.api</groupId>
<artifactId>api-common</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
</dependencies>

<build>
Expand Down

This file was deleted.

0 comments on commit 3700bab

Please sign in to comment.