diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationsClient.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationsClient.java index 4df4983f2..d70fec564 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationsClient.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationsClient.java @@ -1188,6 +1188,148 @@ public final UnaryCallable listMessag return stub.listMessagesCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Suggest summary for a conversation based on specific historical messages. The range of the + * messages to be used for summary can be specified in the request. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationsClient conversationsClient = ConversationsClient.create()) {
+   *   ConversationName conversation =
+   *       ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]");
+   *   SuggestConversationSummaryResponse response =
+   *       conversationsClient.suggestConversationSummary(conversation);
+   * }
+   * }
+ * + * @param conversation Required. The conversation to fetch suggestion for. Format: + * `projects/<Project ID>/locations/<Location ID>/conversations/<Conversation + * ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SuggestConversationSummaryResponse suggestConversationSummary( + ConversationName conversation) { + SuggestConversationSummaryRequest request = + SuggestConversationSummaryRequest.newBuilder() + .setConversation(conversation == null ? null : conversation.toString()) + .build(); + return suggestConversationSummary(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Suggest summary for a conversation based on specific historical messages. The range of the + * messages to be used for summary can be specified in the request. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationsClient conversationsClient = ConversationsClient.create()) {
+   *   String conversation =
+   *       ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]").toString();
+   *   SuggestConversationSummaryResponse response =
+   *       conversationsClient.suggestConversationSummary(conversation);
+   * }
+   * }
+ * + * @param conversation Required. The conversation to fetch suggestion for. Format: + * `projects/<Project ID>/locations/<Location ID>/conversations/<Conversation + * ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SuggestConversationSummaryResponse suggestConversationSummary(String conversation) { + SuggestConversationSummaryRequest request = + SuggestConversationSummaryRequest.newBuilder().setConversation(conversation).build(); + return suggestConversationSummary(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Suggest summary for a conversation based on specific historical messages. The range of the + * messages to be used for summary can be specified in the request. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationsClient conversationsClient = ConversationsClient.create()) {
+   *   SuggestConversationSummaryRequest request =
+   *       SuggestConversationSummaryRequest.newBuilder()
+   *           .setConversation(
+   *               ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]")
+   *                   .toString())
+   *           .setLatestMessage(
+   *               MessageName.ofProjectConversationMessageName(
+   *                       "[PROJECT]", "[CONVERSATION]", "[MESSAGE]")
+   *                   .toString())
+   *           .setContextSize(1116903569)
+   *           .build();
+   *   SuggestConversationSummaryResponse response =
+   *       conversationsClient.suggestConversationSummary(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SuggestConversationSummaryResponse suggestConversationSummary( + SuggestConversationSummaryRequest request) { + return suggestConversationSummaryCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Suggest summary for a conversation based on specific historical messages. The range of the + * messages to be used for summary can be specified in the request. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ConversationsClient conversationsClient = ConversationsClient.create()) {
+   *   SuggestConversationSummaryRequest request =
+   *       SuggestConversationSummaryRequest.newBuilder()
+   *           .setConversation(
+   *               ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]")
+   *                   .toString())
+   *           .setLatestMessage(
+   *               MessageName.ofProjectConversationMessageName(
+   *                       "[PROJECT]", "[CONVERSATION]", "[MESSAGE]")
+   *                   .toString())
+   *           .setContextSize(1116903569)
+   *           .build();
+   *   ApiFuture future =
+   *       conversationsClient.suggestConversationSummaryCallable().futureCall(request);
+   *   // Do something.
+   *   SuggestConversationSummaryResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + suggestConversationSummaryCallable() { + return stub.suggestConversationSummaryCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationsSettings.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationsSettings.java index 3907cdbf0..74e308481 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationsSettings.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationsSettings.java @@ -113,6 +113,12 @@ public UnaryCallSettings getConversationSe return ((ConversationsStubSettings) getStubSettings()).listMessagesSettings(); } + /** Returns the object with the settings used for calls to suggestConversationSummary. */ + public UnaryCallSettings + suggestConversationSummarySettings() { + return ((ConversationsStubSettings) getStubSettings()).suggestConversationSummarySettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -277,6 +283,13 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().listMessagesSettings(); } + /** Returns the builder for the settings used for calls to suggestConversationSummary. */ + public UnaryCallSettings.Builder< + SuggestConversationSummaryRequest, SuggestConversationSummaryResponse> + suggestConversationSummarySettings() { + return getStubSettingsBuilder().suggestConversationSummarySettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/gapic_metadata.json b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/gapic_metadata.json index 2e0b5c45e..03de4e5d9 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/gapic_metadata.json +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/gapic_metadata.json @@ -132,6 +132,9 @@ }, "ListMessages": { "methods": ["listMessages", "listMessages", "listMessages", "listMessagesPagedCallable", "listMessagesCallable"] + }, + "SuggestConversationSummary": { + "methods": ["suggestConversationSummary", "suggestConversationSummary", "suggestConversationSummary", "suggestConversationSummaryCallable"] } } } diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ConversationsStub.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ConversationsStub.java index 46269a8f0..a8a351fb2 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ConversationsStub.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ConversationsStub.java @@ -33,6 +33,8 @@ import com.google.cloud.dialogflow.v2beta1.ListConversationsResponse; import com.google.cloud.dialogflow.v2beta1.ListMessagesRequest; import com.google.cloud.dialogflow.v2beta1.ListMessagesResponse; +import com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest; +import com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; @@ -84,6 +86,12 @@ public UnaryCallable listMessagesCall throw new UnsupportedOperationException("Not implemented: listMessagesCallable()"); } + public UnaryCallable + suggestConversationSummaryCallable() { + throw new UnsupportedOperationException( + "Not implemented: suggestConversationSummaryCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ConversationsStubSettings.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ConversationsStubSettings.java index ef4602c1d..9170489d0 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ConversationsStubSettings.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/ConversationsStubSettings.java @@ -56,6 +56,8 @@ import com.google.cloud.dialogflow.v2beta1.ListMessagesRequest; import com.google.cloud.dialogflow.v2beta1.ListMessagesResponse; import com.google.cloud.dialogflow.v2beta1.Message; +import com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest; +import com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; @@ -126,6 +128,9 @@ public class ConversationsStubSettings extends StubSettings listMessagesSettings; + private final UnaryCallSettings< + SuggestConversationSummaryRequest, SuggestConversationSummaryResponse> + suggestConversationSummarySettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -333,6 +338,12 @@ public UnaryCallSettings getConversationSe return listMessagesSettings; } + /** Returns the object with the settings used for calls to suggestConversationSummary. */ + public UnaryCallSettings + suggestConversationSummarySettings() { + return suggestConversationSummarySettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -456,6 +467,8 @@ protected ConversationsStubSettings(Builder settingsBuilder) throws IOException completeConversationSettings = settingsBuilder.completeConversationSettings().build(); batchCreateMessagesSettings = settingsBuilder.batchCreateMessagesSettings().build(); listMessagesSettings = settingsBuilder.listMessagesSettings().build(); + suggestConversationSummarySettings = + settingsBuilder.suggestConversationSummarySettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); } @@ -477,6 +490,9 @@ public static class Builder extends StubSettings.Builder listMessagesSettings; + private final UnaryCallSettings.Builder< + SuggestConversationSummaryRequest, SuggestConversationSummaryResponse> + suggestConversationSummarySettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -525,6 +541,7 @@ protected Builder(ClientContext clientContext) { completeConversationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); batchCreateMessagesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listMessagesSettings = PagedCallSettings.newBuilder(LIST_MESSAGES_PAGE_STR_FACT); + suggestConversationSummarySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -536,6 +553,7 @@ protected Builder(ClientContext clientContext) { completeConversationSettings, batchCreateMessagesSettings, listMessagesSettings, + suggestConversationSummarySettings, listLocationsSettings, getLocationSettings); initDefaults(this); @@ -550,6 +568,7 @@ protected Builder(ConversationsStubSettings settings) { completeConversationSettings = settings.completeConversationSettings.toBuilder(); batchCreateMessagesSettings = settings.batchCreateMessagesSettings.toBuilder(); listMessagesSettings = settings.listMessagesSettings.toBuilder(); + suggestConversationSummarySettings = settings.suggestConversationSummarySettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); @@ -561,6 +580,7 @@ protected Builder(ConversationsStubSettings settings) { completeConversationSettings, batchCreateMessagesSettings, listMessagesSettings, + suggestConversationSummarySettings, listLocationsSettings, getLocationSettings); } @@ -622,6 +642,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .suggestConversationSummarySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .listLocationsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) @@ -688,6 +713,13 @@ public Builder applyToAllUnaryMethods( return listMessagesSettings; } + /** Returns the builder for the settings used for calls to suggestConversationSummary. */ + public UnaryCallSettings.Builder< + SuggestConversationSummaryRequest, SuggestConversationSummaryResponse> + suggestConversationSummarySettings() { + return suggestConversationSummarySettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcConversationsStub.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcConversationsStub.java index b91483820..8537a057e 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcConversationsStub.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcConversationsStub.java @@ -37,6 +37,8 @@ import com.google.cloud.dialogflow.v2beta1.ListConversationsResponse; import com.google.cloud.dialogflow.v2beta1.ListMessagesRequest; import com.google.cloud.dialogflow.v2beta1.ListMessagesResponse; +import com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest; +import com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; @@ -122,6 +124,20 @@ public class GrpcConversationsStub extends ConversationsStub { ProtoUtils.marshaller(ListMessagesResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor< + SuggestConversationSummaryRequest, SuggestConversationSummaryResponse> + suggestConversationSummaryMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.dialogflow.v2beta1.Conversations/SuggestConversationSummary") + .setRequestMarshaller( + ProtoUtils.marshaller(SuggestConversationSummaryRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(SuggestConversationSummaryResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -154,6 +170,8 @@ public class GrpcConversationsStub extends ConversationsStub { private final UnaryCallable listMessagesCallable; private final UnaryCallable listMessagesPagedCallable; + private final UnaryCallable + suggestConversationSummaryCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -264,6 +282,18 @@ protected GrpcConversationsStub( return params.build(); }) .build(); + GrpcCallSettings + suggestConversationSummaryTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(suggestConversationSummaryMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("conversation", String.valueOf(request.getConversation())); + return params.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -319,6 +349,11 @@ protected GrpcConversationsStub( this.listMessagesPagedCallable = callableFactory.createPagedCallable( listMessagesTransportSettings, settings.listMessagesSettings(), clientContext); + this.suggestConversationSummaryCallable = + callableFactory.createUnaryCallable( + suggestConversationSummaryTransportSettings, + settings.suggestConversationSummarySettings(), + clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -380,6 +415,12 @@ public UnaryCallable listMessage return listMessagesPagedCallable; } + @Override + public UnaryCallable + suggestConversationSummaryCallable() { + return suggestConversationSummaryCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/HttpJsonConversationsStub.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/HttpJsonConversationsStub.java index 329de3e03..159718732 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/HttpJsonConversationsStub.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/HttpJsonConversationsStub.java @@ -42,6 +42,8 @@ import com.google.cloud.dialogflow.v2beta1.ListConversationsResponse; import com.google.cloud.dialogflow.v2beta1.ListMessagesRequest; import com.google.cloud.dialogflow.v2beta1.ListMessagesResponse; +import com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest; +import com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; @@ -292,6 +294,49 @@ public class HttpJsonConversationsStub extends ConversationsStub { .build()) .build(); + private static final ApiMethodDescriptor< + SuggestConversationSummaryRequest, SuggestConversationSummaryResponse> + suggestConversationSummaryMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.dialogflow.v2beta1.Conversations/SuggestConversationSummary") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2beta1/{conversation=projects/*/conversations/*}/suggestions:suggestConversationSummary", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "conversation", request.getConversation()); + return fields; + }) + .setAdditionalPaths( + "/v2beta1/{conversation=projects/*/locations/*/conversations/*}/suggestions:suggestConversationSummary") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", request.toBuilder().clearConversation().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(SuggestConversationSummaryResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -371,6 +416,8 @@ public class HttpJsonConversationsStub extends ConversationsStub { private final UnaryCallable listMessagesCallable; private final UnaryCallable listMessagesPagedCallable; + private final UnaryCallable + suggestConversationSummaryCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -453,6 +500,13 @@ protected HttpJsonConversationsStub( .setMethodDescriptor(listMessagesMethodDescriptor) .setTypeRegistry(typeRegistry) .build(); + HttpJsonCallSettings + suggestConversationSummaryTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(suggestConversationSummaryMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -499,6 +553,11 @@ protected HttpJsonConversationsStub( this.listMessagesPagedCallable = callableFactory.createPagedCallable( listMessagesTransportSettings, settings.listMessagesSettings(), clientContext); + this.suggestConversationSummaryCallable = + callableFactory.createUnaryCallable( + suggestConversationSummaryTransportSettings, + settings.suggestConversationSummarySettings(), + clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -522,6 +581,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(completeConversationMethodDescriptor); methodDescriptors.add(batchCreateMessagesMethodDescriptor); methodDescriptors.add(listMessagesMethodDescriptor); + methodDescriptors.add(suggestConversationSummaryMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; @@ -570,6 +630,12 @@ public UnaryCallable listMessage return listMessagesPagedCallable; } + @Override + public UnaryCallable + suggestConversationSummaryCallable() { + return suggestConversationSummaryCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/ConversationsClientHttpJsonTest.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/ConversationsClientHttpJsonTest.java index a21983648..ea94afdac 100644 --- a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/ConversationsClientHttpJsonTest.java +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/ConversationsClientHttpJsonTest.java @@ -804,6 +804,108 @@ public void listMessagesExceptionTest2() throws Exception { } } + @Test + public void suggestConversationSummaryTest() throws Exception { + SuggestConversationSummaryResponse expectedResponse = + SuggestConversationSummaryResponse.newBuilder() + .setSummary(SuggestConversationSummaryResponse.Summary.newBuilder().build()) + .setLatestMessage( + MessageName.ofProjectConversationMessageName( + "[PROJECT]", "[CONVERSATION]", "[MESSAGE]") + .toString()) + .setContextSize(1116903569) + .build(); + mockService.addResponse(expectedResponse); + + ConversationName conversation = + ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]"); + + SuggestConversationSummaryResponse actualResponse = + client.suggestConversationSummary(conversation); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void suggestConversationSummaryExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ConversationName conversation = + ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]"); + client.suggestConversationSummary(conversation); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void suggestConversationSummaryTest2() throws Exception { + SuggestConversationSummaryResponse expectedResponse = + SuggestConversationSummaryResponse.newBuilder() + .setSummary(SuggestConversationSummaryResponse.Summary.newBuilder().build()) + .setLatestMessage( + MessageName.ofProjectConversationMessageName( + "[PROJECT]", "[CONVERSATION]", "[MESSAGE]") + .toString()) + .setContextSize(1116903569) + .build(); + mockService.addResponse(expectedResponse); + + String conversation = "projects/project-5228/conversations/conversation-5228"; + + SuggestConversationSummaryResponse actualResponse = + client.suggestConversationSummary(conversation); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void suggestConversationSummaryExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String conversation = "projects/project-5228/conversations/conversation-5228"; + client.suggestConversationSummary(conversation); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/ConversationsClientTest.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/ConversationsClientTest.java index 22ba1cd1a..27c7a9dd6 100644 --- a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/ConversationsClientTest.java +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/ConversationsClientTest.java @@ -731,6 +731,98 @@ public void listMessagesExceptionTest2() throws Exception { } } + @Test + public void suggestConversationSummaryTest() throws Exception { + SuggestConversationSummaryResponse expectedResponse = + SuggestConversationSummaryResponse.newBuilder() + .setSummary(SuggestConversationSummaryResponse.Summary.newBuilder().build()) + .setLatestMessage( + MessageName.ofProjectConversationMessageName( + "[PROJECT]", "[CONVERSATION]", "[MESSAGE]") + .toString()) + .setContextSize(1116903569) + .build(); + mockConversations.addResponse(expectedResponse); + + ConversationName conversation = + ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]"); + + SuggestConversationSummaryResponse actualResponse = + client.suggestConversationSummary(conversation); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConversations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SuggestConversationSummaryRequest actualRequest = + ((SuggestConversationSummaryRequest) actualRequests.get(0)); + + Assert.assertEquals(conversation.toString(), actualRequest.getConversation()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void suggestConversationSummaryExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConversations.addException(exception); + + try { + ConversationName conversation = + ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]"); + client.suggestConversationSummary(conversation); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void suggestConversationSummaryTest2() throws Exception { + SuggestConversationSummaryResponse expectedResponse = + SuggestConversationSummaryResponse.newBuilder() + .setSummary(SuggestConversationSummaryResponse.Summary.newBuilder().build()) + .setLatestMessage( + MessageName.ofProjectConversationMessageName( + "[PROJECT]", "[CONVERSATION]", "[MESSAGE]") + .toString()) + .setContextSize(1116903569) + .build(); + mockConversations.addResponse(expectedResponse); + + String conversation = "conversation740154499"; + + SuggestConversationSummaryResponse actualResponse = + client.suggestConversationSummary(conversation); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockConversations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SuggestConversationSummaryRequest actualRequest = + ((SuggestConversationSummaryRequest) actualRequests.get(0)); + + Assert.assertEquals(conversation, actualRequest.getConversation()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void suggestConversationSummaryExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConversations.addException(exception); + + try { + String conversation = "conversation740154499"; + client.suggestConversationSummary(conversation); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/MockConversationsImpl.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/MockConversationsImpl.java index 80c0983a9..44c266bfb 100644 --- a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/MockConversationsImpl.java +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/MockConversationsImpl.java @@ -185,4 +185,26 @@ public void listMessages( Exception.class.getName()))); } } + + @Override + public void suggestConversationSummary( + SuggestConversationSummaryRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof SuggestConversationSummaryResponse) { + requests.add(request); + responseObserver.onNext(((SuggestConversationSummaryResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SuggestConversationSummary, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + SuggestConversationSummaryResponse.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationsGrpc.java b/grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationsGrpc.java index 716df9c08..bd399399e 100644 --- a/grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationsGrpc.java +++ b/grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationsGrpc.java @@ -321,6 +321,58 @@ private ConversationsGrpc() {} return getListMessagesMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest, + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse> + getSuggestConversationSummaryMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SuggestConversationSummary", + requestType = com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest.class, + responseType = com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest, + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse> + getSuggestConversationSummaryMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest, + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse> + getSuggestConversationSummaryMethod; + if ((getSuggestConversationSummaryMethod = + ConversationsGrpc.getSuggestConversationSummaryMethod) + == null) { + synchronized (ConversationsGrpc.class) { + if ((getSuggestConversationSummaryMethod = + ConversationsGrpc.getSuggestConversationSummaryMethod) + == null) { + ConversationsGrpc.getSuggestConversationSummaryMethod = + getSuggestConversationSummaryMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "SuggestConversationSummary")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ConversationsMethodDescriptorSupplier("SuggestConversationSummary")) + .build(); + } + } + } + return getSuggestConversationSummaryMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static ConversationsStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -480,6 +532,24 @@ public void listMessages( getListMessagesMethod(), responseObserver); } + /** + * + * + *
+     * Suggest summary for a conversation based on specific historical messages.
+     * The range of the messages to be used for summary can be specified in the
+     * request.
+     * 
+ */ + public void suggestConversationSummary( + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSuggestConversationSummaryMethod(), responseObserver); + } + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) @@ -525,6 +595,13 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.cloud.dialogflow.v2beta1.ListMessagesRequest, com.google.cloud.dialogflow.v2beta1.ListMessagesResponse>( this, METHODID_LIST_MESSAGES))) + .addMethod( + getSuggestConversationSummaryMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest, + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse>( + this, METHODID_SUGGEST_CONVERSATION_SUMMARY))) .build(); } } @@ -667,6 +744,26 @@ public void listMessages( request, responseObserver); } + + /** + * + * + *
+     * Suggest summary for a conversation based on specific historical messages.
+     * The range of the messages to be used for summary can be specified in the
+     * request.
+     * 
+ */ + public void suggestConversationSummary( + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSuggestConversationSummaryMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -784,6 +881,22 @@ public com.google.cloud.dialogflow.v2beta1.ListMessagesResponse listMessages( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getListMessagesMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Suggest summary for a conversation based on specific historical messages.
+     * The range of the messages to be used for summary can be specified in the
+     * request.
+     * 
+ */ + public com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse + suggestConversationSummary( + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSuggestConversationSummaryMethod(), getCallOptions(), request); + } } /** @@ -909,6 +1022,23 @@ protected ConversationsFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getListMessagesMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Suggest summary for a conversation based on specific historical messages.
+     * The range of the messages to be used for summary can be specified in the
+     * request.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse> + suggestConversationSummary( + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSuggestConversationSummaryMethod(), getCallOptions()), request); + } } private static final int METHODID_CREATE_CONVERSATION = 0; @@ -917,6 +1047,7 @@ protected ConversationsFutureStub build( private static final int METHODID_COMPLETE_CONVERSATION = 3; private static final int METHODID_BATCH_CREATE_MESSAGES = 4; private static final int METHODID_LIST_MESSAGES = 5; + private static final int METHODID_SUGGEST_CONVERSATION_SUMMARY = 6; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -974,6 +1105,13 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.cloud.dialogflow.v2beta1.ListMessagesResponse>) responseObserver); break; + case METHODID_SUGGEST_CONVERSATION_SUMMARY: + serviceImpl.suggestConversationSummary( + (com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse>) + responseObserver); + break; default: throw new AssertionError(); } @@ -1044,6 +1182,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getCompleteConversationMethod()) .addMethod(getBatchCreateMessagesMethod()) .addMethod(getListMessagesMethod()) + .addMethod(getSuggestConversationSummaryMethod()) .build(); } } diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationProto.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationProto.java index 790d3687b..71bba0c25 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationProto.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ConversationProto.java @@ -75,6 +75,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_v2beta1_ListMessagesResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_v2beta1_ListMessagesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_Summary_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_Summary_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_Summary_TextSectionsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_Summary_TextSectionsEntry_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -146,57 +162,83 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "age_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"k\n\024Li" + "stMessagesResponse\022:\n\010messages\030\001 \003(\0132(.g" + "oogle.cloud.dialogflow.v2beta1.Message\022\027" - + "\n\017next_page_token\030\002 \001(\t2\202\016\n\rConversation" - + "s\022\241\002\n\022CreateConversation\022:.google.cloud." - + "dialogflow.v2beta1.CreateConversationReq" - + "uest\032-.google.cloud.dialogflow.v2beta1.C" - + "onversation\"\237\001\202\323\344\223\002\202\001\"*/v2beta1/{parent=" - + "projects/*}/conversations:\014conversationZ" - + "F\"6/v2beta1/{parent=projects/*/locations" - + "/*}/conversations:\014conversation\332A\023parent" - + ",conversation\022\201\002\n\021ListConversations\0229.go" - + "ogle.cloud.dialogflow.v2beta1.ListConver" - + "sationsRequest\032:.google.cloud.dialogflow" - + ".v2beta1.ListConversationsResponse\"u\202\323\344\223" - + "\002f\022*/v2beta1/{parent=projects/*}/convers" - + "ationsZ8\0226/v2beta1/{parent=projects/*/lo" - + "cations/*}/conversations\332A\006parent\022\356\001\n\017Ge" - + "tConversation\0227.google.cloud.dialogflow." - + "v2beta1.GetConversationRequest\032-.google." - + "cloud.dialogflow.v2beta1.Conversation\"s\202" - + "\323\344\223\002f\022*/v2beta1/{name=projects/*/convers" - + "ations/*}Z8\0226/v2beta1/{name=projects/*/l" - + "ocations/*/conversations/*}\332A\004name\022\221\002\n\024C" - + "ompleteConversation\022<.google.cloud.dialo" - + "gflow.v2beta1.CompleteConversationReques" - + "t\032-.google.cloud.dialogflow.v2beta1.Conv" - + "ersation\"\213\001\202\323\344\223\002~\"3/v2beta1/{name=projec" - + "ts/*/conversations/*}:complete:\001*ZD\"?/v2" - + "beta1/{name=projects/*/locations/*/conve" - + "rsations/*}:complete:\001*\332A\004name\022\275\002\n\023Batch" - + "CreateMessages\022;.google.cloud.dialogflow" - + ".v2beta1.BatchCreateMessagesRequest\032<.go" - + "ogle.cloud.dialogflow.v2beta1.BatchCreat" - + "eMessagesResponse\"\252\001\202\323\344\223\002\232\001\"A/v2beta1/{p" - + "arent=projects/*/conversations/*}/messag" - + "es:batchCreate:\001*ZR\"M/v2beta1/{parent=pr" - + "ojects/*/locations/*/conversations/*}/me" - + "ssages:batchCreate:\001*\332A\006parent\022\211\002\n\014ListM" - + "essages\0224.google.cloud.dialogflow.v2beta" - + "1.ListMessagesRequest\0325.google.cloud.dia" - + "logflow.v2beta1.ListMessagesResponse\"\213\001\202" - + "\323\344\223\002|\0225/v2beta1/{parent=projects/*/conve" - + "rsations/*}/messagesZC\022A/v2beta1/{parent" - + "=projects/*/locations/*/conversations/*}" - + "/messages\332A\006parent\032x\312A\031dialogflow.google" - + "apis.com\322AYhttps://www.googleapis.com/au" - + "th/cloud-platform,https://www.googleapis" - + ".com/auth/dialogflowB\257\001\n#com.google.clou" - + "d.dialogflow.v2beta1B\021ConversationProtoP" - + "\001ZIgoogle.golang.org/genproto/googleapis" - + "/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242" - + "\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1b\006" - + "proto3" + + "\n\017next_page_token\030\002 \001(\t\"\277\001\n!SuggestConve" + + "rsationSummaryRequest\022D\n\014conversation\030\001 " + + "\001(\tB.\340A\002\372A(\n&dialogflow.googleapis.com/C" + + "onversation\022>\n\016latest_message\030\003 \001(\tB&\372A#" + + "\n!dialogflow.googleapis.com/Message\022\024\n\014c" + + "ontext_size\030\004 \001(\005\"\341\003\n\"SuggestConversatio" + + "nSummaryResponse\022\\\n\007summary\030\001 \001(\0132K.goog" + + "le.cloud.dialogflow.v2beta1.SuggestConve" + + "rsationSummaryResponse.Summary\022>\n\016latest" + + "_message\030\002 \001(\tB&\372A#\n!dialogflow.googleap" + + "is.com/Message\022\024\n\014context_size\030\003 \001(\005\032\206\002\n" + + "\007Summary\022\014\n\004text\030\001 \001(\t\022t\n\rtext_sections\030" + + "\004 \003(\0132].google.cloud.dialogflow.v2beta1." + + "SuggestConversationSummaryResponse.Summa" + + "ry.TextSectionsEntry\022B\n\ranswer_record\030\003 " + + "\001(\tB+\372A(\n&dialogflow.googleapis.com/Answ" + + "erRecord\0323\n\021TextSectionsEntry\022\013\n\003key\030\001 \001" + + "(\t\022\r\n\005value\030\002 \001(\t:\0028\0012\215\021\n\rConversations\022" + + "\241\002\n\022CreateConversation\022:.google.cloud.di" + + "alogflow.v2beta1.CreateConversationReque" + + "st\032-.google.cloud.dialogflow.v2beta1.Con" + + "versation\"\237\001\202\323\344\223\002\202\001\"*/v2beta1/{parent=pr" + + "ojects/*}/conversations:\014conversationZF\"" + + "6/v2beta1/{parent=projects/*/locations/*" + + "}/conversations:\014conversation\332A\023parent,c" + + "onversation\022\201\002\n\021ListConversations\0229.goog" + + "le.cloud.dialogflow.v2beta1.ListConversa" + + "tionsRequest\032:.google.cloud.dialogflow.v" + + "2beta1.ListConversationsResponse\"u\202\323\344\223\002f" + + "\022*/v2beta1/{parent=projects/*}/conversat" + + "ionsZ8\0226/v2beta1/{parent=projects/*/loca" + + "tions/*}/conversations\332A\006parent\022\356\001\n\017GetC" + + "onversation\0227.google.cloud.dialogflow.v2" + + "beta1.GetConversationRequest\032-.google.cl" + + "oud.dialogflow.v2beta1.Conversation\"s\202\323\344" + + "\223\002f\022*/v2beta1/{name=projects/*/conversat" + + "ions/*}Z8\0226/v2beta1/{name=projects/*/loc" + + "ations/*/conversations/*}\332A\004name\022\221\002\n\024Com" + + "pleteConversation\022<.google.cloud.dialogf" + + "low.v2beta1.CompleteConversationRequest\032" + + "-.google.cloud.dialogflow.v2beta1.Conver" + + "sation\"\213\001\202\323\344\223\002~\"3/v2beta1/{name=projects" + + "/*/conversations/*}:complete:\001*ZD\"?/v2be" + + "ta1/{name=projects/*/locations/*/convers" + + "ations/*}:complete:\001*\332A\004name\022\275\002\n\023BatchCr" + + "eateMessages\022;.google.cloud.dialogflow.v" + + "2beta1.BatchCreateMessagesRequest\032<.goog" + + "le.cloud.dialogflow.v2beta1.BatchCreateM" + + "essagesResponse\"\252\001\202\323\344\223\002\232\001\"A/v2beta1/{par" + + "ent=projects/*/conversations/*}/messages" + + ":batchCreate:\001*ZR\"M/v2beta1/{parent=proj" + + "ects/*/locations/*/conversations/*}/mess" + + "ages:batchCreate:\001*\332A\006parent\022\211\002\n\014ListMes" + + "sages\0224.google.cloud.dialogflow.v2beta1." + + "ListMessagesRequest\0325.google.cloud.dialo" + + "gflow.v2beta1.ListMessagesResponse\"\213\001\202\323\344" + + "\223\002|\0225/v2beta1/{parent=projects/*/convers" + + "ations/*}/messagesZC\022A/v2beta1/{parent=p" + + "rojects/*/locations/*/conversations/*}/m" + + "essages\332A\006parent\022\210\003\n\032SuggestConversation" + + "Summary\022B.google.cloud.dialogflow.v2beta" + + "1.SuggestConversationSummaryRequest\032C.go" + + "ogle.cloud.dialogflow.v2beta1.SuggestCon" + + "versationSummaryResponse\"\340\001\202\323\344\223\002\312\001\"Y/v2b" + + "eta1/{conversation=projects/*/conversati" + + "ons/*}/suggestions:suggestConversationSu" + + "mmary:\001*Zj\"e/v2beta1/{conversation=proje" + + "cts/*/locations/*/conversations/*}/sugge" + + "stions:suggestConversationSummary:\001*\332A\014c" + + "onversation\032x\312A\031dialogflow.googleapis.co" + + "m\322AYhttps://www.googleapis.com/auth/clou" + + "d-platform,https://www.googleapis.com/au" + + "th/dialogflowB\257\001\n#com.google.cloud.dialo" + + "gflow.v2beta1B\021ConversationProtoP\001ZIgoog" + + "le.golang.org/genproto/googleapis/cloud/" + + "dialogflow/v2beta1;dialogflow\370\001\001\242\002\002DF\252\002\037" + + "Google.Cloud.Dialogflow.V2beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -311,6 +353,42 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Messages", "NextPageToken", }); + internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryRequest_descriptor, + new java.lang.String[] { + "Conversation", "LatestMessage", "ContextSize", + }); + internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_descriptor, + new java.lang.String[] { + "Summary", "LatestMessage", "ContextSize", + }); + internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_Summary_descriptor = + internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_Summary_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_Summary_descriptor, + new java.lang.String[] { + "Text", "TextSections", "AnswerRecord", + }); + internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_Summary_TextSectionsEntry_descriptor = + internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_Summary_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_Summary_TextSectionsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_Summary_TextSectionsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantProto.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantProto.java index 496cb8a14..256f6cec6 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantProto.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantProto.java @@ -316,288 +316,289 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ReplyType\022\032\n\022allow_cancellation\030\010 \001(\010\"]\n" + "\027AutomatedAgentReplyType\022*\n&AUTOMATED_AG" + "ENT_REPLY_TYPE_UNSPECIFIED\020\000\022\013\n\007PARTIAL\020" - + "\001\022\t\n\005FINAL\020\002B\n\n\010responseB\007\n\005match\"\252\001\n\021Su" + + "\001\022\t\n\005FINAL\020\002B\n\n\010responseB\007\n\005match\"\312\001\n\021Su" + "ggestionFeature\022E\n\004type\030\001 \001(\01627.google.c" + "loud.dialogflow.v2beta1.SuggestionFeatur" - + "e.Type\"N\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\026\n\022" + + "e.Type\"n\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\026\n\022" + "ARTICLE_SUGGESTION\020\001\022\007\n\003FAQ\020\002\022\017\n\013SMART_R" - + "EPLY\020\003\"\322\001\n\025AssistQueryParameters\022x\n\032docu" - + "ments_metadata_filters\030\001 \003(\0132T.google.cl" - + "oud.dialogflow.v2beta1.AssistQueryParame" - + "ters.DocumentsMetadataFiltersEntry\032?\n\035Do" - + "cumentsMetadataFiltersEntry\022\013\n\003key\030\001 \001(\t" - + "\022\r\n\005value\030\002 \001(\t:\0028\001\"\257\005\n\025AnalyzeContentRe" - + "quest\022B\n\013participant\030\001 \001(\tB-\340A\002\372A\'\n%dial" - + "ogflow.googleapis.com/Participant\022@\n\ntex" - + "t_input\030\006 \001(\0132*.google.cloud.dialogflow." - + "v2beta1.TextInputH\000\022B\n\013audio_input\030\007 \001(\013" - + "2+.google.cloud.dialogflow.v2beta1.Audio" - + "InputH\000\022B\n\013event_input\030\010 \001(\0132+.google.cl" - + "oud.dialogflow.v2beta1.EventInputH\000\022N\n\022r" - + "eply_audio_config\030\005 \001(\01322.google.cloud.d" - + "ialogflow.v2beta1.OutputAudioConfig\022F\n\014q" - + "uery_params\030\t \001(\01320.google.cloud.dialogf" - + "low.v2beta1.QueryParameters\022S\n\023assist_qu" - + "ery_params\030\016 \001(\01326.google.cloud.dialogfl" - + "ow.v2beta1.AssistQueryParameters\022.\n\rcx_p" - + "arameters\030\022 \001(\0132\027.google.protobuf.Struct" - + "\022\027\n\017cx_current_page\030\024 \001(\t\0225\n\021message_sen" - + "d_time\030\n \001(\0132\032.google.protobuf.Timestamp" - + "\022\022\n\nrequest_id\030\013 \001(\tB\007\n\005input\",\n\016DtmfPar" - + "ameters\022\032\n\022accepts_dtmf_input\030\001 \001(\010\"\374\003\n\026" - + "AnalyzeContentResponse\022\022\n\nreply_text\030\001 \001" - + "(\t\022A\n\013reply_audio\030\002 \001(\0132,.google.cloud.d" - + "ialogflow.v2beta1.OutputAudio\022S\n\025automat" - + "ed_agent_reply\030\003 \001(\01324.google.cloud.dial" - + "ogflow.v2beta1.AutomatedAgentReply\0229\n\007me" - + "ssage\030\005 \001(\0132(.google.cloud.dialogflow.v2" - + "beta1.Message\022Y\n\036human_agent_suggestion_" - + "results\030\006 \003(\01321.google.cloud.dialogflow." - + "v2beta1.SuggestionResult\022V\n\033end_user_sug" - + "gestion_results\030\007 \003(\01321.google.cloud.dia" - + "logflow.v2beta1.SuggestionResult\022H\n\017dtmf" - + "_parameters\030\t \001(\0132/.google.cloud.dialogf" - + "low.v2beta1.DtmfParameters\"(\n\017InputTextC" - + "onfig\022\025\n\rlanguage_code\030\001 \001(\t\"\350\005\n\036Streami" - + "ngAnalyzeContentRequest\022B\n\013participant\030\001" - + " \001(\tB-\340A\002\372A\'\n%dialogflow.googleapis.com/" - + "Participant\022I\n\014audio_config\030\002 \001(\01321.goog" - + "le.cloud.dialogflow.v2beta1.InputAudioCo" - + "nfigH\000\022G\n\013text_config\030\003 \001(\01320.google.clo" - + "ud.dialogflow.v2beta1.InputTextConfigH\000\022" - + "N\n\022reply_audio_config\030\004 \001(\01322.google.clo" - + "ud.dialogflow.v2beta1.OutputAudioConfig\022" - + "\025\n\013input_audio\030\005 \001(\014H\001\022\024\n\ninput_text\030\006 \001" - + "(\tH\001\022J\n\ninput_dtmf\030\t \001(\01324.google.cloud." - + "dialogflow.v2beta1.TelephonyDtmfEventsH\001" - + "\022F\n\014query_params\030\007 \001(\01320.google.cloud.di" - + "alogflow.v2beta1.QueryParameters\022S\n\023assi" - + "st_query_params\030\010 \001(\01326.google.cloud.dia" - + "logflow.v2beta1.AssistQueryParameters\022.\n" - + "\rcx_parameters\030\r \001(\0132\027.google.protobuf.S" - + "truct\022\027\n\017cx_current_page\030\017 \001(\t\022,\n$enable" - + "_partial_automated_agent_reply\030\014 \001(\010B\010\n\006" - + "configB\007\n\005input\"\336\004\n\037StreamingAnalyzeCont" - + "entResponse\022W\n\022recognition_result\030\001 \001(\0132" - + ";.google.cloud.dialogflow.v2beta1.Stream" - + "ingRecognitionResult\022\022\n\nreply_text\030\002 \001(\t" - + "\022A\n\013reply_audio\030\003 \001(\0132,.google.cloud.dia" - + "logflow.v2beta1.OutputAudio\022S\n\025automated" - + "_agent_reply\030\004 \001(\01324.google.cloud.dialog" - + "flow.v2beta1.AutomatedAgentReply\0229\n\007mess" - + "age\030\006 \001(\0132(.google.cloud.dialogflow.v2be" - + "ta1.Message\022Y\n\036human_agent_suggestion_re" - + "sults\030\007 \003(\01321.google.cloud.dialogflow.v2" - + "beta1.SuggestionResult\022V\n\033end_user_sugge" - + "stion_results\030\010 \003(\01321.google.cloud.dialo" - + "gflow.v2beta1.SuggestionResult\022H\n\017dtmf_p" - + "arameters\030\n \001(\0132/.google.cloud.dialogflo" - + "w.v2beta1.DtmfParameters\"j\n\024AnnotatedMes" - + "sagePart\022\014\n\004text\030\001 \001(\t\022\023\n\013entity_type\030\002 " - + "\001(\t\022/\n\017formatted_value\030\003 \001(\0132\026.google.pr" - + "otobuf.Value\"s\n\021MessageAnnotation\022D\n\005par" - + "ts\030\001 \003(\01325.google.cloud.dialogflow.v2bet" - + "a1.AnnotatedMessagePart\022\030\n\020contain_entit" - + "ies\030\002 \001(\010\"\325\001\n\rArticleAnswer\022\r\n\005title\030\001 \001" - + "(\t\022\013\n\003uri\030\002 \001(\t\022\020\n\010snippets\030\003 \003(\t\022N\n\010met" - + "adata\030\005 \003(\0132<.google.cloud.dialogflow.v2" - + "beta1.ArticleAnswer.MetadataEntry\022\025\n\rans" - + "wer_record\030\006 \001(\t\032/\n\rMetadataEntry\022\013\n\003key" - + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\345\001\n\tFaqAnswer\022" - + "\016\n\006answer\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\022\020\n\010q" - + "uestion\030\003 \001(\t\022\016\n\006source\030\004 \001(\t\022J\n\010metadat" - + "a\030\005 \003(\01328.google.cloud.dialogflow.v2beta" - + "1.FaqAnswer.MetadataEntry\022\025\n\ranswer_reco" + + "EPLY\020\003\022\036\n\032CONVERSATION_SUMMARIZATION\020\010\"\322" + + "\001\n\025AssistQueryParameters\022x\n\032documents_me" + + "tadata_filters\030\001 \003(\0132T.google.cloud.dial" + + "ogflow.v2beta1.AssistQueryParameters.Doc" + + "umentsMetadataFiltersEntry\032?\n\035DocumentsM" + + "etadataFiltersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + + "e\030\002 \001(\t:\0028\001\"\257\005\n\025AnalyzeContentRequest\022B\n" + + "\013participant\030\001 \001(\tB-\340A\002\372A\'\n%dialogflow.g" + + "oogleapis.com/Participant\022@\n\ntext_input\030" + + "\006 \001(\0132*.google.cloud.dialogflow.v2beta1." + + "TextInputH\000\022B\n\013audio_input\030\007 \001(\0132+.googl" + + "e.cloud.dialogflow.v2beta1.AudioInputH\000\022" + + "B\n\013event_input\030\010 \001(\0132+.google.cloud.dial" + + "ogflow.v2beta1.EventInputH\000\022N\n\022reply_aud" + + "io_config\030\005 \001(\01322.google.cloud.dialogflo" + + "w.v2beta1.OutputAudioConfig\022F\n\014query_par" + + "ams\030\t \001(\01320.google.cloud.dialogflow.v2be" + + "ta1.QueryParameters\022S\n\023assist_query_para" + + "ms\030\016 \001(\01326.google.cloud.dialogflow.v2bet" + + "a1.AssistQueryParameters\022.\n\rcx_parameter" + + "s\030\022 \001(\0132\027.google.protobuf.Struct\022\027\n\017cx_c" + + "urrent_page\030\024 \001(\t\0225\n\021message_send_time\030\n" + + " \001(\0132\032.google.protobuf.Timestamp\022\022\n\nrequ" + + "est_id\030\013 \001(\tB\007\n\005input\",\n\016DtmfParameters\022" + + "\032\n\022accepts_dtmf_input\030\001 \001(\010\"\374\003\n\026AnalyzeC" + + "ontentResponse\022\022\n\nreply_text\030\001 \001(\t\022A\n\013re" + + "ply_audio\030\002 \001(\0132,.google.cloud.dialogflo" + + "w.v2beta1.OutputAudio\022S\n\025automated_agent" + + "_reply\030\003 \001(\01324.google.cloud.dialogflow.v" + + "2beta1.AutomatedAgentReply\0229\n\007message\030\005 " + + "\001(\0132(.google.cloud.dialogflow.v2beta1.Me" + + "ssage\022Y\n\036human_agent_suggestion_results\030" + + "\006 \003(\01321.google.cloud.dialogflow.v2beta1." + + "SuggestionResult\022V\n\033end_user_suggestion_" + + "results\030\007 \003(\01321.google.cloud.dialogflow." + + "v2beta1.SuggestionResult\022H\n\017dtmf_paramet" + + "ers\030\t \001(\0132/.google.cloud.dialogflow.v2be" + + "ta1.DtmfParameters\"(\n\017InputTextConfig\022\025\n" + + "\rlanguage_code\030\001 \001(\t\"\350\005\n\036StreamingAnalyz" + + "eContentRequest\022B\n\013participant\030\001 \001(\tB-\340A" + + "\002\372A\'\n%dialogflow.googleapis.com/Particip" + + "ant\022I\n\014audio_config\030\002 \001(\01321.google.cloud" + + ".dialogflow.v2beta1.InputAudioConfigH\000\022G" + + "\n\013text_config\030\003 \001(\01320.google.cloud.dialo" + + "gflow.v2beta1.InputTextConfigH\000\022N\n\022reply" + + "_audio_config\030\004 \001(\01322.google.cloud.dialo" + + "gflow.v2beta1.OutputAudioConfig\022\025\n\013input" + + "_audio\030\005 \001(\014H\001\022\024\n\ninput_text\030\006 \001(\tH\001\022J\n\n" + + "input_dtmf\030\t \001(\01324.google.cloud.dialogfl" + + "ow.v2beta1.TelephonyDtmfEventsH\001\022F\n\014quer" + + "y_params\030\007 \001(\01320.google.cloud.dialogflow" + + ".v2beta1.QueryParameters\022S\n\023assist_query" + + "_params\030\010 \001(\01326.google.cloud.dialogflow." + + "v2beta1.AssistQueryParameters\022.\n\rcx_para" + + "meters\030\r \001(\0132\027.google.protobuf.Struct\022\027\n" + + "\017cx_current_page\030\017 \001(\t\022,\n$enable_partial" + + "_automated_agent_reply\030\014 \001(\010B\010\n\006configB\007" + + "\n\005input\"\336\004\n\037StreamingAnalyzeContentRespo" + + "nse\022W\n\022recognition_result\030\001 \001(\0132;.google" + + ".cloud.dialogflow.v2beta1.StreamingRecog" + + "nitionResult\022\022\n\nreply_text\030\002 \001(\t\022A\n\013repl" + + "y_audio\030\003 \001(\0132,.google.cloud.dialogflow." + + "v2beta1.OutputAudio\022S\n\025automated_agent_r" + + "eply\030\004 \001(\01324.google.cloud.dialogflow.v2b" + + "eta1.AutomatedAgentReply\0229\n\007message\030\006 \001(" + + "\0132(.google.cloud.dialogflow.v2beta1.Mess" + + "age\022Y\n\036human_agent_suggestion_results\030\007 " + + "\003(\01321.google.cloud.dialogflow.v2beta1.Su" + + "ggestionResult\022V\n\033end_user_suggestion_re" + + "sults\030\010 \003(\01321.google.cloud.dialogflow.v2" + + "beta1.SuggestionResult\022H\n\017dtmf_parameter" + + "s\030\n \001(\0132/.google.cloud.dialogflow.v2beta" + + "1.DtmfParameters\"j\n\024AnnotatedMessagePart" + + "\022\014\n\004text\030\001 \001(\t\022\023\n\013entity_type\030\002 \001(\t\022/\n\017f" + + "ormatted_value\030\003 \001(\0132\026.google.protobuf.V" + + "alue\"s\n\021MessageAnnotation\022D\n\005parts\030\001 \003(\013" + + "25.google.cloud.dialogflow.v2beta1.Annot" + + "atedMessagePart\022\030\n\020contain_entities\030\002 \001(" + + "\010\"\325\001\n\rArticleAnswer\022\r\n\005title\030\001 \001(\t\022\013\n\003ur" + + "i\030\002 \001(\t\022\020\n\010snippets\030\003 \003(\t\022N\n\010metadata\030\005 " + + "\003(\0132<.google.cloud.dialogflow.v2beta1.Ar" + + "ticleAnswer.MetadataEntry\022\025\n\ranswer_reco" + "rd\030\006 \001(\t\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022\r" - + "\n\005value\030\002 \001(\t:\0028\001\"y\n\020SmartReplyAnswer\022\r\n" - + "\005reply\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\022B\n\ransw" - + "er_record\030\003 \001(\tB+\372A(\n&dialogflow.googlea" - + "pis.com/AnswerRecord\"\371\002\n\020SuggestionResul" - + "t\022#\n\005error\030\001 \001(\0132\022.google.rpc.StatusH\000\022]" - + "\n\031suggest_articles_response\030\002 \001(\01328.goog" - + "le.cloud.dialogflow.v2beta1.SuggestArtic" - + "lesResponseH\000\022b\n\034suggest_faq_answers_res" - + "ponse\030\003 \001(\0132:.google.cloud.dialogflow.v2" - + "beta1.SuggestFaqAnswersResponseH\000\022f\n\036sug" - + "gest_smart_replies_response\030\004 \001(\0132<.goog" - + "le.cloud.dialogflow.v2beta1.SuggestSmart" - + "RepliesResponseH\000B\025\n\023suggestion_response" - + "\"\217\002\n\026SuggestArticlesRequest\022=\n\006parent\030\001 " - + "\001(\tB-\340A\002\372A\'\n%dialogflow.googleapis.com/P" - + "articipant\022A\n\016latest_message\030\002 \001(\tB)\340A\001\372" - + "A#\n!dialogflow.googleapis.com/Message\022\031\n" - + "\014context_size\030\003 \001(\005B\003\340A\001\022X\n\023assist_query" - + "_params\030\004 \001(\01326.google.cloud.dialogflow." - + "v2beta1.AssistQueryParametersB\003\340A\001\"\220\001\n\027S" - + "uggestArticlesResponse\022G\n\017article_answer" - + "s\030\001 \003(\0132..google.cloud.dialogflow.v2beta" - + "1.ArticleAnswer\022\026\n\016latest_message\030\002 \001(\t\022" - + "\024\n\014context_size\030\003 \001(\005\"\221\002\n\030SuggestFaqAnsw" - + "ersRequest\022=\n\006parent\030\001 \001(\tB-\340A\002\372A\'\n%dial" - + "ogflow.googleapis.com/Participant\022A\n\016lat" - + "est_message\030\002 \001(\tB)\340A\001\372A#\n!dialogflow.go" - + "ogleapis.com/Message\022\031\n\014context_size\030\003 \001" - + "(\005B\003\340A\001\022X\n\023assist_query_params\030\004 \001(\01326.g" - + "oogle.cloud.dialogflow.v2beta1.AssistQue" - + "ryParametersB\003\340A\001\"\212\001\n\031SuggestFaqAnswersR" - + "esponse\022?\n\013faq_answers\030\001 \003(\0132*.google.cl" - + "oud.dialogflow.v2beta1.FaqAnswer\022\026\n\016late" - + "st_message\030\002 \001(\t\022\024\n\014context_size\030\003 \001(\005\"\371" - + "\001\n\032SuggestSmartRepliesRequest\022=\n\006parent\030" - + "\001 \001(\tB-\340A\002\372A\'\n%dialogflow.googleapis.com" - + "/Participant\022F\n\022current_text_input\030\004 \001(\013" - + "2*.google.cloud.dialogflow.v2beta1.TextI" - + "nput\022>\n\016latest_message\030\002 \001(\tB&\372A#\n!dialo" - + "gflow.googleapis.com/Message\022\024\n\014context_" - + "size\030\003 \001(\005\"\303\001\n\033SuggestSmartRepliesRespon" - + "se\022N\n\023smart_reply_answers\030\001 \003(\01321.google" - + ".cloud.dialogflow.v2beta1.SmartReplyAnsw" - + "er\022>\n\016latest_message\030\002 \001(\tB&\372A#\n!dialogf" - + "low.googleapis.com/Message\022\024\n\014context_si" - + "ze\030\003 \001(\005\"\304\005\n\nSuggestion\022\014\n\004name\030\001 \001(\t\022E\n" - + "\010articles\030\002 \003(\01323.google.cloud.dialogflo" - + "w.v2beta1.Suggestion.Article\022J\n\013faq_answ" - + "ers\030\004 \003(\01325.google.cloud.dialogflow.v2be" - + "ta1.Suggestion.FaqAnswer\022/\n\013create_time\030" - + "\005 \001(\0132\032.google.protobuf.Timestamp\022\026\n\016lat" - + "est_message\030\007 \001(\t\032\324\001\n\007Article\022\r\n\005title\030\001" - + " \001(\t\022\013\n\003uri\030\002 \001(\t\022\020\n\010snippets\030\003 \003(\t\022S\n\010m" - + "etadata\030\005 \003(\0132A.google.cloud.dialogflow." - + "v2beta1.Suggestion.Article.MetadataEntry" - + "\022\025\n\ranswer_record\030\006 \001(\t\032/\n\rMetadataEntry" - + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032\360\001\n\tFaq" - + "Answer\022\016\n\006answer\030\001 \001(\t\022\022\n\nconfidence\030\002 \001" - + "(\002\022\020\n\010question\030\003 \001(\t\022\016\n\006source\030\004 \001(\t\022U\n\010" - + "metadata\030\005 \003(\0132C.google.cloud.dialogflow" - + ".v2beta1.Suggestion.FaqAnswer.MetadataEn" - + "try\022\025\n\ranswer_record\030\006 \001(\t\032/\n\rMetadataEn" - + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\002\030\001\"" - + "c\n\026ListSuggestionsRequest\022\016\n\006parent\030\001 \001(" - + "\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t" - + "\022\016\n\006filter\030\004 \001(\t:\002\030\001\"x\n\027ListSuggestionsR" - + "esponse\022@\n\013suggestions\030\001 \003(\0132+.google.cl" - + "oud.dialogflow.v2beta1.Suggestion\022\027\n\017nex" - + "t_page_token\030\002 \001(\t:\002\030\001\"\\\n\030CompileSuggest" - + "ionRequest\022\016\n\006parent\030\001 \001(\t\022\026\n\016latest_mes" - + "sage\030\002 \001(\t\022\024\n\014context_size\030\003 \001(\005:\002\030\001\"\216\001\n" - + "\031CompileSuggestionResponse\022?\n\nsuggestion" - + "\030\001 \001(\0132+.google.cloud.dialogflow.v2beta1" - + ".Suggestion\022\026\n\016latest_message\030\002 \001(\t\022\024\n\014c" - + "ontext_size\030\003 \001(\005:\002\030\001\"\203\007\n\017ResponseMessag" - + "e\022E\n\004text\030\001 \001(\01325.google.cloud.dialogflo" - + "w.v2beta1.ResponseMessage.TextH\000\022*\n\007payl" - + "oad\030\002 \001(\0132\027.google.protobuf.StructH\000\022_\n\022" - + "live_agent_handoff\030\003 \001(\0132A.google.cloud." - + "dialogflow.v2beta1.ResponseMessage.LiveA" - + "gentHandoffH\000\022Z\n\017end_interaction\030\004 \001(\0132?" + + "\n\005value\030\002 \001(\t:\0028\001\"\345\001\n\tFaqAnswer\022\016\n\006answe" + + "r\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\022\020\n\010question\030" + + "\003 \001(\t\022\016\n\006source\030\004 \001(\t\022J\n\010metadata\030\005 \003(\0132" + + "8.google.cloud.dialogflow.v2beta1.FaqAns" + + "wer.MetadataEntry\022\025\n\ranswer_record\030\006 \001(\t" + + "\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + + "\002 \001(\t:\0028\001\"y\n\020SmartReplyAnswer\022\r\n\005reply\030\001" + + " \001(\t\022\022\n\nconfidence\030\002 \001(\002\022B\n\ranswer_recor" + + "d\030\003 \001(\tB+\372A(\n&dialogflow.googleapis.com/" + + "AnswerRecord\"\371\002\n\020SuggestionResult\022#\n\005err" + + "or\030\001 \001(\0132\022.google.rpc.StatusH\000\022]\n\031sugges" + + "t_articles_response\030\002 \001(\01328.google.cloud" + + ".dialogflow.v2beta1.SuggestArticlesRespo" + + "nseH\000\022b\n\034suggest_faq_answers_response\030\003 " + + "\001(\0132:.google.cloud.dialogflow.v2beta1.Su" + + "ggestFaqAnswersResponseH\000\022f\n\036suggest_sma" + + "rt_replies_response\030\004 \001(\0132<.google.cloud" + + ".dialogflow.v2beta1.SuggestSmartRepliesR" + + "esponseH\000B\025\n\023suggestion_response\"\217\002\n\026Sug" + + "gestArticlesRequest\022=\n\006parent\030\001 \001(\tB-\340A\002" + + "\372A\'\n%dialogflow.googleapis.com/Participa" + + "nt\022A\n\016latest_message\030\002 \001(\tB)\340A\001\372A#\n!dial" + + "ogflow.googleapis.com/Message\022\031\n\014context" + + "_size\030\003 \001(\005B\003\340A\001\022X\n\023assist_query_params\030" + + "\004 \001(\01326.google.cloud.dialogflow.v2beta1." + + "AssistQueryParametersB\003\340A\001\"\220\001\n\027SuggestAr" + + "ticlesResponse\022G\n\017article_answers\030\001 \003(\0132" + + "..google.cloud.dialogflow.v2beta1.Articl" + + "eAnswer\022\026\n\016latest_message\030\002 \001(\t\022\024\n\014conte" + + "xt_size\030\003 \001(\005\"\221\002\n\030SuggestFaqAnswersReque" + + "st\022=\n\006parent\030\001 \001(\tB-\340A\002\372A\'\n%dialogflow.g" + + "oogleapis.com/Participant\022A\n\016latest_mess" + + "age\030\002 \001(\tB)\340A\001\372A#\n!dialogflow.googleapis" + + ".com/Message\022\031\n\014context_size\030\003 \001(\005B\003\340A\001\022" + + "X\n\023assist_query_params\030\004 \001(\01326.google.cl" + + "oud.dialogflow.v2beta1.AssistQueryParame" + + "tersB\003\340A\001\"\212\001\n\031SuggestFaqAnswersResponse\022" + + "?\n\013faq_answers\030\001 \003(\0132*.google.cloud.dial" + + "ogflow.v2beta1.FaqAnswer\022\026\n\016latest_messa" + + "ge\030\002 \001(\t\022\024\n\014context_size\030\003 \001(\005\"\371\001\n\032Sugge" + + "stSmartRepliesRequest\022=\n\006parent\030\001 \001(\tB-\340" + + "A\002\372A\'\n%dialogflow.googleapis.com/Partici" + + "pant\022F\n\022current_text_input\030\004 \001(\0132*.googl" + + "e.cloud.dialogflow.v2beta1.TextInput\022>\n\016" + + "latest_message\030\002 \001(\tB&\372A#\n!dialogflow.go" + + "ogleapis.com/Message\022\024\n\014context_size\030\003 \001" + + "(\005\"\303\001\n\033SuggestSmartRepliesResponse\022N\n\023sm" + + "art_reply_answers\030\001 \003(\01321.google.cloud.d" + + "ialogflow.v2beta1.SmartReplyAnswer\022>\n\016la" + + "test_message\030\002 \001(\tB&\372A#\n!dialogflow.goog" + + "leapis.com/Message\022\024\n\014context_size\030\003 \001(\005" + + "\"\304\005\n\nSuggestion\022\014\n\004name\030\001 \001(\t\022E\n\010article" + + "s\030\002 \003(\01323.google.cloud.dialogflow.v2beta" + + "1.Suggestion.Article\022J\n\013faq_answers\030\004 \003(" + + "\01325.google.cloud.dialogflow.v2beta1.Sugg" + + "estion.FaqAnswer\022/\n\013create_time\030\005 \001(\0132\032." + + "google.protobuf.Timestamp\022\026\n\016latest_mess" + + "age\030\007 \001(\t\032\324\001\n\007Article\022\r\n\005title\030\001 \001(\t\022\013\n\003" + + "uri\030\002 \001(\t\022\020\n\010snippets\030\003 \003(\t\022S\n\010metadata\030" + + "\005 \003(\0132A.google.cloud.dialogflow.v2beta1." + + "Suggestion.Article.MetadataEntry\022\025\n\ransw" + + "er_record\030\006 \001(\t\032/\n\rMetadataEntry\022\013\n\003key\030" + + "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032\360\001\n\tFaqAnswer\022\016" + + "\n\006answer\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\022\020\n\010qu" + + "estion\030\003 \001(\t\022\016\n\006source\030\004 \001(\t\022U\n\010metadata" + + "\030\005 \003(\0132C.google.cloud.dialogflow.v2beta1" + + ".Suggestion.FaqAnswer.MetadataEntry\022\025\n\ra" + + "nswer_record\030\006 \001(\t\032/\n\rMetadataEntry\022\013\n\003k" + + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\002\030\001\"c\n\026ListS" + + "uggestionsRequest\022\016\n\006parent\030\001 \001(\t\022\021\n\tpag" + + "e_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filt" + + "er\030\004 \001(\t:\002\030\001\"x\n\027ListSuggestionsResponse\022" + + "@\n\013suggestions\030\001 \003(\0132+.google.cloud.dial" + + "ogflow.v2beta1.Suggestion\022\027\n\017next_page_t" + + "oken\030\002 \001(\t:\002\030\001\"\\\n\030CompileSuggestionReque" + + "st\022\016\n\006parent\030\001 \001(\t\022\026\n\016latest_message\030\002 \001" + + "(\t\022\024\n\014context_size\030\003 \001(\005:\002\030\001\"\216\001\n\031Compile" + + "SuggestionResponse\022?\n\nsuggestion\030\001 \001(\0132+" + + ".google.cloud.dialogflow.v2beta1.Suggest" + + "ion\022\026\n\016latest_message\030\002 \001(\t\022\024\n\014context_s" + + "ize\030\003 \001(\005:\002\030\001\"\203\007\n\017ResponseMessage\022E\n\004tex" + + "t\030\001 \001(\01325.google.cloud.dialogflow.v2beta" + + "1.ResponseMessage.TextH\000\022*\n\007payload\030\002 \001(" + + "\0132\027.google.protobuf.StructH\000\022_\n\022live_age" + + "nt_handoff\030\003 \001(\0132A.google.cloud.dialogfl" + + "ow.v2beta1.ResponseMessage.LiveAgentHand" + + "offH\000\022Z\n\017end_interaction\030\004 \001(\0132?.google." + + "cloud.dialogflow.v2beta1.ResponseMessage" + + ".EndInteractionH\000\022R\n\013mixed_audio\030\005 \001(\0132;" + ".google.cloud.dialogflow.v2beta1.Respons" - + "eMessage.EndInteractionH\000\022R\n\013mixed_audio" - + "\030\005 \001(\0132;.google.cloud.dialogflow.v2beta1" - + ".ResponseMessage.MixedAudioH\000\022i\n\027telepho" - + "ny_transfer_call\030\006 \001(\0132F.google.cloud.di" - + "alogflow.v2beta1.ResponseMessage.Telepho" - + "nyTransferCallH\000\032\024\n\004Text\022\014\n\004text\030\001 \003(\t\032=" - + "\n\020LiveAgentHandoff\022)\n\010metadata\030\001 \001(\0132\027.g" - + "oogle.protobuf.Struct\032\020\n\016EndInteraction\032" - + "\276\001\n\nMixedAudio\022U\n\010segments\030\001 \003(\0132C.googl" - + "e.cloud.dialogflow.v2beta1.ResponseMessa" - + "ge.MixedAudio.Segment\032Y\n\007Segment\022\017\n\005audi" - + "o\030\001 \001(\014H\000\022\r\n\003uri\030\002 \001(\tH\000\022#\n\033allow_playba" - + "ck_interruption\030\003 \001(\010B\t\n\007content\032N\n\025Tele" - + "phonyTransferCall\022\026\n\014phone_number\030\001 \001(\tH" - + "\000\022\021\n\007sip_uri\030\002 \001(\tH\000B\n\n\010endpointB\t\n\007mess" - + "age2\207\033\n\014Participants\022\271\002\n\021CreateParticipa" - + "nt\0229.google.cloud.dialogflow.v2beta1.Cre" - + "ateParticipantRequest\032,.google.cloud.dia" - + "logflow.v2beta1.Participant\"\272\001\202\323\344\223\002\236\001\"9/" - + "v2beta1/{parent=projects/*/conversations" - + "/*}/participants:\013participantZT\"E/v2beta" - + "1/{parent=projects/*/locations/*/convers" - + "ations/*}/participants:\013participant\332A\022pa" - + "rent,participant\022\213\002\n\016GetParticipant\0226.go" - + "ogle.cloud.dialogflow.v2beta1.GetPartici" - + "pantRequest\032,.google.cloud.dialogflow.v2" - + "beta1.Participant\"\222\001\202\323\344\223\002\204\001\0229/v2beta1/{n" - + "ame=projects/*/conversations/*/participa" - + "nts/*}ZG\022E/v2beta1/{name=projects/*/loca" - + "tions/*/conversations/*/participants/*}\332" - + "A\004name\022\236\002\n\020ListParticipants\0228.google.clo" - + "ud.dialogflow.v2beta1.ListParticipantsRe" - + "quest\0329.google.cloud.dialogflow.v2beta1." - + "ListParticipantsResponse\"\224\001\202\323\344\223\002\204\001\0229/v2b" - + "eta1/{parent=projects/*/conversations/*}" - + "/participantsZG\022E/v2beta1/{parent=projec" - + "ts/*/locations/*/conversations/*}/partic" - + "ipants\332A\006parent\022\326\002\n\021UpdateParticipant\0229." - + "google.cloud.dialogflow.v2beta1.UpdatePa" - + "rticipantRequest\032,.google.cloud.dialogfl" - + "ow.v2beta1.Participant\"\327\001\202\323\344\223\002\266\0012E/v2bet" - + "a1/{participant.name=projects/*/conversa" - + "tions/*/participants/*}:\013participantZ`2Q" - + "/v2beta1/{participant.name=projects/*/lo" - + "cations/*/conversations/*/participants/*" - + "}:\013participant\332A\027participant,update_mask" - + "\022\216\003\n\016AnalyzeContent\0226.google.cloud.dialo" - + "gflow.v2beta1.AnalyzeContentRequest\0327.go" - + "ogle.cloud.dialogflow.v2beta1.AnalyzeCon" - + "tentResponse\"\212\002\202\323\344\223\002\266\001\"O/v2beta1/{partic" - + "ipant=projects/*/conversations/*/partici" - + "pants/*}:analyzeContent:\001*Z`\"[/v2beta1/{" - + "participant=projects/*/locations/*/conve" - + "rsations/*/participants/*}:analyzeConten" - + "t:\001*\332A\026participant,text_input\332A\027particip" - + "ant,audio_input\332A\027participant,event_inpu" - + "t\022\242\001\n\027StreamingAnalyzeContent\022?.google.c" - + "loud.dialogflow.v2beta1.StreamingAnalyze" - + "ContentRequest\032@.google.cloud.dialogflow" - + ".v2beta1.StreamingAnalyzeContentResponse" - + "\"\000(\0010\001\022\335\002\n\017SuggestArticles\0227.google.clou" - + "d.dialogflow.v2beta1.SuggestArticlesRequ" - + "est\0328.google.cloud.dialogflow.v2beta1.Su" - + "ggestArticlesResponse\"\326\001\202\323\344\223\002\306\001\"W/v2beta" - + "1/{parent=projects/*/conversations/*/par" - + "ticipants/*}/suggestions:suggestArticles" - + ":\001*Zh\"c/v2beta1/{parent=projects/*/locat" - + "ions/*/conversations/*/participants/*}/s" - + "uggestions:suggestArticles:\001*\332A\006parent\022\347" - + "\002\n\021SuggestFaqAnswers\0229.google.cloud.dial" - + "ogflow.v2beta1.SuggestFaqAnswersRequest\032" - + ":.google.cloud.dialogflow.v2beta1.Sugges" - + "tFaqAnswersResponse\"\332\001\202\323\344\223\002\312\001\"Y/v2beta1/" - + "{parent=projects/*/conversations/*/parti" - + "cipants/*}/suggestions:suggestFaqAnswers" - + ":\001*Zj\"e/v2beta1/{parent=projects/*/locat" - + "ions/*/conversations/*/participants/*}/s" - + "uggestions:suggestFaqAnswers:\001*\332A\006parent" - + "\022\361\002\n\023SuggestSmartReplies\022;.google.cloud." - + "dialogflow.v2beta1.SuggestSmartRepliesRe" - + "quest\032<.google.cloud.dialogflow.v2beta1." - + "SuggestSmartRepliesResponse\"\336\001\202\323\344\223\002\316\001\"[/" - + "v2beta1/{parent=projects/*/conversations" - + "/*/participants/*}/suggestions:suggestSm" - + "artReplies:\001*Zl\"g/v2beta1/{parent=projec" - + "ts/*/locations/*/conversations/*/partici" - + "pants/*}/suggestions:suggestSmartReplies" - + ":\001*\332A\006parent\022\330\001\n\017ListSuggestions\0227.googl" - + "e.cloud.dialogflow.v2beta1.ListSuggestio" - + "nsRequest\0328.google.cloud.dialogflow.v2be" - + "ta1.ListSuggestionsResponse\"R\210\002\001\202\323\344\223\002I\022G" - + "/v2beta1/{parent=projects/*/conversation" - + "s/*/participants/*}/suggestions\022\351\001\n\021Comp" - + "ileSuggestion\0229.google.cloud.dialogflow." - + "v2beta1.CompileSuggestionRequest\032:.googl" - + "e.cloud.dialogflow.v2beta1.CompileSugges" - + "tionResponse\"]\210\002\001\202\323\344\223\002T\"O/v2beta1/{paren" + + "eMessage.MixedAudioH\000\022i\n\027telephony_trans" + + "fer_call\030\006 \001(\0132F.google.cloud.dialogflow" + + ".v2beta1.ResponseMessage.TelephonyTransf" + + "erCallH\000\032\024\n\004Text\022\014\n\004text\030\001 \003(\t\032=\n\020LiveAg" + + "entHandoff\022)\n\010metadata\030\001 \001(\0132\027.google.pr" + + "otobuf.Struct\032\020\n\016EndInteraction\032\276\001\n\nMixe" + + "dAudio\022U\n\010segments\030\001 \003(\0132C.google.cloud." + + "dialogflow.v2beta1.ResponseMessage.Mixed" + + "Audio.Segment\032Y\n\007Segment\022\017\n\005audio\030\001 \001(\014H" + + "\000\022\r\n\003uri\030\002 \001(\tH\000\022#\n\033allow_playback_inter" + + "ruption\030\003 \001(\010B\t\n\007content\032N\n\025TelephonyTra" + + "nsferCall\022\026\n\014phone_number\030\001 \001(\tH\000\022\021\n\007sip" + + "_uri\030\002 \001(\tH\000B\n\n\010endpointB\t\n\007message2\207\033\n\014" + + "Participants\022\271\002\n\021CreateParticipant\0229.goo" + + "gle.cloud.dialogflow.v2beta1.CreateParti" + + "cipantRequest\032,.google.cloud.dialogflow." + + "v2beta1.Participant\"\272\001\202\323\344\223\002\236\001\"9/v2beta1/" + + "{parent=projects/*/conversations/*}/part" + + "icipants:\013participantZT\"E/v2beta1/{paren" + + "t=projects/*/locations/*/conversations/*" + + "}/participants:\013participant\332A\022parent,par" + + "ticipant\022\213\002\n\016GetParticipant\0226.google.clo" + + "ud.dialogflow.v2beta1.GetParticipantRequ" + + "est\032,.google.cloud.dialogflow.v2beta1.Pa" + + "rticipant\"\222\001\202\323\344\223\002\204\001\0229/v2beta1/{name=proj" + + "ects/*/conversations/*/participants/*}ZG" + + "\022E/v2beta1/{name=projects/*/locations/*/" + + "conversations/*/participants/*}\332A\004name\022\236" + + "\002\n\020ListParticipants\0228.google.cloud.dialo" + + "gflow.v2beta1.ListParticipantsRequest\0329." + + "google.cloud.dialogflow.v2beta1.ListPart" + + "icipantsResponse\"\224\001\202\323\344\223\002\204\001\0229/v2beta1/{pa" + + "rent=projects/*/conversations/*}/partici" + + "pantsZG\022E/v2beta1/{parent=projects/*/loc" + + "ations/*/conversations/*}/participants\332A" + + "\006parent\022\326\002\n\021UpdateParticipant\0229.google.c" + + "loud.dialogflow.v2beta1.UpdateParticipan" + + "tRequest\032,.google.cloud.dialogflow.v2bet" + + "a1.Participant\"\327\001\202\323\344\223\002\266\0012E/v2beta1/{part" + + "icipant.name=projects/*/conversations/*/" + + "participants/*}:\013participantZ`2Q/v2beta1" + + "/{participant.name=projects/*/locations/" + + "*/conversations/*/participants/*}:\013parti" + + "cipant\332A\027participant,update_mask\022\216\003\n\016Ana" + + "lyzeContent\0226.google.cloud.dialogflow.v2" + + "beta1.AnalyzeContentRequest\0327.google.clo" + + "ud.dialogflow.v2beta1.AnalyzeContentResp" + + "onse\"\212\002\202\323\344\223\002\266\001\"O/v2beta1/{participant=pr" + + "ojects/*/conversations/*/participants/*}" + + ":analyzeContent:\001*Z`\"[/v2beta1/{particip" + + "ant=projects/*/locations/*/conversations" + + "/*/participants/*}:analyzeContent:\001*\332A\026p" + + "articipant,text_input\332A\027participant,audi" + + "o_input\332A\027participant,event_input\022\242\001\n\027St" + + "reamingAnalyzeContent\022?.google.cloud.dia" + + "logflow.v2beta1.StreamingAnalyzeContentR" + + "equest\032@.google.cloud.dialogflow.v2beta1" + + ".StreamingAnalyzeContentResponse\"\000(\0010\001\022\335" + + "\002\n\017SuggestArticles\0227.google.cloud.dialog" + + "flow.v2beta1.SuggestArticlesRequest\0328.go" + + "ogle.cloud.dialogflow.v2beta1.SuggestArt" + + "iclesResponse\"\326\001\202\323\344\223\002\306\001\"W/v2beta1/{paren" + "t=projects/*/conversations/*/participant" - + "s/*}/suggestions:compile:\001*\032x\312A\031dialogfl" - + "ow.googleapis.com\322AYhttps://www.googleap" - + "is.com/auth/cloud-platform,https://www.g" - + "oogleapis.com/auth/dialogflowB\256\001\n#com.go" - + "ogle.cloud.dialogflow.v2beta1B\020Participa" - + "ntProtoP\001ZIgoogle.golang.org/genproto/go" - + "ogleapis/cloud/dialogflow/v2beta1;dialog" - + "flow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V" - + "2beta1b\006proto3" + + "s/*}/suggestions:suggestArticles:\001*Zh\"c/" + + "v2beta1/{parent=projects/*/locations/*/c" + + "onversations/*/participants/*}/suggestio" + + "ns:suggestArticles:\001*\332A\006parent\022\347\002\n\021Sugge" + + "stFaqAnswers\0229.google.cloud.dialogflow.v" + + "2beta1.SuggestFaqAnswersRequest\032:.google" + + ".cloud.dialogflow.v2beta1.SuggestFaqAnsw" + + "ersResponse\"\332\001\202\323\344\223\002\312\001\"Y/v2beta1/{parent=" + + "projects/*/conversations/*/participants/" + + "*}/suggestions:suggestFaqAnswers:\001*Zj\"e/" + + "v2beta1/{parent=projects/*/locations/*/c" + + "onversations/*/participants/*}/suggestio" + + "ns:suggestFaqAnswers:\001*\332A\006parent\022\361\002\n\023Sug" + + "gestSmartReplies\022;.google.cloud.dialogfl" + + "ow.v2beta1.SuggestSmartRepliesRequest\032<." + + "google.cloud.dialogflow.v2beta1.SuggestS" + + "martRepliesResponse\"\336\001\202\323\344\223\002\316\001\"[/v2beta1/" + + "{parent=projects/*/conversations/*/parti" + + "cipants/*}/suggestions:suggestSmartRepli" + + "es:\001*Zl\"g/v2beta1/{parent=projects/*/loc" + + "ations/*/conversations/*/participants/*}" + + "/suggestions:suggestSmartReplies:\001*\332A\006pa" + + "rent\022\330\001\n\017ListSuggestions\0227.google.cloud." + + "dialogflow.v2beta1.ListSuggestionsReques" + + "t\0328.google.cloud.dialogflow.v2beta1.List" + + "SuggestionsResponse\"R\210\002\001\202\323\344\223\002I\022G/v2beta1" + + "/{parent=projects/*/conversations/*/part" + + "icipants/*}/suggestions\022\351\001\n\021CompileSugge" + + "stion\0229.google.cloud.dialogflow.v2beta1." + + "CompileSuggestionRequest\032:.google.cloud." + + "dialogflow.v2beta1.CompileSuggestionResp" + + "onse\"]\210\002\001\202\323\344\223\002T\"O/v2beta1/{parent=projec" + + "ts/*/conversations/*/participants/*}/sug" + + "gestions:compile:\001*\032x\312A\031dialogflow.googl" + + "eapis.com\322AYhttps://www.googleapis.com/a" + + "uth/cloud-platform,https://www.googleapi" + + "s.com/auth/dialogflowB\256\001\n#com.google.clo" + + "ud.dialogflow.v2beta1B\020ParticipantProtoP" + + "\001ZIgoogle.golang.org/genproto/googleapis" + + "/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242" + + "\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1b\006" + + "proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SuggestConversationSummaryRequest.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SuggestConversationSummaryRequest.java new file mode 100644 index 000000000..f956946ae --- /dev/null +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SuggestConversationSummaryRequest.java @@ -0,0 +1,984 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/v2beta1/conversation.proto + +package com.google.cloud.dialogflow.v2beta1; + +/** + * + * + *
+ * The request message for [Conversations.SuggestConversationSummary][google.cloud.dialogflow.v2beta1.Conversations.SuggestConversationSummary].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest} + */ +public final class SuggestConversationSummaryRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest) + SuggestConversationSummaryRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SuggestConversationSummaryRequest.newBuilder() to construct. + private SuggestConversationSummaryRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SuggestConversationSummaryRequest() { + conversation_ = ""; + latestMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SuggestConversationSummaryRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SuggestConversationSummaryRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + conversation_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + latestMessage_ = s; + break; + } + case 32: + { + contextSize_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest.class, + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest.Builder.class); + } + + public static final int CONVERSATION_FIELD_NUMBER = 1; + private volatile java.lang.Object conversation_; + /** + * + * + *
+   * Required. The conversation to fetch suggestion for.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>`.
+   * 
+ * + * + * string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The conversation. + */ + @java.lang.Override + public java.lang.String getConversation() { + java.lang.Object ref = conversation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + conversation_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The conversation to fetch suggestion for.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>`.
+   * 
+ * + * + * string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for conversation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConversationBytes() { + java.lang.Object ref = conversation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + conversation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LATEST_MESSAGE_FIELD_NUMBER = 3; + private volatile java.lang.Object latestMessage_; + /** + * + * + *
+   * The name of the latest conversation message used as context for
+   * compiling suggestion. If empty, the latest message of the conversation will
+   * be used.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+   * 
+ * + * string latest_message = 3 [(.google.api.resource_reference) = { ... } + * + * @return The latestMessage. + */ + @java.lang.Override + public java.lang.String getLatestMessage() { + java.lang.Object ref = latestMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + latestMessage_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the latest conversation message used as context for
+   * compiling suggestion. If empty, the latest message of the conversation will
+   * be used.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+   * 
+ * + * string latest_message = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for latestMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLatestMessageBytes() { + java.lang.Object ref = latestMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + latestMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTEXT_SIZE_FIELD_NUMBER = 4; + private int contextSize_; + /** + * + * + *
+   * Max number of messages prior to and including
+   * [latest_message] to use as context when compiling the
+   * suggestion. By default 500 and at most 1000.
+   * 
+ * + * int32 context_size = 4; + * + * @return The contextSize. + */ + @java.lang.Override + public int getContextSize() { + return contextSize_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(conversation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, conversation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(latestMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, latestMessage_); + } + if (contextSize_ != 0) { + output.writeInt32(4, contextSize_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(conversation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, conversation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(latestMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, latestMessage_); + } + if (contextSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, contextSize_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest other = + (com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest) obj; + + if (!getConversation().equals(other.getConversation())) return false; + if (!getLatestMessage().equals(other.getLatestMessage())) return false; + if (getContextSize() != other.getContextSize()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONVERSATION_FIELD_NUMBER; + hash = (53 * hash) + getConversation().hashCode(); + hash = (37 * hash) + LATEST_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getLatestMessage().hashCode(); + hash = (37 * hash) + CONTEXT_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getContextSize(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for [Conversations.SuggestConversationSummary][google.cloud.dialogflow.v2beta1.Conversations.SuggestConversationSummary].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest) + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest.class, + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + conversation_ = ""; + + latestMessage_ = ""; + + contextSize_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest build() { + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest buildPartial() { + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest result = + new com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest(this); + result.conversation_ = conversation_; + result.latestMessage_ = latestMessage_; + result.contextSize_ = contextSize_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest) { + return mergeFrom( + (com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest other) { + if (other + == com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest + .getDefaultInstance()) return this; + if (!other.getConversation().isEmpty()) { + conversation_ = other.conversation_; + onChanged(); + } + if (!other.getLatestMessage().isEmpty()) { + latestMessage_ = other.latestMessage_; + onChanged(); + } + if (other.getContextSize() != 0) { + setContextSize(other.getContextSize()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object conversation_ = ""; + /** + * + * + *
+     * Required. The conversation to fetch suggestion for.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>`.
+     * 
+ * + * + * string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The conversation. + */ + public java.lang.String getConversation() { + java.lang.Object ref = conversation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + conversation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The conversation to fetch suggestion for.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>`.
+     * 
+ * + * + * string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for conversation. + */ + public com.google.protobuf.ByteString getConversationBytes() { + java.lang.Object ref = conversation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + conversation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The conversation to fetch suggestion for.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>`.
+     * 
+ * + * + * string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The conversation to set. + * @return This builder for chaining. + */ + public Builder setConversation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + conversation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The conversation to fetch suggestion for.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>`.
+     * 
+ * + * + * string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearConversation() { + + conversation_ = getDefaultInstance().getConversation(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The conversation to fetch suggestion for.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>`.
+     * 
+ * + * + * string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for conversation to set. + * @return This builder for chaining. + */ + public Builder setConversationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + conversation_ = value; + onChanged(); + return this; + } + + private java.lang.Object latestMessage_ = ""; + /** + * + * + *
+     * The name of the latest conversation message used as context for
+     * compiling suggestion. If empty, the latest message of the conversation will
+     * be used.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+     * 
+ * + * string latest_message = 3 [(.google.api.resource_reference) = { ... } + * + * @return The latestMessage. + */ + public java.lang.String getLatestMessage() { + java.lang.Object ref = latestMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + latestMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the latest conversation message used as context for
+     * compiling suggestion. If empty, the latest message of the conversation will
+     * be used.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+     * 
+ * + * string latest_message = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for latestMessage. + */ + public com.google.protobuf.ByteString getLatestMessageBytes() { + java.lang.Object ref = latestMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + latestMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the latest conversation message used as context for
+     * compiling suggestion. If empty, the latest message of the conversation will
+     * be used.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+     * 
+ * + * string latest_message = 3 [(.google.api.resource_reference) = { ... } + * + * @param value The latestMessage to set. + * @return This builder for chaining. + */ + public Builder setLatestMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + latestMessage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the latest conversation message used as context for
+     * compiling suggestion. If empty, the latest message of the conversation will
+     * be used.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+     * 
+ * + * string latest_message = 3 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearLatestMessage() { + + latestMessage_ = getDefaultInstance().getLatestMessage(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the latest conversation message used as context for
+     * compiling suggestion. If empty, the latest message of the conversation will
+     * be used.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+     * 
+ * + * string latest_message = 3 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for latestMessage to set. + * @return This builder for chaining. + */ + public Builder setLatestMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + latestMessage_ = value; + onChanged(); + return this; + } + + private int contextSize_; + /** + * + * + *
+     * Max number of messages prior to and including
+     * [latest_message] to use as context when compiling the
+     * suggestion. By default 500 and at most 1000.
+     * 
+ * + * int32 context_size = 4; + * + * @return The contextSize. + */ + @java.lang.Override + public int getContextSize() { + return contextSize_; + } + /** + * + * + *
+     * Max number of messages prior to and including
+     * [latest_message] to use as context when compiling the
+     * suggestion. By default 500 and at most 1000.
+     * 
+ * + * int32 context_size = 4; + * + * @param value The contextSize to set. + * @return This builder for chaining. + */ + public Builder setContextSize(int value) { + + contextSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Max number of messages prior to and including
+     * [latest_message] to use as context when compiling the
+     * suggestion. By default 500 and at most 1000.
+     * 
+ * + * int32 context_size = 4; + * + * @return This builder for chaining. + */ + public Builder clearContextSize() { + + contextSize_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest) + private static final com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest(); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SuggestConversationSummaryRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SuggestConversationSummaryRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SuggestConversationSummaryRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SuggestConversationSummaryRequestOrBuilder.java new file mode 100644 index 000000000..e285f7810 --- /dev/null +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SuggestConversationSummaryRequestOrBuilder.java @@ -0,0 +1,106 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/v2beta1/conversation.proto + +package com.google.cloud.dialogflow.v2beta1; + +public interface SuggestConversationSummaryRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The conversation to fetch suggestion for.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>`.
+   * 
+ * + * + * string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The conversation. + */ + java.lang.String getConversation(); + /** + * + * + *
+   * Required. The conversation to fetch suggestion for.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>`.
+   * 
+ * + * + * string conversation = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for conversation. + */ + com.google.protobuf.ByteString getConversationBytes(); + + /** + * + * + *
+   * The name of the latest conversation message used as context for
+   * compiling suggestion. If empty, the latest message of the conversation will
+   * be used.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+   * 
+ * + * string latest_message = 3 [(.google.api.resource_reference) = { ... } + * + * @return The latestMessage. + */ + java.lang.String getLatestMessage(); + /** + * + * + *
+   * The name of the latest conversation message used as context for
+   * compiling suggestion. If empty, the latest message of the conversation will
+   * be used.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+   * 
+ * + * string latest_message = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for latestMessage. + */ + com.google.protobuf.ByteString getLatestMessageBytes(); + + /** + * + * + *
+   * Max number of messages prior to and including
+   * [latest_message] to use as context when compiling the
+   * suggestion. By default 500 and at most 1000.
+   * 
+ * + * int32 context_size = 4; + * + * @return The contextSize. + */ + int getContextSize(); +} diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SuggestConversationSummaryResponse.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SuggestConversationSummaryResponse.java new file mode 100644 index 000000000..ff1928f2d --- /dev/null +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SuggestConversationSummaryResponse.java @@ -0,0 +1,2417 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/v2beta1/conversation.proto + +package com.google.cloud.dialogflow.v2beta1; + +/** + * + * + *
+ * The response message for [Conversations.SuggestConversationSummary][google.cloud.dialogflow.v2beta1.Conversations.SuggestConversationSummary].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse} + */ +public final class SuggestConversationSummaryResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse) + SuggestConversationSummaryResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SuggestConversationSummaryResponse.newBuilder() to construct. + private SuggestConversationSummaryResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SuggestConversationSummaryResponse() { + latestMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SuggestConversationSummaryResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SuggestConversationSummaryResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary.Builder + subBuilder = null; + if (summary_ != null) { + subBuilder = summary_.toBuilder(); + } + summary_ = + input.readMessage( + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(summary_); + summary_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + latestMessage_ = s; + break; + } + case 24: + { + contextSize_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.class, + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Builder.class); + } + + public interface SummaryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The summary content that is concatenated into one string.
+     * 
+ * + * string text = 1; + * + * @return The text. + */ + java.lang.String getText(); + /** + * + * + *
+     * The summary content that is concatenated into one string.
+     * 
+ * + * string text = 1; + * + * @return The bytes for text. + */ + com.google.protobuf.ByteString getTextBytes(); + + /** + * + * + *
+     * The summary content that is divided into sections. The key is the
+     * section's name and the value is the section's content. There is no
+     * specific format for the key or value.
+     * 
+ * + * map<string, string> text_sections = 4; + */ + int getTextSectionsCount(); + /** + * + * + *
+     * The summary content that is divided into sections. The key is the
+     * section's name and the value is the section's content. There is no
+     * specific format for the key or value.
+     * 
+ * + * map<string, string> text_sections = 4; + */ + boolean containsTextSections(java.lang.String key); + /** Use {@link #getTextSectionsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getTextSections(); + /** + * + * + *
+     * The summary content that is divided into sections. The key is the
+     * section's name and the value is the section's content. There is no
+     * specific format for the key or value.
+     * 
+ * + * map<string, string> text_sections = 4; + */ + java.util.Map getTextSectionsMap(); + /** + * + * + *
+     * The summary content that is divided into sections. The key is the
+     * section's name and the value is the section's content. There is no
+     * specific format for the key or value.
+     * 
+ * + * map<string, string> text_sections = 4; + */ + + /* nullable */ + java.lang.String getTextSectionsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+     * The summary content that is divided into sections. The key is the
+     * section's name and the value is the section's content. There is no
+     * specific format for the key or value.
+     * 
+ * + * map<string, string> text_sections = 4; + */ + java.lang.String getTextSectionsOrThrow(java.lang.String key); + + /** + * + * + *
+     * The name of the answer record. Format:
+     * "projects/<Project ID>/answerRecords/<Answer Record ID>"
+     * 
+ * + * string answer_record = 3 [(.google.api.resource_reference) = { ... } + * + * @return The answerRecord. + */ + java.lang.String getAnswerRecord(); + /** + * + * + *
+     * The name of the answer record. Format:
+     * "projects/<Project ID>/answerRecords/<Answer Record ID>"
+     * 
+ * + * string answer_record = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for answerRecord. + */ + com.google.protobuf.ByteString getAnswerRecordBytes(); + } + /** + * + * + *
+   * Generated summary for a conversation.
+   * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary} + */ + public static final class Summary extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary) + SummaryOrBuilder { + private static final long serialVersionUID = 0L; + // Use Summary.newBuilder() to construct. + private Summary(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Summary() { + text_ = ""; + answerRecord_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Summary(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Summary( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + text_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + answerRecord_ = s; + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + textSections_ = + com.google.protobuf.MapField.newMapField( + TextSectionsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry textSections__ = + input.readMessage( + TextSectionsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + textSections_ + .getMutableMap() + .put(textSections__.getKey(), textSections__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_Summary_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetTextSections(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_Summary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary.class, + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary.Builder + .class); + } + + public static final int TEXT_FIELD_NUMBER = 1; + private volatile java.lang.Object text_; + /** + * + * + *
+     * The summary content that is concatenated into one string.
+     * 
+ * + * string text = 1; + * + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } + } + /** + * + * + *
+     * The summary content that is concatenated into one string.
+     * 
+ * + * string text = 1; + * + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TEXT_SECTIONS_FIELD_NUMBER = 4; + + private static final class TextSectionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_Summary_TextSectionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField textSections_; + + private com.google.protobuf.MapField + internalGetTextSections() { + if (textSections_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TextSectionsDefaultEntryHolder.defaultEntry); + } + return textSections_; + } + + public int getTextSectionsCount() { + return internalGetTextSections().getMap().size(); + } + /** + * + * + *
+     * The summary content that is divided into sections. The key is the
+     * section's name and the value is the section's content. There is no
+     * specific format for the key or value.
+     * 
+ * + * map<string, string> text_sections = 4; + */ + @java.lang.Override + public boolean containsTextSections(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTextSections().getMap().containsKey(key); + } + /** Use {@link #getTextSectionsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTextSections() { + return getTextSectionsMap(); + } + /** + * + * + *
+     * The summary content that is divided into sections. The key is the
+     * section's name and the value is the section's content. There is no
+     * specific format for the key or value.
+     * 
+ * + * map<string, string> text_sections = 4; + */ + @java.lang.Override + public java.util.Map getTextSectionsMap() { + return internalGetTextSections().getMap(); + } + /** + * + * + *
+     * The summary content that is divided into sections. The key is the
+     * section's name and the value is the section's content. There is no
+     * specific format for the key or value.
+     * 
+ * + * map<string, string> text_sections = 4; + */ + @java.lang.Override + public java.lang.String getTextSectionsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTextSections().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The summary content that is divided into sections. The key is the
+     * section's name and the value is the section's content. There is no
+     * specific format for the key or value.
+     * 
+ * + * map<string, string> text_sections = 4; + */ + @java.lang.Override + public java.lang.String getTextSectionsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTextSections().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ANSWER_RECORD_FIELD_NUMBER = 3; + private volatile java.lang.Object answerRecord_; + /** + * + * + *
+     * The name of the answer record. Format:
+     * "projects/<Project ID>/answerRecords/<Answer Record ID>"
+     * 
+ * + * string answer_record = 3 [(.google.api.resource_reference) = { ... } + * + * @return The answerRecord. + */ + @java.lang.Override + public java.lang.String getAnswerRecord() { + java.lang.Object ref = answerRecord_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + answerRecord_ = s; + return s; + } + } + /** + * + * + *
+     * The name of the answer record. Format:
+     * "projects/<Project ID>/answerRecords/<Answer Record ID>"
+     * 
+ * + * string answer_record = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for answerRecord. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAnswerRecordBytes() { + java.lang.Object ref = answerRecord_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + answerRecord_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(answerRecord_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, answerRecord_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetTextSections(), TextSectionsDefaultEntryHolder.defaultEntry, 4); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(answerRecord_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, answerRecord_); + } + for (java.util.Map.Entry entry : + internalGetTextSections().getMap().entrySet()) { + com.google.protobuf.MapEntry textSections__ = + TextSectionsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, textSections__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary other = + (com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary) obj; + + if (!getText().equals(other.getText())) return false; + if (!internalGetTextSections().equals(other.internalGetTextSections())) return false; + if (!getAnswerRecord().equals(other.getAnswerRecord())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + if (!internalGetTextSections().getMap().isEmpty()) { + hash = (37 * hash) + TEXT_SECTIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetTextSections().hashCode(); + } + hash = (37 * hash) + ANSWER_RECORD_FIELD_NUMBER; + hash = (53 * hash) + getAnswerRecord().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Generated summary for a conversation.
+     * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary) + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.SummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_Summary_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 4: + return internalGetTextSections(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 4: + return internalGetMutableTextSections(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_Summary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + .class, + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + .Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + text_ = ""; + + internalGetMutableTextSections().clear(); + answerRecord_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_Summary_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + build() { + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + buildPartial() { + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary result = + new com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary( + this); + int from_bitField0_ = bitField0_; + result.text_ = text_; + result.textSections_ = internalGetTextSections(); + result.textSections_.makeImmutable(); + result.answerRecord_ = answerRecord_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary) { + return mergeFrom( + (com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary other) { + if (other + == com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + .getDefaultInstance()) return this; + if (!other.getText().isEmpty()) { + text_ = other.text_; + onChanged(); + } + internalGetMutableTextSections().mergeFrom(other.internalGetTextSections()); + if (!other.getAnswerRecord().isEmpty()) { + answerRecord_ = other.answerRecord_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object text_ = ""; + /** + * + * + *
+       * The summary content that is concatenated into one string.
+       * 
+ * + * string text = 1; + * + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The summary content that is concatenated into one string.
+       * 
+ * + * string text = 1; + * + * @return The bytes for text. + */ + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The summary content that is concatenated into one string.
+       * 
+ * + * string text = 1; + * + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + text_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The summary content that is concatenated into one string.
+       * 
+ * + * string text = 1; + * + * @return This builder for chaining. + */ + public Builder clearText() { + + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + /** + * + * + *
+       * The summary content that is concatenated into one string.
+       * 
+ * + * string text = 1; + * + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + text_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField textSections_; + + private com.google.protobuf.MapField + internalGetTextSections() { + if (textSections_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TextSectionsDefaultEntryHolder.defaultEntry); + } + return textSections_; + } + + private com.google.protobuf.MapField + internalGetMutableTextSections() { + onChanged(); + ; + if (textSections_ == null) { + textSections_ = + com.google.protobuf.MapField.newMapField(TextSectionsDefaultEntryHolder.defaultEntry); + } + if (!textSections_.isMutable()) { + textSections_ = textSections_.copy(); + } + return textSections_; + } + + public int getTextSectionsCount() { + return internalGetTextSections().getMap().size(); + } + /** + * + * + *
+       * The summary content that is divided into sections. The key is the
+       * section's name and the value is the section's content. There is no
+       * specific format for the key or value.
+       * 
+ * + * map<string, string> text_sections = 4; + */ + @java.lang.Override + public boolean containsTextSections(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTextSections().getMap().containsKey(key); + } + /** Use {@link #getTextSectionsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTextSections() { + return getTextSectionsMap(); + } + /** + * + * + *
+       * The summary content that is divided into sections. The key is the
+       * section's name and the value is the section's content. There is no
+       * specific format for the key or value.
+       * 
+ * + * map<string, string> text_sections = 4; + */ + @java.lang.Override + public java.util.Map getTextSectionsMap() { + return internalGetTextSections().getMap(); + } + /** + * + * + *
+       * The summary content that is divided into sections. The key is the
+       * section's name and the value is the section's content. There is no
+       * specific format for the key or value.
+       * 
+ * + * map<string, string> text_sections = 4; + */ + @java.lang.Override + public java.lang.String getTextSectionsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTextSections().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+       * The summary content that is divided into sections. The key is the
+       * section's name and the value is the section's content. There is no
+       * specific format for the key or value.
+       * 
+ * + * map<string, string> text_sections = 4; + */ + @java.lang.Override + public java.lang.String getTextSectionsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetTextSections().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearTextSections() { + internalGetMutableTextSections().getMutableMap().clear(); + return this; + } + /** + * + * + *
+       * The summary content that is divided into sections. The key is the
+       * section's name and the value is the section's content. There is no
+       * specific format for the key or value.
+       * 
+ * + * map<string, string> text_sections = 4; + */ + public Builder removeTextSections(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableTextSections().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableTextSections() { + return internalGetMutableTextSections().getMutableMap(); + } + /** + * + * + *
+       * The summary content that is divided into sections. The key is the
+       * section's name and the value is the section's content. There is no
+       * specific format for the key or value.
+       * 
+ * + * map<string, string> text_sections = 4; + */ + public Builder putTextSections(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableTextSections().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+       * The summary content that is divided into sections. The key is the
+       * section's name and the value is the section's content. There is no
+       * specific format for the key or value.
+       * 
+ * + * map<string, string> text_sections = 4; + */ + public Builder putAllTextSections(java.util.Map values) { + internalGetMutableTextSections().getMutableMap().putAll(values); + return this; + } + + private java.lang.Object answerRecord_ = ""; + /** + * + * + *
+       * The name of the answer record. Format:
+       * "projects/<Project ID>/answerRecords/<Answer Record ID>"
+       * 
+ * + * string answer_record = 3 [(.google.api.resource_reference) = { ... } + * + * @return The answerRecord. + */ + public java.lang.String getAnswerRecord() { + java.lang.Object ref = answerRecord_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + answerRecord_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The name of the answer record. Format:
+       * "projects/<Project ID>/answerRecords/<Answer Record ID>"
+       * 
+ * + * string answer_record = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for answerRecord. + */ + public com.google.protobuf.ByteString getAnswerRecordBytes() { + java.lang.Object ref = answerRecord_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + answerRecord_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The name of the answer record. Format:
+       * "projects/<Project ID>/answerRecords/<Answer Record ID>"
+       * 
+ * + * string answer_record = 3 [(.google.api.resource_reference) = { ... } + * + * @param value The answerRecord to set. + * @return This builder for chaining. + */ + public Builder setAnswerRecord(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + answerRecord_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the answer record. Format:
+       * "projects/<Project ID>/answerRecords/<Answer Record ID>"
+       * 
+ * + * string answer_record = 3 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearAnswerRecord() { + + answerRecord_ = getDefaultInstance().getAnswerRecord(); + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the answer record. Format:
+       * "projects/<Project ID>/answerRecords/<Answer Record ID>"
+       * 
+ * + * string answer_record = 3 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for answerRecord to set. + * @return This builder for chaining. + */ + public Builder setAnswerRecordBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + answerRecord_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary) + private static final com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse + .Summary + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary(); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Summary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Summary(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int SUMMARY_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary summary_; + /** + * + * + *
+   * Generated summary.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary summary = 1; + * + * + * @return Whether the summary field is set. + */ + @java.lang.Override + public boolean hasSummary() { + return summary_ != null; + } + /** + * + * + *
+   * Generated summary.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary summary = 1; + * + * + * @return The summary. + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + getSummary() { + return summary_ == null + ? com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + .getDefaultInstance() + : summary_; + } + /** + * + * + *
+   * Generated summary.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary summary = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.SummaryOrBuilder + getSummaryOrBuilder() { + return getSummary(); + } + + public static final int LATEST_MESSAGE_FIELD_NUMBER = 2; + private volatile java.lang.Object latestMessage_; + /** + * + * + *
+   * The name of the latest conversation message used as context for
+   * compiling suggestion.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+   * 
+ * + * string latest_message = 2 [(.google.api.resource_reference) = { ... } + * + * @return The latestMessage. + */ + @java.lang.Override + public java.lang.String getLatestMessage() { + java.lang.Object ref = latestMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + latestMessage_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the latest conversation message used as context for
+   * compiling suggestion.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+   * 
+ * + * string latest_message = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for latestMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLatestMessageBytes() { + java.lang.Object ref = latestMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + latestMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTEXT_SIZE_FIELD_NUMBER = 3; + private int contextSize_; + /** + * + * + *
+   * Number of messages prior to and including
+   * [last_conversation_message][] used to compile the suggestion. It may be
+   * smaller than the [SuggestSummaryRequest.context_size][] field in the
+   * request if there weren't that many messages in the conversation.
+   * 
+ * + * int32 context_size = 3; + * + * @return The contextSize. + */ + @java.lang.Override + public int getContextSize() { + return contextSize_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (summary_ != null) { + output.writeMessage(1, getSummary()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(latestMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, latestMessage_); + } + if (contextSize_ != 0) { + output.writeInt32(3, contextSize_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (summary_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSummary()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(latestMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, latestMessage_); + } + if (contextSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, contextSize_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse other = + (com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse) obj; + + if (hasSummary() != other.hasSummary()) return false; + if (hasSummary()) { + if (!getSummary().equals(other.getSummary())) return false; + } + if (!getLatestMessage().equals(other.getLatestMessage())) return false; + if (getContextSize() != other.getContextSize()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSummary()) { + hash = (37 * hash) + SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getSummary().hashCode(); + } + hash = (37 * hash) + LATEST_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getLatestMessage().hashCode(); + hash = (37 * hash) + CONTEXT_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getContextSize(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for [Conversations.SuggestConversationSummary][google.cloud.dialogflow.v2beta1.Conversations.SuggestConversationSummary].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse) + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.class, + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (summaryBuilder_ == null) { + summary_ = null; + } else { + summary_ = null; + summaryBuilder_ = null; + } + latestMessage_ = ""; + + contextSize_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2beta1.ConversationProto + .internal_static_google_cloud_dialogflow_v2beta1_SuggestConversationSummaryResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse build() { + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse buildPartial() { + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse result = + new com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse(this); + if (summaryBuilder_ == null) { + result.summary_ = summary_; + } else { + result.summary_ = summaryBuilder_.build(); + } + result.latestMessage_ = latestMessage_; + result.contextSize_ = contextSize_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse) { + return mergeFrom( + (com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse other) { + if (other + == com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse + .getDefaultInstance()) return this; + if (other.hasSummary()) { + mergeSummary(other.getSummary()); + } + if (!other.getLatestMessage().isEmpty()) { + latestMessage_ = other.latestMessage_; + onChanged(); + } + if (other.getContextSize() != 0) { + setContextSize(other.getContextSize()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary summary_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary, + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary.Builder, + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.SummaryOrBuilder> + summaryBuilder_; + /** + * + * + *
+     * Generated summary.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary summary = 1; + * + * + * @return Whether the summary field is set. + */ + public boolean hasSummary() { + return summaryBuilder_ != null || summary_ != null; + } + /** + * + * + *
+     * Generated summary.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary summary = 1; + * + * + * @return The summary. + */ + public com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + getSummary() { + if (summaryBuilder_ == null) { + return summary_ == null + ? com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + .getDefaultInstance() + : summary_; + } else { + return summaryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Generated summary.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary summary = 1; + * + */ + public Builder setSummary( + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary value) { + if (summaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + summary_ = value; + onChanged(); + } else { + summaryBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Generated summary.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary summary = 1; + * + */ + public Builder setSummary( + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary.Builder + builderForValue) { + if (summaryBuilder_ == null) { + summary_ = builderForValue.build(); + onChanged(); + } else { + summaryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Generated summary.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary summary = 1; + * + */ + public Builder mergeSummary( + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary value) { + if (summaryBuilder_ == null) { + if (summary_ != null) { + summary_ = + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + .newBuilder(summary_) + .mergeFrom(value) + .buildPartial(); + } else { + summary_ = value; + } + onChanged(); + } else { + summaryBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Generated summary.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary summary = 1; + * + */ + public Builder clearSummary() { + if (summaryBuilder_ == null) { + summary_ = null; + onChanged(); + } else { + summary_ = null; + summaryBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Generated summary.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary summary = 1; + * + */ + public com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary.Builder + getSummaryBuilder() { + + onChanged(); + return getSummaryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Generated summary.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary summary = 1; + * + */ + public com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.SummaryOrBuilder + getSummaryOrBuilder() { + if (summaryBuilder_ != null) { + return summaryBuilder_.getMessageOrBuilder(); + } else { + return summary_ == null + ? com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + .getDefaultInstance() + : summary_; + } + } + /** + * + * + *
+     * Generated summary.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary summary = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary, + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary.Builder, + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.SummaryOrBuilder> + getSummaryFieldBuilder() { + if (summaryBuilder_ == null) { + summaryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary, + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary + .Builder, + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse + .SummaryOrBuilder>(getSummary(), getParentForChildren(), isClean()); + summary_ = null; + } + return summaryBuilder_; + } + + private java.lang.Object latestMessage_ = ""; + /** + * + * + *
+     * The name of the latest conversation message used as context for
+     * compiling suggestion.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+     * 
+ * + * string latest_message = 2 [(.google.api.resource_reference) = { ... } + * + * @return The latestMessage. + */ + public java.lang.String getLatestMessage() { + java.lang.Object ref = latestMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + latestMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the latest conversation message used as context for
+     * compiling suggestion.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+     * 
+ * + * string latest_message = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for latestMessage. + */ + public com.google.protobuf.ByteString getLatestMessageBytes() { + java.lang.Object ref = latestMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + latestMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the latest conversation message used as context for
+     * compiling suggestion.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+     * 
+ * + * string latest_message = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The latestMessage to set. + * @return This builder for chaining. + */ + public Builder setLatestMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + latestMessage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the latest conversation message used as context for
+     * compiling suggestion.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+     * 
+ * + * string latest_message = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearLatestMessage() { + + latestMessage_ = getDefaultInstance().getLatestMessage(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the latest conversation message used as context for
+     * compiling suggestion.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+     * 
+ * + * string latest_message = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for latestMessage to set. + * @return This builder for chaining. + */ + public Builder setLatestMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + latestMessage_ = value; + onChanged(); + return this; + } + + private int contextSize_; + /** + * + * + *
+     * Number of messages prior to and including
+     * [last_conversation_message][] used to compile the suggestion. It may be
+     * smaller than the [SuggestSummaryRequest.context_size][] field in the
+     * request if there weren't that many messages in the conversation.
+     * 
+ * + * int32 context_size = 3; + * + * @return The contextSize. + */ + @java.lang.Override + public int getContextSize() { + return contextSize_; + } + /** + * + * + *
+     * Number of messages prior to and including
+     * [last_conversation_message][] used to compile the suggestion. It may be
+     * smaller than the [SuggestSummaryRequest.context_size][] field in the
+     * request if there weren't that many messages in the conversation.
+     * 
+ * + * int32 context_size = 3; + * + * @param value The contextSize to set. + * @return This builder for chaining. + */ + public Builder setContextSize(int value) { + + contextSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Number of messages prior to and including
+     * [last_conversation_message][] used to compile the suggestion. It may be
+     * smaller than the [SuggestSummaryRequest.context_size][] field in the
+     * request if there weren't that many messages in the conversation.
+     * 
+ * + * int32 context_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearContextSize() { + + contextSize_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse) + private static final com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse(); + } + + public static com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SuggestConversationSummaryResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SuggestConversationSummaryResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SuggestConversationSummaryResponseOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SuggestConversationSummaryResponseOrBuilder.java new file mode 100644 index 000000000..c05fb4d97 --- /dev/null +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SuggestConversationSummaryResponseOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/v2beta1/conversation.proto + +package com.google.cloud.dialogflow.v2beta1; + +public interface SuggestConversationSummaryResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Generated summary.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary summary = 1; + * + * + * @return Whether the summary field is set. + */ + boolean hasSummary(); + /** + * + * + *
+   * Generated summary.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary summary = 1; + * + * + * @return The summary. + */ + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary getSummary(); + /** + * + * + *
+   * Generated summary.
+   * 
+ * + * .google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.Summary summary = 1; + * + */ + com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse.SummaryOrBuilder + getSummaryOrBuilder(); + + /** + * + * + *
+   * The name of the latest conversation message used as context for
+   * compiling suggestion.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+   * 
+ * + * string latest_message = 2 [(.google.api.resource_reference) = { ... } + * + * @return The latestMessage. + */ + java.lang.String getLatestMessage(); + /** + * + * + *
+   * The name of the latest conversation message used as context for
+   * compiling suggestion.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/conversations/<Conversation ID>/messages/<Message ID>`.
+   * 
+ * + * string latest_message = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for latestMessage. + */ + com.google.protobuf.ByteString getLatestMessageBytes(); + + /** + * + * + *
+   * Number of messages prior to and including
+   * [last_conversation_message][] used to compile the suggestion. It may be
+   * smaller than the [SuggestSummaryRequest.context_size][] field in the
+   * request if there weren't that many messages in the conversation.
+   * 
+ * + * int32 context_size = 3; + * + * @return The contextSize. + */ + int getContextSize(); +} diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SuggestionFeature.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SuggestionFeature.java index 5fa722444..51a951e4a 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SuggestionFeature.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/SuggestionFeature.java @@ -139,7 +139,7 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Run article suggestion model.
+     * Run article suggestion model for chat.
      * 
* * ARTICLE_SUGGESTION = 1; @@ -159,12 +159,22 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Run smart reply model.
+     * Run smart reply model for chat.
      * 
* * SMART_REPLY = 3; */ SMART_REPLY(3), + /** + * + * + *
+     * Run conversation summarization model for chat.
+     * 
+ * + * CONVERSATION_SUMMARIZATION = 8; + */ + CONVERSATION_SUMMARIZATION(8), UNRECOGNIZED(-1), ; @@ -182,7 +192,7 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Run article suggestion model.
+     * Run article suggestion model for chat.
      * 
* * ARTICLE_SUGGESTION = 1; @@ -202,12 +212,22 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Run smart reply model.
+     * Run smart reply model for chat.
      * 
* * SMART_REPLY = 3; */ public static final int SMART_REPLY_VALUE = 3; + /** + * + * + *
+     * Run conversation summarization model for chat.
+     * 
+ * + * CONVERSATION_SUMMARIZATION = 8; + */ + public static final int CONVERSATION_SUMMARIZATION_VALUE = 8; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -241,6 +261,8 @@ public static Type forNumber(int value) { return FAQ; case 3: return SMART_REPLY; + case 8: + return CONVERSATION_SUMMARIZATION; default: return null; } diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/conversation.proto b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/conversation.proto index d044b4be0..432d8c080 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/conversation.proto +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/conversation.proto @@ -132,6 +132,21 @@ service Conversations { }; option (google.api.method_signature) = "parent"; } + + // Suggest summary for a conversation based on specific historical messages. + // The range of the messages to be used for summary can be specified in the + // request. + rpc SuggestConversationSummary(SuggestConversationSummaryRequest) returns (SuggestConversationSummaryResponse) { + option (google.api.http) = { + post: "/v2beta1/{conversation=projects/*/conversations/*}/suggestions:suggestConversationSummary" + body: "*" + additional_bindings { + post: "/v2beta1/{conversation=projects/*/locations/*/conversations/*}/suggestions:suggestConversationSummary" + body: "*" + } + }; + option (google.api.method_signature) = "conversation"; + } } // Represents a conversation. @@ -411,3 +426,69 @@ message ListMessagesResponse { // no more results in the list. string next_page_token = 2; } + +// The request message for [Conversations.SuggestConversationSummary][google.cloud.dialogflow.v2beta1.Conversations.SuggestConversationSummary]. +message SuggestConversationSummaryRequest { + // Required. The conversation to fetch suggestion for. + // Format: `projects//locations//conversations/`. + string conversation = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Conversation" + } + ]; + + // The name of the latest conversation message used as context for + // compiling suggestion. If empty, the latest message of the conversation will + // be used. + // + // Format: `projects//locations//conversations//messages/`. + string latest_message = 3 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Message" + }]; + + // Max number of messages prior to and including + // [latest_message] to use as context when compiling the + // suggestion. By default 500 and at most 1000. + int32 context_size = 4; +} + +// The response message for [Conversations.SuggestConversationSummary][google.cloud.dialogflow.v2beta1.Conversations.SuggestConversationSummary]. +message SuggestConversationSummaryResponse { + // Generated summary for a conversation. + message Summary { + // The summary content that is concatenated into one string. + string text = 1; + + // The summary content that is divided into sections. The key is the + // section's name and the value is the section's content. There is no + // specific format for the key or value. + map text_sections = 4; + + // The name of the answer record. Format: + // "projects//answerRecords/" + string answer_record = 3 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/AnswerRecord" + }]; + } + + // Generated summary. + Summary summary = 1; + + // The name of the latest conversation message used as context for + // compiling suggestion. + // + // Format: `projects//locations//conversations//messages/`. + string latest_message = 2 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Message" + }]; + + // Number of messages prior to and including + // [last_conversation_message][] used to compile the suggestion. It may be + // smaller than the [SuggestSummaryRequest.context_size][] field in the + // request if there weren't that many messages in the conversation. + int32 context_size = 3; +} diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/participant.proto b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/participant.proto index 1d3489fe1..1f7309b6e 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/participant.proto +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/participant.proto @@ -505,14 +505,17 @@ message SuggestionFeature { // Unspecified feature type. TYPE_UNSPECIFIED = 0; - // Run article suggestion model. + // Run article suggestion model for chat. ARTICLE_SUGGESTION = 1; // Run FAQ model. FAQ = 2; - // Run smart reply model. + // Run smart reply model for chat. SMART_REPLY = 3; + + // Run conversation summarization model for chat. + CONVERSATION_SUMMARIZATION = 8; } // Type of Human Agent Assistant API feature to request. diff --git a/samples/snippets/generated/com/google/cloud/dialogflow/v2beta1/conversationsclient/suggestconversationsummary/AsyncSuggestConversationSummary.java b/samples/snippets/generated/com/google/cloud/dialogflow/v2beta1/conversationsclient/suggestconversationsummary/AsyncSuggestConversationSummary.java new file mode 100644 index 000000000..c4013012d --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/dialogflow/v2beta1/conversationsclient/suggestconversationsummary/AsyncSuggestConversationSummary.java @@ -0,0 +1,58 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.v2beta1.samples; + +// [START dialogflow_v2beta1_generated_conversationsclient_suggestconversationsummary_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.v2beta1.ConversationName; +import com.google.cloud.dialogflow.v2beta1.ConversationsClient; +import com.google.cloud.dialogflow.v2beta1.MessageName; +import com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest; +import com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse; + +public class AsyncSuggestConversationSummary { + + public static void main(String[] args) throws Exception { + asyncSuggestConversationSummary(); + } + + public static void asyncSuggestConversationSummary() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationsClient conversationsClient = ConversationsClient.create()) { + SuggestConversationSummaryRequest request = + SuggestConversationSummaryRequest.newBuilder() + .setConversation( + ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]") + .toString()) + .setLatestMessage( + MessageName.ofProjectConversationMessageName( + "[PROJECT]", "[CONVERSATION]", "[MESSAGE]") + .toString()) + .setContextSize(1116903569) + .build(); + ApiFuture future = + conversationsClient.suggestConversationSummaryCallable().futureCall(request); + // Do something. + SuggestConversationSummaryResponse response = future.get(); + } + } +} +// [END dialogflow_v2beta1_generated_conversationsclient_suggestconversationsummary_async] diff --git a/samples/snippets/generated/com/google/cloud/dialogflow/v2beta1/conversationsclient/suggestconversationsummary/SyncSuggestConversationSummary.java b/samples/snippets/generated/com/google/cloud/dialogflow/v2beta1/conversationsclient/suggestconversationsummary/SyncSuggestConversationSummary.java new file mode 100644 index 000000000..8d29d622c --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/dialogflow/v2beta1/conversationsclient/suggestconversationsummary/SyncSuggestConversationSummary.java @@ -0,0 +1,55 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.v2beta1.samples; + +// [START dialogflow_v2beta1_generated_conversationsclient_suggestconversationsummary_sync] +import com.google.cloud.dialogflow.v2beta1.ConversationName; +import com.google.cloud.dialogflow.v2beta1.ConversationsClient; +import com.google.cloud.dialogflow.v2beta1.MessageName; +import com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryRequest; +import com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse; + +public class SyncSuggestConversationSummary { + + public static void main(String[] args) throws Exception { + syncSuggestConversationSummary(); + } + + public static void syncSuggestConversationSummary() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationsClient conversationsClient = ConversationsClient.create()) { + SuggestConversationSummaryRequest request = + SuggestConversationSummaryRequest.newBuilder() + .setConversation( + ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]") + .toString()) + .setLatestMessage( + MessageName.ofProjectConversationMessageName( + "[PROJECT]", "[CONVERSATION]", "[MESSAGE]") + .toString()) + .setContextSize(1116903569) + .build(); + SuggestConversationSummaryResponse response = + conversationsClient.suggestConversationSummary(request); + } + } +} +// [END dialogflow_v2beta1_generated_conversationsclient_suggestconversationsummary_sync] diff --git a/samples/snippets/generated/com/google/cloud/dialogflow/v2beta1/conversationsclient/suggestconversationsummary/SyncSuggestConversationSummaryConversationname.java b/samples/snippets/generated/com/google/cloud/dialogflow/v2beta1/conversationsclient/suggestconversationsummary/SyncSuggestConversationSummaryConversationname.java new file mode 100644 index 000000000..c5f03266a --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/dialogflow/v2beta1/conversationsclient/suggestconversationsummary/SyncSuggestConversationSummaryConversationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.v2beta1.samples; + +// [START dialogflow_v2beta1_generated_conversationsclient_suggestconversationsummary_conversationname_sync] +import com.google.cloud.dialogflow.v2beta1.ConversationName; +import com.google.cloud.dialogflow.v2beta1.ConversationsClient; +import com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse; + +public class SyncSuggestConversationSummaryConversationname { + + public static void main(String[] args) throws Exception { + syncSuggestConversationSummaryConversationname(); + } + + public static void syncSuggestConversationSummaryConversationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationsClient conversationsClient = ConversationsClient.create()) { + ConversationName conversation = + ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]"); + SuggestConversationSummaryResponse response = + conversationsClient.suggestConversationSummary(conversation); + } + } +} +// [END dialogflow_v2beta1_generated_conversationsclient_suggestconversationsummary_conversationname_sync] diff --git a/samples/snippets/generated/com/google/cloud/dialogflow/v2beta1/conversationsclient/suggestconversationsummary/SyncSuggestConversationSummaryString.java b/samples/snippets/generated/com/google/cloud/dialogflow/v2beta1/conversationsclient/suggestconversationsummary/SyncSuggestConversationSummaryString.java new file mode 100644 index 000000000..e832e55a9 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/dialogflow/v2beta1/conversationsclient/suggestconversationsummary/SyncSuggestConversationSummaryString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.v2beta1.samples; + +// [START dialogflow_v2beta1_generated_conversationsclient_suggestconversationsummary_string_sync] +import com.google.cloud.dialogflow.v2beta1.ConversationName; +import com.google.cloud.dialogflow.v2beta1.ConversationsClient; +import com.google.cloud.dialogflow.v2beta1.SuggestConversationSummaryResponse; + +public class SyncSuggestConversationSummaryString { + + public static void main(String[] args) throws Exception { + syncSuggestConversationSummaryString(); + } + + public static void syncSuggestConversationSummaryString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ConversationsClient conversationsClient = ConversationsClient.create()) { + String conversation = + ConversationName.ofProjectConversationName("[PROJECT]", "[CONVERSATION]").toString(); + SuggestConversationSummaryResponse response = + conversationsClient.suggestConversationSummary(conversation); + } + } +} +// [END dialogflow_v2beta1_generated_conversationsclient_suggestconversationsummary_string_sync]