From c3418bdbddfb99ff80c231500f031d95d4cd067c Mon Sep 17 00:00:00 2001
From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Date: Fri, 6 Aug 2021 18:06:18 +0000
Subject: [PATCH] feat!: release gapic-generator-java v2.0.0 (#574)
Committer: @miraleung
PiperOrigin-RevId: 388535346
Source-Link: https://github.com/googleapis/googleapis/commit/d9eaf41de44d953458b18712a3f240bb4c564e48
Source-Link: https://github.com/googleapis/googleapis-gen/commit/976c5ab6f24b58c91fe04847ead1953f99d19e6a
---
.../v1/DocumentProcessorServiceSettings.java | 3 +-
.../DocumentProcessorServiceStubSettings.java | 3 +-
.../GrpcDocumentProcessorServiceStub.java | 36 +++----
.../DocumentUnderstandingServiceSettings.java | 3 +-
...umentUnderstandingServiceStubSettings.java | 3 +-
.../GrpcDocumentUnderstandingServiceStub.java | 13 +--
.../DocumentUnderstandingServiceSettings.java | 3 +-
...umentUnderstandingServiceStubSettings.java | 3 +-
.../GrpcDocumentUnderstandingServiceStub.java | 24 ++---
.../DocumentProcessorServiceClient.java | 8 +-
.../DocumentProcessorServiceSettings.java | 3 +-
.../DocumentProcessorServiceStubSettings.java | 3 +-
.../GrpcDocumentProcessorServiceStub.java | 102 +++++++-----------
13 files changed, 69 insertions(+), 138 deletions(-)
diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/DocumentProcessorServiceSettings.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/DocumentProcessorServiceSettings.java
index 77513d68..86198bfd 100644
--- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/DocumentProcessorServiceSettings.java
+++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/DocumentProcessorServiceSettings.java
@@ -187,14 +187,13 @@ public DocumentProcessorServiceStubSettings.Builder getStubSettingsBuilder() {
return ((DocumentProcessorServiceStubSettings.Builder) getStubSettings());
}
- // NEXT_MAJOR_VER: remove 'throws Exception'.
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
*
Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
- ApiFunction, Void> settingsUpdater) throws Exception {
+ ApiFunction, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/DocumentProcessorServiceStubSettings.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/DocumentProcessorServiceStubSettings.java
index 4b82b33e..48029f1d 100644
--- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/DocumentProcessorServiceStubSettings.java
+++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/DocumentProcessorServiceStubSettings.java
@@ -377,14 +377,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.
*
* Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
- ApiFunction, Void> settingsUpdater) throws Exception {
+ ApiFunction, Void> settingsUpdater) {
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
return this;
}
diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/GrpcDocumentProcessorServiceStub.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/GrpcDocumentProcessorServiceStub.java
index a249abdd..70819895 100644
--- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/GrpcDocumentProcessorServiceStub.java
+++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1/stub/GrpcDocumentProcessorServiceStub.java
@@ -22,7 +22,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.documentai.v1.BatchProcessMetadata;
import com.google.cloud.documentai.v1.BatchProcessRequest;
@@ -38,7 +37,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;
@@ -139,40 +137,30 @@ protected GrpcDocumentProcessorServiceStub(
GrpcCallSettings.newBuilder()
.setMethodDescriptor(processDocumentMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(ProcessRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("name", String.valueOf(request.getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
})
.build();
GrpcCallSettings batchProcessDocumentsTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(batchProcessDocumentsMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(BatchProcessRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("name", String.valueOf(request.getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
})
.build();
GrpcCallSettings reviewDocumentTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(reviewDocumentMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(ReviewDocumentRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put(
- "human_review_config", String.valueOf(request.getHumanReviewConfig()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("human_review_config", String.valueOf(request.getHumanReviewConfig()));
+ return params.build();
})
.build();
diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/DocumentUnderstandingServiceSettings.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/DocumentUnderstandingServiceSettings.java
index dac93c82..76f4afe4 100644
--- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/DocumentUnderstandingServiceSettings.java
+++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/DocumentUnderstandingServiceSettings.java
@@ -172,14 +172,13 @@ public DocumentUnderstandingServiceStubSettings.Builder getStubSettingsBuilder()
return ((DocumentUnderstandingServiceStubSettings.Builder) getStubSettings());
}
- // NEXT_MAJOR_VER: remove 'throws Exception'.
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
- ApiFunction, Void> settingsUpdater) throws Exception {
+ ApiFunction, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/DocumentUnderstandingServiceStubSettings.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/DocumentUnderstandingServiceStubSettings.java
index 920eec06..54376f0e 100644
--- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/DocumentUnderstandingServiceStubSettings.java
+++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/DocumentUnderstandingServiceStubSettings.java
@@ -303,14 +303,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.
*
* Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
- ApiFunction, Void> settingsUpdater) throws Exception {
+ ApiFunction, Void> settingsUpdater) {
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
return this;
}
diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/GrpcDocumentUnderstandingServiceStub.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/GrpcDocumentUnderstandingServiceStub.java
index 461c8666..58a06e43 100644
--- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/GrpcDocumentUnderstandingServiceStub.java
+++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta1/stub/GrpcDocumentUnderstandingServiceStub.java
@@ -23,7 +23,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.documentai.v1beta1.BatchProcessDocumentsRequest;
import com.google.cloud.documentai.v1beta1.BatchProcessDocumentsResponse;
@@ -34,7 +33,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;
@@ -116,13 +114,10 @@ protected GrpcDocumentUnderstandingServiceStub(
GrpcCallSettings.newBuilder()
.setMethodDescriptor(batchProcessDocumentsMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(BatchProcessDocumentsRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("parent", String.valueOf(request.getParent()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
})
.build();
diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceSettings.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceSettings.java
index 8e270c99..198bb1fd 100644
--- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceSettings.java
+++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/DocumentUnderstandingServiceSettings.java
@@ -177,14 +177,13 @@ public DocumentUnderstandingServiceStubSettings.Builder getStubSettingsBuilder()
return ((DocumentUnderstandingServiceStubSettings.Builder) getStubSettings());
}
- // NEXT_MAJOR_VER: remove 'throws Exception'.
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
- ApiFunction, Void> settingsUpdater) throws Exception {
+ ApiFunction, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/DocumentUnderstandingServiceStubSettings.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/DocumentUnderstandingServiceStubSettings.java
index 48e93174..7ee2c091 100644
--- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/DocumentUnderstandingServiceStubSettings.java
+++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/DocumentUnderstandingServiceStubSettings.java
@@ -323,14 +323,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.
*
* Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
- ApiFunction, Void> settingsUpdater) throws Exception {
+ ApiFunction, Void> settingsUpdater) {
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
return this;
}
diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/GrpcDocumentUnderstandingServiceStub.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/GrpcDocumentUnderstandingServiceStub.java
index 5db483f1..23690e5c 100644
--- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/GrpcDocumentUnderstandingServiceStub.java
+++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta2/stub/GrpcDocumentUnderstandingServiceStub.java
@@ -23,7 +23,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.documentai.v1beta2.BatchProcessDocumentsRequest;
import com.google.cloud.documentai.v1beta2.BatchProcessDocumentsResponse;
@@ -36,7 +35,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;
@@ -130,26 +128,20 @@ protected GrpcDocumentUnderstandingServiceStub(
GrpcCallSettings.newBuilder()
.setMethodDescriptor(batchProcessDocumentsMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(BatchProcessDocumentsRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("parent", String.valueOf(request.getParent()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
})
.build();
GrpcCallSettings processDocumentTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(processDocumentMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(ProcessDocumentRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("parent", String.valueOf(request.getParent()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
})
.build();
diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClient.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClient.java
index 5cf936fd..de602612 100644
--- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClient.java
+++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceClient.java
@@ -16,7 +16,6 @@
package com.google.cloud.documentai.v1beta3;
-import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.core.BetaApi;
@@ -1247,12 +1246,7 @@ public static ApiFuture createAsync(
ListProcessorsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
- new ApiFunction() {
- @Override
- public ListProcessorsPagedResponse apply(ListProcessorsPage input) {
- return new ListProcessorsPagedResponse(input);
- }
- },
+ input -> new ListProcessorsPagedResponse(input),
MoreExecutors.directExecutor());
}
diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceSettings.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceSettings.java
index 1ef54e0c..031e3e18 100644
--- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceSettings.java
+++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/DocumentProcessorServiceSettings.java
@@ -248,14 +248,13 @@ public DocumentProcessorServiceStubSettings.Builder getStubSettingsBuilder() {
return ((DocumentProcessorServiceStubSettings.Builder) getStubSettings());
}
- // NEXT_MAJOR_VER: remove 'throws Exception'.
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
- ApiFunction, Void> settingsUpdater) throws Exception {
+ ApiFunction, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentProcessorServiceStubSettings.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentProcessorServiceStubSettings.java
index 8939a3d8..e3db1c12 100644
--- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentProcessorServiceStubSettings.java
+++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/DocumentProcessorServiceStubSettings.java
@@ -696,14 +696,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.
*
* Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
- ApiFunction, Void> settingsUpdater) throws Exception {
+ ApiFunction, Void> settingsUpdater) {
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
return this;
}
diff --git a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/GrpcDocumentProcessorServiceStub.java b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/GrpcDocumentProcessorServiceStub.java
index c67a5b93..e2b1cb69 100644
--- a/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/GrpcDocumentProcessorServiceStub.java
+++ b/google-cloud-document-ai/src/main/java/com/google/cloud/documentai/v1beta3/stub/GrpcDocumentProcessorServiceStub.java
@@ -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.documentai.v1beta3.BatchProcessMetadata;
import com.google.cloud.documentai.v1beta3.BatchProcessRequest;
@@ -56,7 +55,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;
@@ -243,26 +241,20 @@ protected GrpcDocumentProcessorServiceStub(
GrpcCallSettings.newBuilder()
.setMethodDescriptor(processDocumentMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(ProcessRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("name", String.valueOf(request.getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
})
.build();
GrpcCallSettings batchProcessDocumentsTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(batchProcessDocumentsMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(BatchProcessRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("name", String.valueOf(request.getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
})
.build();
GrpcCallSettings
@@ -270,13 +262,10 @@ public Map extract(BatchProcessRequest request) {
GrpcCallSettings.newBuilder()
.setMethodDescriptor(fetchProcessorTypesMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(FetchProcessorTypesRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("parent", String.valueOf(request.getParent()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
})
.build();
GrpcCallSettings
@@ -284,79 +273,60 @@ public Map extract(FetchProcessorTypesRequest request) {
GrpcCallSettings.newBuilder()
.setMethodDescriptor(listProcessorsMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(ListProcessorsRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("parent", String.valueOf(request.getParent()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
})
.build();
GrpcCallSettings createProcessorTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(createProcessorMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(CreateProcessorRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("parent", String.valueOf(request.getParent()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
})
.build();
GrpcCallSettings deleteProcessorTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(deleteProcessorMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(DeleteProcessorRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("name", String.valueOf(request.getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
})
.build();
GrpcCallSettings enableProcessorTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(enableProcessorMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(EnableProcessorRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("name", String.valueOf(request.getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
})
.build();
GrpcCallSettings disableProcessorTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(disableProcessorMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(DisableProcessorRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("name", String.valueOf(request.getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
})
.build();
GrpcCallSettings reviewDocumentTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(reviewDocumentMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(ReviewDocumentRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put(
- "human_review_config", String.valueOf(request.getHumanReviewConfig()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("human_review_config", String.valueOf(request.getHumanReviewConfig()));
+ return params.build();
})
.build();