Skip to content
Permalink
Browse files
feat!: release gapic-generator-java v2.0.0 (#370)
  • Loading branch information
gcf-owl-bot[bot] committed Aug 4, 2021
1 parent 93912b3 commit bd37507e410b01f81e86d8ce6cd763d50c9cfd40
Showing with 72 additions and 165 deletions.
  1. +1 −7 ...ndations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/CatalogServiceClient.java
  2. +1 −2 ...ations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/CatalogServiceSettings.java
  3. +1 −10 ...i/src/main/java/com/google/cloud/recommendationengine/v1beta1/PredictionApiKeyRegistryClient.java
  4. +1 −2 ...src/main/java/com/google/cloud/recommendationengine/v1beta1/PredictionApiKeyRegistrySettings.java
  5. +1 −9 ...tions-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/PredictionServiceClient.java
  6. +1 −2 ...ons-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/PredictionServiceSettings.java
  7. +1 −7 ...ations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/UserEventServiceClient.java
  8. +1 −2 ...ions-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/UserEventServiceSettings.java
  9. +1 −2 .../src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/CatalogServiceStubSettings.java
  10. +24 −44 ...s-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/GrpcCatalogServiceStub.java
  11. +12 −26 ...ain/java/com/google/cloud/recommendationengine/v1beta1/stub/GrpcPredictionApiKeyRegistryStub.java
  12. +4 −9 ...i/src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/GrpcPredictionServiceStub.java
  13. +20 −37 ...ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/GrpcUserEventServiceStub.java
  14. +1 −2 ...java/com/google/cloud/recommendationengine/v1beta1/stub/PredictionApiKeyRegistryStubSettings.java
  15. +1 −2 ...c/main/java/com/google/cloud/recommendationengine/v1beta1/stub/PredictionServiceStubSettings.java
  16. +1 −2 ...rc/main/java/com/google/cloud/recommendationengine/v1beta1/stub/UserEventServiceStubSettings.java
@@ -16,7 +16,6 @@

package com.google.cloud.recommendationengine.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;
@@ -978,12 +977,7 @@ public static ApiFuture<ListCatalogItemsPagedResponse> createAsync(
ListCatalogItemsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListCatalogItemsPage, ListCatalogItemsPagedResponse>() {
@Override
public ListCatalogItemsPagedResponse apply(ListCatalogItemsPage input) {
return new ListCatalogItemsPagedResponse(input);
}
},
input -> new ListCatalogItemsPagedResponse(input),
MoreExecutors.directExecutor());
}

