From a954d42dc95189832bf448ffd89978dfeb65b768 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Thu, 28 Mar 2019 03:34:37 -0700 Subject: [PATCH] Regenerate dialogflow client (#4764) --- .../dialogflow/v2/stub/GrpcAgentsStub.java | 57 +++++++++++ .../dialogflow/v2/stub/GrpcContextsStub.java | 57 +++++++++++ .../v2/stub/GrpcEntityTypesStub.java | 94 +++++++++++++++++++ .../dialogflow/v2/stub/GrpcIntentsStub.java | 66 +++++++++++++ .../v2/stub/GrpcSessionEntityTypesStub.java | 50 ++++++++++ .../dialogflow/v2/stub/GrpcSessionsStub.java | 12 +++ .../v2beta1/stub/GrpcAgentsStub.java | 57 +++++++++++ .../v2beta1/stub/GrpcContextsStub.java | 57 +++++++++++ .../v2beta1/stub/GrpcDocumentsStub.java | 39 ++++++++ .../v2beta1/stub/GrpcEntityTypesStub.java | 94 +++++++++++++++++++ .../v2beta1/stub/GrpcIntentsStub.java | 66 +++++++++++++ .../v2beta1/stub/GrpcKnowledgeBasesStub.java | 39 ++++++++ .../stub/GrpcSessionEntityTypesStub.java | 50 ++++++++++ .../v2beta1/stub/GrpcSessionsStub.java | 12 +++ .../google-cloud-dialogflow/synth.metadata | 10 +- 15 files changed, 755 insertions(+), 5 deletions(-) diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcAgentsStub.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcAgentsStub.java index 08f18f020b44..ee743c822674 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcAgentsStub.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcAgentsStub.java @@ -24,6 +24,7 @@ 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.dialogflow.v2.Agent; import com.google.cloud.dialogflow.v2.ExportAgentRequest; @@ -34,6 +35,7 @@ import com.google.cloud.dialogflow.v2.SearchAgentsRequest; import com.google.cloud.dialogflow.v2.SearchAgentsResponse; import com.google.cloud.dialogflow.v2.TrainAgentRequest; +import com.google.common.collect.ImmutableMap; import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; import com.google.protobuf.Empty; @@ -41,6 +43,7 @@ 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; @@ -157,26 +160,80 @@ protected GrpcAgentsStub( GrpcCallSettings getAgentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getAgentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetAgentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings searchAgentsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(searchAgentsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(SearchAgentsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings trainAgentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(trainAgentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(TrainAgentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings exportAgentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(exportAgentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ExportAgentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings importAgentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(importAgentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ImportAgentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings restoreAgentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(restoreAgentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RestoreAgentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); this.getAgentCallable = diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcContextsStub.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcContextsStub.java index 2c0d8059bc36..f0996bd9faf2 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcContextsStub.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcContextsStub.java @@ -23,6 +23,7 @@ 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.dialogflow.v2.Context; import com.google.cloud.dialogflow.v2.CreateContextRequest; @@ -32,10 +33,12 @@ import com.google.cloud.dialogflow.v2.ListContextsRequest; import com.google.cloud.dialogflow.v2.ListContextsResponse; import com.google.cloud.dialogflow.v2.UpdateContextRequest; +import com.google.common.collect.ImmutableMap; import com.google.protobuf.Empty; 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; @@ -150,26 +153,80 @@ protected GrpcContextsStub( GrpcCallSettings listContextsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listContextsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListContextsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings getContextTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getContextMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetContextRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings createContextTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createContextMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateContextRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings updateContextTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateContextMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateContextRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("context.name", String.valueOf(request.getContext().getName())); + return params.build(); + } + }) .build(); GrpcCallSettings deleteContextTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteContextMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteContextRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings deleteAllContextsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteAllContextsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteAllContextsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); this.listContextsCallable = diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcEntityTypesStub.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcEntityTypesStub.java index 6e30a196c44f..e612b05e1900 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcEntityTypesStub.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcEntityTypesStub.java @@ -24,6 +24,7 @@ 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.dialogflow.v2.BatchCreateEntitiesRequest; import com.google.cloud.dialogflow.v2.BatchDeleteEntitiesRequest; @@ -38,6 +39,7 @@ import com.google.cloud.dialogflow.v2.ListEntityTypesRequest; import com.google.cloud.dialogflow.v2.ListEntityTypesResponse; import com.google.cloud.dialogflow.v2.UpdateEntityTypeRequest; +import com.google.common.collect.ImmutableMap; import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; import com.google.protobuf.Empty; @@ -45,6 +47,7 @@ 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; @@ -224,44 +227,135 @@ protected GrpcEntityTypesStub( listEntityTypesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listEntityTypesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListEntityTypesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings getEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getEntityTypeMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetEntityTypeRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings createEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createEntityTypeMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateEntityTypeRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings updateEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateEntityTypeMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateEntityTypeRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "entity_type.name", String.valueOf(request.getEntityType().getName())); + return params.build(); + } + }) .build(); GrpcCallSettings deleteEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteEntityTypeMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteEntityTypeRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings batchUpdateEntityTypesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(batchUpdateEntityTypesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchUpdateEntityTypesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings batchDeleteEntityTypesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(batchDeleteEntityTypesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchDeleteEntityTypesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings batchCreateEntitiesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(batchCreateEntitiesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchCreateEntitiesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings batchUpdateEntitiesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(batchUpdateEntitiesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchUpdateEntitiesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings batchDeleteEntitiesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(batchDeleteEntitiesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchDeleteEntitiesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); this.listEntityTypesCallable = diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcIntentsStub.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcIntentsStub.java index af0994828c68..d88c43059311 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcIntentsStub.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcIntentsStub.java @@ -24,6 +24,7 @@ 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.dialogflow.v2.BatchDeleteIntentsRequest; import com.google.cloud.dialogflow.v2.BatchUpdateIntentsRequest; @@ -35,6 +36,7 @@ import com.google.cloud.dialogflow.v2.ListIntentsRequest; import com.google.cloud.dialogflow.v2.ListIntentsResponse; import com.google.cloud.dialogflow.v2.UpdateIntentRequest; +import com.google.common.collect.ImmutableMap; import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; import com.google.protobuf.Empty; @@ -42,6 +44,7 @@ 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; @@ -168,30 +171,93 @@ protected GrpcIntentsStub( GrpcCallSettings listIntentsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listIntentsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListIntentsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings getIntentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getIntentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetIntentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings createIntentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createIntentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateIntentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings updateIntentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateIntentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateIntentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("intent.name", String.valueOf(request.getIntent().getName())); + return params.build(); + } + }) .build(); GrpcCallSettings deleteIntentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteIntentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteIntentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings batchUpdateIntentsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(batchUpdateIntentsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchUpdateIntentsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings batchDeleteIntentsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(batchDeleteIntentsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchDeleteIntentsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); this.listIntentsCallable = diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcSessionEntityTypesStub.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcSessionEntityTypesStub.java index 66854f5e0a9b..21ae2c07e207 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcSessionEntityTypesStub.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcSessionEntityTypesStub.java @@ -23,6 +23,7 @@ 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.dialogflow.v2.CreateSessionEntityTypeRequest; import com.google.cloud.dialogflow.v2.DeleteSessionEntityTypeRequest; @@ -31,10 +32,12 @@ import com.google.cloud.dialogflow.v2.ListSessionEntityTypesResponse; import com.google.cloud.dialogflow.v2.SessionEntityType; import com.google.cloud.dialogflow.v2.UpdateSessionEntityTypeRequest; +import com.google.common.collect.ImmutableMap; import com.google.protobuf.Empty; 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; @@ -163,26 +166,73 @@ protected GrpcSessionEntityTypesStub( GrpcCallSettings .newBuilder() .setMethodDescriptor(listSessionEntityTypesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListSessionEntityTypesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings getSessionEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getSessionEntityTypeMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetSessionEntityTypeRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings createSessionEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createSessionEntityTypeMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateSessionEntityTypeRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings updateSessionEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateSessionEntityTypeMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateSessionEntityTypeRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "session_entity_type.name", + String.valueOf(request.getSessionEntityType().getName())); + return params.build(); + } + }) .build(); GrpcCallSettings deleteSessionEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteSessionEntityTypeMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteSessionEntityTypeRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); this.listSessionEntityTypesCallable = diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcSessionsStub.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcSessionsStub.java index 8b3513c6cb12..b97dd4beec77 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcSessionsStub.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcSessionsStub.java @@ -22,14 +22,17 @@ import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.BidiStreamingCallable; 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.dialogflow.v2.DetectIntentRequest; import com.google.cloud.dialogflow.v2.DetectIntentResponse; import com.google.cloud.dialogflow.v2.StreamingDetectIntentRequest; import com.google.cloud.dialogflow.v2.StreamingDetectIntentResponse; +import com.google.common.collect.ImmutableMap; 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; @@ -108,6 +111,15 @@ protected GrpcSessionsStub( GrpcCallSettings detectIntentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(detectIntentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DetectIntentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("session", String.valueOf(request.getSession())); + return params.build(); + } + }) .build(); GrpcCallSettings streamingDetectIntentTransportSettings = diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcAgentsStub.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcAgentsStub.java index 0182cecf7c94..d710efab6987 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcAgentsStub.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcAgentsStub.java @@ -24,6 +24,7 @@ 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.dialogflow.v2beta1.Agent; import com.google.cloud.dialogflow.v2beta1.ExportAgentRequest; @@ -34,6 +35,7 @@ import com.google.cloud.dialogflow.v2beta1.SearchAgentsRequest; import com.google.cloud.dialogflow.v2beta1.SearchAgentsResponse; import com.google.cloud.dialogflow.v2beta1.TrainAgentRequest; +import com.google.common.collect.ImmutableMap; import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; import com.google.protobuf.Empty; @@ -41,6 +43,7 @@ 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; @@ -157,26 +160,80 @@ protected GrpcAgentsStub( GrpcCallSettings getAgentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getAgentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetAgentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings searchAgentsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(searchAgentsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(SearchAgentsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings trainAgentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(trainAgentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(TrainAgentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings exportAgentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(exportAgentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ExportAgentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings importAgentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(importAgentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ImportAgentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings restoreAgentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(restoreAgentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RestoreAgentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); this.getAgentCallable = diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcContextsStub.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcContextsStub.java index d98d68e47d28..0ae5e36be988 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcContextsStub.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcContextsStub.java @@ -23,6 +23,7 @@ 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.dialogflow.v2beta1.Context; import com.google.cloud.dialogflow.v2beta1.CreateContextRequest; @@ -32,10 +33,12 @@ import com.google.cloud.dialogflow.v2beta1.ListContextsRequest; import com.google.cloud.dialogflow.v2beta1.ListContextsResponse; import com.google.cloud.dialogflow.v2beta1.UpdateContextRequest; +import com.google.common.collect.ImmutableMap; import com.google.protobuf.Empty; 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; @@ -150,26 +153,80 @@ protected GrpcContextsStub( GrpcCallSettings listContextsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listContextsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListContextsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings getContextTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getContextMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetContextRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings createContextTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createContextMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateContextRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings updateContextTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateContextMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateContextRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("context.name", String.valueOf(request.getContext().getName())); + return params.build(); + } + }) .build(); GrpcCallSettings deleteContextTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteContextMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteContextRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings deleteAllContextsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteAllContextsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteAllContextsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); this.listContextsCallable = diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcDocumentsStub.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcDocumentsStub.java index 490977271011..cb5b1a6edbbf 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcDocumentsStub.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcDocumentsStub.java @@ -24,6 +24,7 @@ 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.dialogflow.v2beta1.CreateDocumentRequest; import com.google.cloud.dialogflow.v2beta1.DeleteDocumentRequest; @@ -32,12 +33,14 @@ import com.google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata; import com.google.cloud.dialogflow.v2beta1.ListDocumentsRequest; import com.google.cloud.dialogflow.v2beta1.ListDocumentsResponse; +import com.google.common.collect.ImmutableMap; import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; import com.google.protobuf.Empty; 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; @@ -143,18 +146,54 @@ protected GrpcDocumentsStub( GrpcCallSettings listDocumentsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listDocumentsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListDocumentsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings getDocumentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getDocumentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetDocumentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings createDocumentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createDocumentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateDocumentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings deleteDocumentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteDocumentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteDocumentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); this.listDocumentsCallable = diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcEntityTypesStub.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcEntityTypesStub.java index 6291a9058af5..025ace415157 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcEntityTypesStub.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcEntityTypesStub.java @@ -24,6 +24,7 @@ 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.dialogflow.v2beta1.BatchCreateEntitiesRequest; import com.google.cloud.dialogflow.v2beta1.BatchDeleteEntitiesRequest; @@ -38,6 +39,7 @@ import com.google.cloud.dialogflow.v2beta1.ListEntityTypesRequest; import com.google.cloud.dialogflow.v2beta1.ListEntityTypesResponse; import com.google.cloud.dialogflow.v2beta1.UpdateEntityTypeRequest; +import com.google.common.collect.ImmutableMap; import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; import com.google.protobuf.Empty; @@ -45,6 +47,7 @@ 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; @@ -226,44 +229,135 @@ protected GrpcEntityTypesStub( listEntityTypesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listEntityTypesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListEntityTypesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings getEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getEntityTypeMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetEntityTypeRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings createEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createEntityTypeMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateEntityTypeRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings updateEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateEntityTypeMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateEntityTypeRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "entity_type.name", String.valueOf(request.getEntityType().getName())); + return params.build(); + } + }) .build(); GrpcCallSettings deleteEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteEntityTypeMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteEntityTypeRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings batchUpdateEntityTypesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(batchUpdateEntityTypesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchUpdateEntityTypesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings batchDeleteEntityTypesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(batchDeleteEntityTypesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchDeleteEntityTypesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings batchCreateEntitiesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(batchCreateEntitiesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchCreateEntitiesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings batchUpdateEntitiesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(batchUpdateEntitiesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchUpdateEntitiesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings batchDeleteEntitiesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(batchDeleteEntitiesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchDeleteEntitiesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); this.listEntityTypesCallable = diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcIntentsStub.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcIntentsStub.java index d4348f080a00..c2e674aae859 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcIntentsStub.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcIntentsStub.java @@ -24,6 +24,7 @@ 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.dialogflow.v2beta1.BatchDeleteIntentsRequest; import com.google.cloud.dialogflow.v2beta1.BatchUpdateIntentsRequest; @@ -35,6 +36,7 @@ import com.google.cloud.dialogflow.v2beta1.ListIntentsRequest; import com.google.cloud.dialogflow.v2beta1.ListIntentsResponse; import com.google.cloud.dialogflow.v2beta1.UpdateIntentRequest; +import com.google.common.collect.ImmutableMap; import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; import com.google.protobuf.Empty; @@ -42,6 +44,7 @@ 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; @@ -168,30 +171,93 @@ protected GrpcIntentsStub( GrpcCallSettings listIntentsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listIntentsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListIntentsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings getIntentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getIntentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetIntentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings createIntentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createIntentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateIntentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings updateIntentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateIntentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateIntentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("intent.name", String.valueOf(request.getIntent().getName())); + return params.build(); + } + }) .build(); GrpcCallSettings deleteIntentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteIntentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteIntentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings batchUpdateIntentsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(batchUpdateIntentsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchUpdateIntentsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings batchDeleteIntentsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(batchDeleteIntentsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchDeleteIntentsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); this.listIntentsCallable = diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcKnowledgeBasesStub.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcKnowledgeBasesStub.java index af9593b146ca..1309c4c62fc9 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcKnowledgeBasesStub.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcKnowledgeBasesStub.java @@ -23,6 +23,7 @@ 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.dialogflow.v2beta1.CreateKnowledgeBaseRequest; import com.google.cloud.dialogflow.v2beta1.DeleteKnowledgeBaseRequest; @@ -30,10 +31,12 @@ import com.google.cloud.dialogflow.v2beta1.KnowledgeBase; import com.google.cloud.dialogflow.v2beta1.ListKnowledgeBasesRequest; import com.google.cloud.dialogflow.v2beta1.ListKnowledgeBasesResponse; +import com.google.common.collect.ImmutableMap; import com.google.protobuf.Empty; 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; @@ -144,19 +147,55 @@ protected GrpcKnowledgeBasesStub( listKnowledgeBasesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listKnowledgeBasesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListKnowledgeBasesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings getKnowledgeBaseTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getKnowledgeBaseMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetKnowledgeBaseRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings createKnowledgeBaseTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createKnowledgeBaseMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateKnowledgeBaseRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings deleteKnowledgeBaseTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteKnowledgeBaseMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteKnowledgeBaseRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); this.listKnowledgeBasesCallable = diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcSessionEntityTypesStub.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcSessionEntityTypesStub.java index a6b4bddfd0d0..cc57d12d0544 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcSessionEntityTypesStub.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcSessionEntityTypesStub.java @@ -23,6 +23,7 @@ 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.dialogflow.v2beta1.CreateSessionEntityTypeRequest; import com.google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest; @@ -31,10 +32,12 @@ import com.google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse; import com.google.cloud.dialogflow.v2beta1.SessionEntityType; import com.google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest; +import com.google.common.collect.ImmutableMap; import com.google.protobuf.Empty; 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; @@ -163,26 +166,73 @@ protected GrpcSessionEntityTypesStub( GrpcCallSettings .newBuilder() .setMethodDescriptor(listSessionEntityTypesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListSessionEntityTypesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings getSessionEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getSessionEntityTypeMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetSessionEntityTypeRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings createSessionEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createSessionEntityTypeMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateSessionEntityTypeRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings updateSessionEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateSessionEntityTypeMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateSessionEntityTypeRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "session_entity_type.name", + String.valueOf(request.getSessionEntityType().getName())); + return params.build(); + } + }) .build(); GrpcCallSettings deleteSessionEntityTypeTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteSessionEntityTypeMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteSessionEntityTypeRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); this.listSessionEntityTypesCallable = diff --git a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcSessionsStub.java b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcSessionsStub.java index 21ff749b2fba..b1e68532b4c8 100644 --- a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcSessionsStub.java +++ b/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcSessionsStub.java @@ -22,14 +22,17 @@ import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.BidiStreamingCallable; 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.dialogflow.v2beta1.DetectIntentRequest; import com.google.cloud.dialogflow.v2beta1.DetectIntentResponse; import com.google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest; import com.google.cloud.dialogflow.v2beta1.StreamingDetectIntentResponse; +import com.google.common.collect.ImmutableMap; 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; @@ -108,6 +111,15 @@ protected GrpcSessionsStub( GrpcCallSettings detectIntentTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(detectIntentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DetectIntentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("session", String.valueOf(request.getSession())); + return params.build(); + } + }) .build(); GrpcCallSettings streamingDetectIntentTransportSettings = diff --git a/google-cloud-clients/google-cloud-dialogflow/synth.metadata b/google-cloud-clients/google-cloud-dialogflow/synth.metadata index fdf7164f1334..72aa7278ac5a 100644 --- a/google-cloud-clients/google-cloud-dialogflow/synth.metadata +++ b/google-cloud-clients/google-cloud-dialogflow/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-03-06T08:41:27.247149Z", + "updateTime": "2019-03-28T07:42:39.272940Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.15", - "dockerImage": "googleapis/artman@sha256:9caadfa59d48224cba5f3217eb9d61a155b78ccf31e628abef385bc5b7ed3bd2" + "version": "0.16.20", + "dockerImage": "googleapis/artman@sha256:e3c054a2fb85a12481c722af616c7fb6f1d02d862248385eecbec3e4240ebd1e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "856117505ff9075b3e9c0b5674113667b6cf9e00", - "internalRef": "236931378" + "sha": "6a84b3267b0a95e922608b9891219075047eee29", + "internalRef": "240640999" } } ],