@@ -198,14 +198,13 @@ public CatalogServiceStubSettings.Builder getStubSettingsBuilder() {
return ((CatalogServiceStubSettings.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;
@@ -16,7 +16,6 @@

package com.google.cloud.recommendationengine.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;
@@ -637,15 +636,7 @@ public static ApiFuture<ListPredictionApiKeyRegistrationsPagedResponse> createAs
.createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<
ListPredictionApiKeyRegistrationsPage,
ListPredictionApiKeyRegistrationsPagedResponse>() {
@Override
public ListPredictionApiKeyRegistrationsPagedResponse apply(
ListPredictionApiKeyRegistrationsPage input) {
return new ListPredictionApiKeyRegistrationsPagedResponse(input);
}
},
input -> new ListPredictionApiKeyRegistrationsPagedResponse(input),
MoreExecutors.directExecutor());
}

@@ -184,14 +184,13 @@ public PredictionApiKeyRegistryStubSettings.Builder getStubSettingsBuilder() {
return ((PredictionApiKeyRegistryStubSettings.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;
@@ -16,7 +16,6 @@

package com.google.cloud.recommendationengine.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;
@@ -449,14 +448,7 @@ public static ApiFuture<PredictPagedResponse> createAsync(
ApiFuture<PredictPage> futurePage =
PredictPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<PredictPage, PredictPagedResponse>() {
@Override
public PredictPagedResponse apply(PredictPage input) {
return new PredictPagedResponse(input);
}
},
MoreExecutors.directExecutor());
futurePage, input -> new PredictPagedResponse(input), MoreExecutors.directExecutor());
}

private PredictPagedResponse(PredictPage page) {
@@ -162,14 +162,13 @@ public PredictionServiceStubSettings.Builder getStubSettingsBuilder() {
return ((PredictionServiceStubSettings.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;
@@ -17,7 +17,6 @@
package com.google.cloud.recommendationengine.v1beta1;

import com.google.api.HttpBody;
import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.core.BetaApi;
@@ -1062,12 +1061,7 @@ public static ApiFuture<ListUserEventsPagedResponse> createAsync(
ListUserEventsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListUserEventsPage, ListUserEventsPagedResponse>() {
@Override
public ListUserEventsPagedResponse apply(ListUserEventsPage input) {
return new ListUserEventsPagedResponse(input);
}
},
input -> new ListUserEventsPagedResponse(input),
MoreExecutors.directExecutor());
}

@@ -199,14 +199,13 @@ public UserEventServiceStubSettings.Builder getStubSettingsBuilder() {
return ((UserEventServiceStubSettings.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;
@@ -471,14 +471,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;
}
@@ -25,7 +25,6 @@
import com.google.api.gax.grpc.GrpcStubCallableFactory;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.RequestParamsExtractor;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.recommendationengine.v1beta1.CatalogItem;
import com.google.cloud.recommendationengine.v1beta1.CreateCatalogItemRequest;
@@ -44,7 +43,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;

@@ -185,79 +183,61 @@ protected GrpcCatalogServiceStub(
GrpcCallSettings.<CreateCatalogItemRequest, CatalogItem>newBuilder()
.setMethodDescriptor(createCatalogItemMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateCatalogItemRequest>() {
@Override
public Map<String, String> extract(CreateCatalogItemRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
})
.build();
GrpcCallSettings<GetCatalogItemRequest, CatalogItem> getCatalogItemTransportSettings =
GrpcCallSettings.<GetCatalogItemRequest, CatalogItem>newBuilder()
.setMethodDescriptor(getCatalogItemMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetCatalogItemRequest>() {
@Override
public Map<String, String> extract(GetCatalogItemRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
})
.build();
GrpcCallSettings<ListCatalogItemsRequest, ListCatalogItemsResponse>
listCatalogItemsTransportSettings =
GrpcCallSettings.<ListCatalogItemsRequest, ListCatalogItemsResponse>newBuilder()
.setMethodDescriptor(listCatalogItemsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListCatalogItemsRequest>() {
@Override
public Map<String, String> extract(ListCatalogItemsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
})
.build();
GrpcCallSettings<UpdateCatalogItemRequest, CatalogItem> updateCatalogItemTransportSettings =
GrpcCallSettings.<UpdateCatalogItemRequest, CatalogItem>newBuilder()
.setMethodDescriptor(updateCatalogItemMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateCatalogItemRequest>() {
@Override
public Map<String, String> extract(UpdateCatalogItemRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
})
.build();
GrpcCallSettings<DeleteCatalogItemRequest, Empty> deleteCatalogItemTransportSettings =
GrpcCallSettings.<DeleteCatalogItemRequest, Empty>newBuilder()
.setMethodDescriptor(deleteCatalogItemMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DeleteCatalogItemRequest>() {
@Override
public Map<String, String> extract(DeleteCatalogItemRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
})
.build();
GrpcCallSettings<ImportCatalogItemsRequest, Operation> importCatalogItemsTransportSettings =
GrpcCallSettings.<ImportCatalogItemsRequest, Operation>newBuilder()
.setMethodDescriptor(importCatalogItemsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ImportCatalogItemsRequest>() {
@Override
public Map<String, String> extract(ImportCatalogItemsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
})
.build();

@@ -24,7 +24,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.recommendationengine.v1beta1.CreatePredictionApiKeyRegistrationRequest;
import com.google.cloud.recommendationengine.v1beta1.DeletePredictionApiKeyRegistrationRequest;
@@ -37,7 +36,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;

@@ -158,14 +156,10 @@ protected GrpcPredictionApiKeyRegistryStub(
newBuilder()
.setMethodDescriptor(createPredictionApiKeyRegistrationMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreatePredictionApiKeyRegistrationRequest>() {
@Override
public Map<String, String> extract(
CreatePredictionApiKeyRegistrationRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
})
.build();
GrpcCallSettings<
@@ -177,29 +171,21 @@ public Map<String, String> extract(
newBuilder()
.setMethodDescriptor(listPredictionApiKeyRegistrationsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListPredictionApiKeyRegistrationsRequest>() {
@Override
public Map<String, String> extract(
ListPredictionApiKeyRegistrationsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
})
.build();
GrpcCallSettings<DeletePredictionApiKeyRegistrationRequest, Empty>
deletePredictionApiKeyRegistrationTransportSettings =
GrpcCallSettings.<DeletePredictionApiKeyRegistrationRequest, Empty>newBuilder()
.setMethodDescriptor(deletePredictionApiKeyRegistrationMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DeletePredictionApiKeyRegistrationRequest>() {
@Override
public Map<String, String> extract(
DeletePredictionApiKeyRegistrationRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
})
.build();

@@ -24,7 +24,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.recommendationengine.v1beta1.PredictRequest;
import com.google.cloud.recommendationengine.v1beta1.PredictResponse;
@@ -33,7 +32,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;

@@ -105,13 +103,10 @@ protected GrpcPredictionServiceStub(
GrpcCallSettings.<PredictRequest, PredictResponse>newBuilder()
.setMethodDescriptor(predictMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<PredictRequest>() {
@Override
public Map<String, String> extract(PredictRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
})
.build();

0 comments on commit bd37507

Please sign in to comment.